Alembic script must use named constraints to support future upgrades
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
craton |
Fix Released
|
Critical
|
Jim Baker |
Bug Description
Currently the Alembic migration script does not name all foreign key constraints. Example of current usage that needs to be fixed:
Alternative usage, which also is much closer to how such FK constraints are specified in the models file:
op.
'hosts',
sa.Column(
'id', sa.Integer,
)
Without such naming, we have two problems:
1. Upgrades are harder if we cannot drop constraints by name, then re-instate
2. Potential conflicts with other FKs, as will be seen when we support RBAC scoped role assignments.
To ensure future migration support, this needs to be fixed in the CMDB scope, but it's an easy fix to perform (if a bit tedious).
Changed in craton: | |
status: | New → In Progress |
Fix proposed to branch: master /review. openstack. org/441644
Review: https:/