Does alembic have repeatable migrations ? #950
-
Something like what liquibase or flyway provide: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
this is not a first class feature of Alembic but you can certainly make yourself a set of Python files that will invoke a series of "CREATE OR REPLACE" statements after migrations are updated. an approach towards SPs, triggers etc that's something like this is described at https://alembic.sqlalchemy.org/en/latest/cookbook.html#replaceable-objects. A third party library alembic-utils provides a full , supported version of this pattern. |
Beta Was this translation helpful? Give feedback.
this is not a first class feature of Alembic but you can certainly make yourself a set of Python files that will invoke a series of "CREATE OR REPLACE" statements after migrations are updated. an approach towards SPs, triggers etc that's something like this is described at https://alembic.sqlalchemy.org/en/latest/cookbook.html#replaceable-objects. A third party library alembic-utils provides a full , supported version of this pattern.