magnum/magnum/db/sqlalchemy
Feilong Wang 850b94aa6f 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
(cherry picked from commit 210984fa26)

Conflicts:
magnum/db/sqlalchemy/alembic/versions/1d045384b966_add_insecure_baymodel_attr.py

Change-Id: Iba6f68822e4c7219f21ab2da252802dc7c3ca933
2021-03-18 12:42:28 -04:00
..
alembic Do not create constraints for boolean fields 2021-03-18 12:42:28 -04:00
__init__.py Copy Ironic's database model codebase 2014-12-02 15:04:31 -07:00
alembic.ini Copy Ironic's database model codebase 2014-12-02 15:04:31 -07: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
models.py Add master_lb_enabled to cluster 2020-07-22 14:06:20 +00:00