db util drop_unique_constraint doesn't work for sqlite
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
New
|
Undecided
|
Unassigned | ||
oslo-incubator |
Invalid
|
Undecided
|
Matt Riedemann |
Bug Description
This patch adds the drop_unique_
https:/
But that's not the same code that's in nova.db.
https:/
The version in nova handles sqlite differently by recreating the table since sqlite doesn't support 'alter table drop constraint' calls, as shown in this nova patch here using the oslo db utility:
http://
So the oslo-incubator version needs to be synced up with the latest version in nova.
This is also going to block on my change to nova to remove the duplicate code from nova that's in oslo's db utils:
Probably the best proof that this doesn't work is sqlalchemy- migrate' s sqlite constraint dropper doesn't support dropping constraints in migrations:
https:/ /github. com/stackforge/ sqlalchemy- migrate/ blob/0. 9/migrate/ changeset/ databases/ sqlite. py#L143