Search code examples
pythonflaskconcurrencyalembic

alembic db migration concurrently


I have multiple flask apps connected to the same database backend for high availability purposes. There is a problem when app instances try to migrate database concurrently using alembic! What's the best way to prevent it?


Solution

  • Alembic does not support simultaneous migration. Your best bet is to do it manually.