Commit 47eb776b authored by Max Kanat-Alexander's avatar Max Kanat-Alexander

Bug 578197: [PostgreSQL] When associating sequences with columns, also

fix the default of the columns so that it's identical to what a new checksetup run would create. r=mkanat, a=mkanat (module owner)
parent 31ffa563
......@@ -296,6 +296,12 @@ END
print "Fixing $sequence to be associated"
. " with $table.$column...\n";
$self->do("ALTER SEQUENCE $sequence OWNED BY $table.$column");
# In order to produce an exactly identical schema to what
# a brand-new checksetup.pl run would produce, we also need
# to re-set the default on this column.
$self->do("ALTER TABLE $table
ALTER COLUMN $column
SET DEFAULT nextval('$sequence')");
}
}
}
......
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