luke saunders wrote:
On Tue, Jul 8, 2008 at 4:49 AM, Christopher Laco <[EMAIL PROTECTED]> 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.
Yeah, the overloaded deploy would seem to close that gap between what happens and what's expected. Having never used Versioned before, I completely expected upgrade to deploy the entire schema since you're on version undef. Of course, running deply first, then upgrade just yields the addition of the versioned tables, but no upgrade scripts get run (if I was now on $VERSION=2).
-=Chris
signature.asc
Description: OpenPGP digital signature
_______________________________________________ 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]