From: Luke Saunders Date: Fri, 27 Jun 2008 10:18:08 +0000 (+0000) Subject: changed default behaviour of do_upgrade in versioned to just run everything X-Git-Tag: v0.08240~419 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e7b14c5bf2b238d32fc22dbf8450eb4b01ace466;p=dbsrgits%2FDBIx-Class.git changed default behaviour of do_upgrade in versioned to just run everything --- diff --git a/lib/DBIx/Class/Schema/Versioned.pm b/lib/DBIx/Class/Schema/Versioned.pm index 55ba754..e264f22 100644 --- a/lib/DBIx/Class/Schema/Versioned.pm +++ b/lib/DBIx/Class/Schema/Versioned.pm @@ -353,22 +353,16 @@ allows you to run your upgrade any way you please, you can call C any number of times to run the actual SQL commands, and in between you can sandwich your data upgrading. For example, first run all the B commands, then migrate your data from old to new tables/formats, then -issue the DROP commands when you are finished. - -Will run the whole file as it is by default. +issue the DROP commands when you are finished. Will run the whole file as it is by default. =cut sub do_upgrade { - my ($self) = @_; + my ($self) = @_; - ## overridable sub, per default just run all the commands. - $self->run_upgrade(qr/create/i); - $self->run_upgrade(qr/alter table .*? add/i); - $self->run_upgrade(qr/alter table .*? (?!drop)/i); - $self->run_upgrade(qr/alter table .*? drop/i); - $self->run_upgrade(qr/drop/i); + # just run all the commands (including inserts) in order + $self->run_upgrade(qr/.*?/); } =head2 run_upgrade