[Bast-commits] r4520 - DBIx-Class/0.08/trunk/lib/DBIx/Class/Schema
lukes at dev.catalyst.perl.org
lukes at dev.catalyst.perl.org
Fri Jun 27 11:18:08 BST 2008
Author: lukes
Date: 2008-06-27 11:18:08 +0100 (Fri, 27 Jun 2008)
New Revision: 4520
Modified:
DBIx-Class/0.08/trunk/lib/DBIx/Class/Schema/Versioned.pm
Log:
changed default behaviour of do_upgrade in versioned to just run everything
Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/Schema/Versioned.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/Schema/Versioned.pm 2008-06-26 19:51:35 UTC (rev 4519)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/Schema/Versioned.pm 2008-06-27 10:18:08 UTC (rev 4520)
@@ -353,22 +353,16 @@
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<CREATE>
commands, then migrate your data from old to new tables/formats, then
-issue the DROP commands when you are finished.
+issue the DROP commands when you are finished. Will run the whole file as it is by default.
-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
More information about the Bast-commits
mailing list