magnum/magnum/db
Feilong Wang 210984fa26 Do not create constraints for boolean fields
On mysql 8, Boolean fields create constraints which later
make it impossible to alter the name of the column.
See: https://github.com/sqlalchemy/alembic/issues/699

Per upstream alembic recommendation, do not create constraints
explicitly.
https://github.com/sqlalchemy/alembic/issues/699#issuecomment-760983057

story: 2008488
task: 41537

Signed-off-by: Spyros Trigazis <spyridon.trigazis@cern.ch>
(cherry picked from commit bcf771bc6f)

Fix database migrations

The pattern of adding a column and then reading a table with it
no longer works in SQLAlchemy 1.3.20. This has been reported
upstream [1].

[1] https://github.com/sqlalchemy/sqlalchemy/issues/5669

squashed with: I5fd1deeef9cf70794bc61c101e1d7d4379d4b96b
(cherry picked from commit f5cf6b958c)

Change-Id: I51659c6e179d7e4e2cfc5be46348fac483d76e3b
2021-03-01 13:18:25 +01:00
..
sqlalchemy Do not create constraints for boolean fields 2021-03-01 13:18:25 +01:00
__init__.py Centralize config option: database section 2016-09-22 05:57:01 +00:00
api.py ng-6: Add new fields to nodegroup objects 2019-09-25 12:26:00 +00:00
migration.py Centralize config option: database section 2016-09-22 05:57:01 +00:00