[Dbix-class] deploymenthandler and version storage (0.001002)

fREW Schmidt frioux at gmail.com
Thu Jul 15 00:36:44 GMT 2010


On Thu, Jul 8, 2010 at 1:53 PM, Seth Daniel <dbix-class at sethdaniel.org>wrot=
e:

> 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 =3D <connect to db>
>  2:
>  3: my $dh =3D DBIx::Class::DeploymentHandler->new( { schema =3D> $s } );
>  4: $dh->prepare_version_storage_install;
>  5: $dh->install_version_storage;
>  6:
>  7: $dh->add_database_version( { version =3D> $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 su=
ch
> file or directory' at
> /opt/perl/5.10/lib/site_perl/5.10.1/DBIx/Class/DeploymentHandler/DeployMe=
thod/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.
>

I'll look at this tonight.  Thanks for the report.

-- =

fREW Schmidt
http://blog.afoolishmanifesto.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20100714/24b=
896e0/attachment.htm


More information about the DBIx-Class mailing list