DB2 will not allow you to rename a table if it's got a
constraint on it (a unique or foreign key constraint).
This fix changes the migrations so that the unique or FK
constraints are dropped from tables before renaming and then
restoring the unique FK constraints. This works for DB2 and
other DBMSs that support FK constraints such as MySQL with
InnoDB and PostgreSQL.
Also, for DB2, give a name to the unique constraints so that
they can be manipulated.
Reviewed: https:/ /review. openstack. org/32191 github. com/openstack/ keystone/ commit/ 052e7d525146c23 5f3c4ddc729ee6e 1ac18a1337
Committed: http://
Submitter: Jenkins
Branch: master
commit 052e7d525146c23 5f3c4ddc729ee6e 1ac18a1337
Author: Brant Knudson <email address hidden>
Date: Fri Jun 7 14:47:49 2013 -0500
DB2 migration support
DB2 will not allow you to rename a table if it's got a
constraint on it (a unique or foreign key constraint).
This fix changes the migrations so that the unique or FK
constraints are dropped from tables before renaming and then
restoring the unique FK constraints. This works for DB2 and
other DBMSs that support FK constraints such as MySQL with
InnoDB and PostgreSQL.
Also, for DB2, give a name to the unique constraints so that
they can be manipulated.
Fixes bug 1188785
Change-Id: I7cf6ab42084e43 d827ed827c64025 e61e72a4672