X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FSchema%2FVersioned.pm;h=e264f22de05c0d48c8e345157b00a2715b0a9cd3;hb=e7b14c5bf2b238d32fc22dbf8450eb4b01ace466;hp=55ba754ce2b88f49d390fc9f9fd9f2b45c86d1bb;hpb=249963d4c07b676fdd1c186361bebfe4e0186882;p=dbsrgits%2FDBIx-Class.git 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