Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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: I7cf6ab42084e43d827ed827c64025e61e72a4672
- Loading branch information
Brant Knudson
committed
Jul 1, 2013
1 parent
6362fb7
commit 052e7d5
Showing
9 changed files
with
194 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
63 changes: 55 additions & 8 deletions
63
keystone/common/sql/migrate_repo/versions/015_tenant_to_project.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#Used for running the Migrate tests against a live DB2 Server | ||
#See _sql_livetest.py | ||
[sql] | ||
connection = ibm_db_sa://keystone:keystone@/staktest?charset=utf8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters