[Dbix-class] Re: [BUG] deploy($args, $dir) can't find the ddl file because it doesn't pass $version

Guillermo Roditi groditi at gmail.com
Tue Feb 24 00:13:22 GMT 2009


On Mon, Feb 23, 2009 at 6:50 PM, Guillermo Roditi <groditi at gmail.com> wrote:

>
>
> On Mon, Feb 23, 2009 at 6:45 PM, Guillermo Roditi <groditi at gmail.com>wrot=
e:
>
>> $schema->deploy({...}, $dir);
>>
>> is supposed to look in $dir for a DDL file that matches ->ddl_filename.
>> The problem is that if you store your DDL file with a version number then
>> deploy won't find it because there's no way to give deploy a version num=
ber
>> and even if you did Storage::DBI::deploy doesn't accept a version number,
>> instead just throwing undef as the version to
>> Storage::DBI::deploy_statements, which then asks ddl_filename for a file=
name
>> using an undefined version.. so DBIC just ignores it and moves along. Un=
less
>> one were to keep an undefined version DDL file in the DDL dir it will ju=
st
>> never work correctly
>
>
> Actually that last case won't ever work either since create_ddl_dir makes
> sure to use VERSION, or just fabricate a version number '1.x', totally
> undocumented.
>
> Basically the $dir option in ->deploy is completely useless
>

Well it turns out that deploy_statements also takes the liberty to make up
version numbers, which could miraculously work along create_ddl_dir's made
up version numbers except that it looks in the wrong place since the
arguments on the ddl_filename call are in the wrong order..

obviously nobody has ever used this feature since it simply doesn't work and
never has so i suggest we add a $version variable to Schema::deploy and
Storage::DBI::deploy

svk blames mst *snicker*

 13588  (matthewt 2006-07-22):            my $filename =3D
$schema->ddl_filename($type, $dir, $version);




-- =

Guillermo Roditi (groditi)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20090223/b0e=
e1abe/attachment.htm


More information about the DBIx-Class mailing list