Hello,

I have been looking at using DBIXC::DeploymentHandler.  I'm wondering if
the following is a bug.

Use the code that is mentioned in the perldoc for DBIC::DeploymentHandler
for creating the version storage table:

  1: my $s = <connect to db>
  2: 
  3: my $dh = DBIx::Class::DeploymentHandler->new( { schema => $s } );
  4: $dh->prepare_version_storage_install;
  5: $dh->install_version_storage;
  6:
  7: $dh->add_database_version( { version => $s->schema_version } );


Line 4 creates a file structure that looks like:

  sql/MySQL/deploy/<version>/001-auto-__VERSION.sql

Line 5 attempts to load the sql file from above, but it drops the
version number from the path, so it fails with the following error:

  Can't open 'sql/MySQL/deploy/001-auto-__VERSION.sql' for reading: 'No such 
file or directory' at 
/opt/perl/5.10/lib/site_perl/5.10.1/DBIx/Class/DeploymentHandler/DeployMethod/SQL/Translator.pm
 line 575


It looks like 'install_resultsource' in
DBIXC::DeploymentHandler::DeployMethod::Sql::Translator is expecting a
version key in the passed in hash, but this key is not passed in when
'install_version_storage' is called.  When I hacked passing in a version
the code worked as I expected it to.

-- 
seth /\ sethdaniel.org

_______________________________________________
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/[email protected]

Reply via email to