Debian Codegraph @

releasenotes/notes/switch-to-alembic-2bbe27749fde70ff.yaml

raw
1 ---
2 upgrade:
3 - |
4 The database migration engine has changed from `sqlalchemy-migrate`__ to
5 `alembic`__. For most deployments, this should have minimal to no impact
6 and the switch should be mostly transparent. The main user-facing impact is
7 the change in schema versioning. While sqlalchemy-migrate used a linear,
8 integer-based versioning scheme, which required placeholder migrations to
9 allow for potential migration backports, alembic uses a distributed version
10 control-like schema where a migration's ancestor is encoded in the file and
11 branches are possible. The alembic migration files therefore use a
12 arbitrary UUID-like naming scheme and the ``cinder-manage db sync`` command
13 now expects such an version when manually specifying the version that should
14 be applied. For example::
15
16 $ cinder-manage db sync 921e1a36b076
17
18 It is no longer possible to specify an sqlalchemy-migrate-based version.
19 When the ``cinder-manage db sync`` command is run, all remaining
20 sqlalchemy-migrate-based migrations will be automatically applied.
21 Attempting to specify an sqlalchemy-migrate-based version will result in an
22 error.
23
24 .. __: https://sqlalchemy-migrate.readthedocs.io/en/latest/
25 .. __: https://alembic.sqlalchemy.org/en/latest/