Updated openstack/openstack
Project: openstack/nova  4dbcb8b70906fe18195a0d108ca3ac03ce45d9e6
null
Fix migrations changing the type of deleted column

SQLite doesn't provide a native implementation of BOOLEAN data type.
SQLAlchemy emulates BOOLEAN data type for SQLite using INT column +
CHECK constraint.
We have a few migrations changing the type of column 'deleted' from
BOOLEAN to INT. Due to limitations of ALTER in SQLite, in order to do
that, we omit the original 'deleted' column as well as the corresponding
CHECK constraint when recreating the table. Omitting of the constraint
is more tricky. It's implemented by analyzing the SQL text used for its
rendering. SQLAlchemy versions 0.8.3+ slightly changed the way
constraints are rendered, so we have to update our migrations changing
the type of 'deleted' column to work with SQLAlchemy 0.8.3+ on SQLite
backend (we aren't using SQLite in production, but we still need it for
running of unit tests).

Closes-Bug: #1252693
Change-Id: I52f2b5f90a2f9191767fadc7b1eacae236c30e98