[Dbix-class] Versioned Cluelessness

luke saunders luke.saunders at gmail.com
Tue Jul 8 09:37:03 BST 2008


On Tue, Jul 8, 2008 at 4:49 AM, Christopher Laco <claco at chrislaco.com> wrote:
> Christopher Laco wrote:
>> What has me stumnped is the initial deploy. If I simply do:
>>
>>  $schema->connect('dbi:SQLite:database.db')->upgrade;
>>
>> I get warnings about the db not being versioned, and then the versioned
>> table is created. However, no other schema tables are created. I thought
>> that update() by itself ran all statements (run_upgrade sets ||= qr//;)

if the db isn't versioned then it's assumed that the database is
already at the current version and all that happens is that the
versioned table is created. i can see that this might be confusing so
i'll beef out the docs later.

it probably also makes sense for Schema::Versioned to overload deploy
so that the versioned table is created after that runs, then if you're
starting from scratch you can deploy initially then run upgrades after
that.



More information about the DBIx-Class mailing list