[Dbix-class] Versioned Cluelessness

luke saunders luke.saunders at gmail.com
Wed Jul 9 00:55:47 BST 2008


On Wed, Jul 9, 2008 at 12:48 AM, Christopher Laco <claco at chrislaco.com> wrote:
> luke saunders wrote:
>>>>>
>>>>> NOTE: Since SQL::Translator 0.09000 it is better to just run all
>>>>> statmets
>>>>> in the order given, since the SQL produced is of better quality.
>>>
>>> Hmmm yeah, I briefly toyed with idea of removing that regexp check and
>>> just
>>> running stmts the order that the appear in the SQL file, probably for the
>>> exact reason you are complaining about.
>>>
>>> Is there anyone out there that is *using* this feature? If you don't
>>> speak
>>> up soon I'll remove it.
>>
>> The version in svn will run the statements in the order they are in
>> the SQL file, but the method still exists if people want to override
>> it. I only changed this last week so it's not in a dev release yet.
>>
>>
>
> Just for the sake of asking..
>
> If I'm on version 1, and upgrade() is moving to version 3... will it try to
> run the 1-2 file, then the 2-3 file... or will is always assume a single 1-3
> file?

it assumes single file. the current best practice at the moment is to
have custom code in your script or in upgrade which does the
concatenating of 1-2 and 2-3 into 1-3.

obviously we'd like this to happen automatically, but since people can
call their versions whatever they want - 0.1, 0.2 0.3 or cat, dog,
badger, it gets a bit complicated.



More information about the DBIx-Class mailing list