Commit c253b28a authored by mkanat%bugzilla.org's avatar mkanat%bugzilla.org

Additional fix for bug 508023, to make upgrades from 3.1.4 succeed.

parent 4d048661
......@@ -189,8 +189,10 @@ 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");
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment