[Jifty-commit] r4311 - in jifty/trunk: lib/Jifty/Script
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Thu Oct 25 14:28:39 EDT 2007
Author: sartak
Date: Thu Oct 25 14:28:39 2007
New Revision: 4311
Modified:
jifty/trunk/ (props changed)
jifty/trunk/lib/Jifty/Script/Schema.pm
Log:
r44178 at onn: sartak | 2007-10-25 14:28:11 -0400
Remove the unused drop-column logic from jifty schema --setup, since ->columns returns only active cols
Modified: jifty/trunk/lib/Jifty/Script/Schema.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Script/Schema.pm (original)
+++ jifty/trunk/lib/Jifty/Script/Schema.pm Thu Oct 25 14:28:39 2007
@@ -438,20 +438,8 @@
if ($model->can( 'since' ) and defined $model->since and $appv >= $model->since and $model->since >$dbv ) {
unshift @{ $UPGRADES{ $model->since } }, $model->printable_table_schema();
} else {
- # Go through the columns
+ # Go through the currently-active columns
for my $col (grep {not $_->virtual} $model->columns ) {
-
- # If they're old, drop them
- if ( defined $col->till and $appv >= $col->till and $col->till > $dbv ) {
- push @{ $UPGRADES{ $col->till } }, sub {
- my $renamed = $upgradeclass->just_renamed || {};
-
- # skip it if this was dropped by a rename
- $model->drop_column_in_db($col->name)
- unless defined $renamed->{ $model->table }->{'drop'}->{ $col->name };
- };
- }
-
# If they're new, add them
if ($col->can( 'since' ) and defined $col->since and $appv >= $col->since and $col->since >$dbv ) {
unshift @{ $UPGRADES{ $col->since } }, sub {
More information about the Jifty-commit
mailing list