commit 64ce647003b110771331d3daf92980729bd3988e
Author: Victor Sergeyev <email address hidden>
Date: Wed May 22 15:46:02 2013 +0300
Rename unique constraints due to new convention.
We have found that current constraint name convention allows us to create
constraints with duplicate names. It happens if we add constraints
in different tables with the same column names (for example, `name`,
`deleted`). In this case we can not create new constraint in mysql due to
database limitation (it requires constraint name to be unique within a
database). To solve this issue unique constraint name convention has
been changed from "uniq_c1_x_c2_x_c3" to "uniq_t0c10c20c3" where `t` is
a table name and columns `c1`, `c2`, `c3` are in UniqueConstraint.
Fixed unique constraints in models description.
Synced db code from oslo (function `_raise_if_duplicate_entry_error()`
modified respectively to new unique constraint name convention).
Reviewed: https:/ /review. openstack. org/30108 github. com/openstack/ nova/commit/ 64ce647003b1107 71331d3daf92980 729bd3988e
Committed: http://
Submitter: Jenkins
Branch: master
commit 64ce647003b1107 71331d3daf92980 729bd3988e
Author: Victor Sergeyev <email address hidden>
Date: Wed May 22 15:46:02 2013 +0300
Rename unique constraints due to new convention.
We have found that current constraint name convention allows us to create if_duplicate_ entry_error( )`
constraints with duplicate names. It happens if we add constraints
in different tables with the same column names (for example, `name`,
`deleted`). In this case we can not create new constraint in mysql due to
database limitation (it requires constraint name to be unique within a
database). To solve this issue unique constraint name convention has
been changed from "uniq_c1_x_c2_x_c3" to "uniq_t0c10c20c3" where `t` is
a table name and columns `c1`, `c2`, `c3` are in UniqueConstraint.
Fixed unique constraints in models description.
Synced db code from oslo (function `_raise_
modified respectively to new unique constraint name convention).
blueprint db-enforce- unique- keys
Fixes: bug 1182054
Change-Id: I4122dfb910a07a 1a423781ebc22e9 ce50596a05d