summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2009-08-03 20:08:09 +0200
committermkanat%bugzilla.org <>2009-08-03 20:08:09 +0200
commitc253b28a9ac660be1db0212967342eef2c4f142d (patch)
treed0de41b5dda249046331f965995c85a3790a755b /Bugzilla
parent4d04866100b1566d062f7b10c561877c49a9c6a5 (diff)
downloadbugzilla-c253b28a9ac660be1db0212967342eef2c4f142d.tar.gz
bugzilla-c253b28a9ac660be1db0212967342eef2c4f142d.tar.xz
Additional fix for bug 508023, to make upgrades from 3.1.4 succeed.
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/DB/Schema/Mysql.pm8
1 files changed, 5 insertions, 3 deletions
diff --git a/Bugzilla/DB/Schema/Mysql.pm b/Bugzilla/DB/Schema/Mysql.pm
index 49e6add1a..95ef3141e 100644
--- a/Bugzilla/DB/Schema/Mysql.pm
+++ b/Bugzilla/DB/Schema/Mysql.pm
@@ -189,13 +189,15 @@ sub get_alter_column_ddl {
my %new_defaultless = %$new_def;
delete $old_defaultless{DEFAULT};
delete $new_defaultless{DEFAULT};
- if ($self->columns_equal(\%new_defaultless, \%old_defaultless)) {
- if (defined $old_def->{DEFAULT} and !defined $new_def->{DEFAULT}) {
+ if (!$self->columns_equal($old_def, $new_def)
+ && $self->columns_equal(\%new_defaultless, \%old_defaultless))
+ {
+ if (!defined $new_def->{DEFAULT}) {
push(@statements,
"ALTER TABLE $table ALTER COLUMN $column DROP DEFAULT");
}
else {
- push(@statements, "ALTER TABLE $table ALTER COLUMN $column
+ push(@statements, "ALTER TABLE $table ALTER COLUMN $column
SET DEFAULT " . $new_def->{DEFAULT});
}
}