0

Background: Airflow uses Alembic to apply migrations to the database it uses to store DAG/task metadata. I want to store some other data in this database, and would like to track my schema changes through Alembic migrations. It can be assumed that my migrations will be limited to creating/modifying new tables, without altering any of the tables that Airflow creates and uses.

Will the fact that there are two sets of migrations (one in the Airflow source code, and one in my application code) cause any issues?

gmds
  • 19,325
  • 4
  • 32
  • 58
  • https://alembic.sqlalchemy.org/en/latest/branches.html#multiple-bases and / or https://alembic.sqlalchemy.org/en/latest/cookbook.html#run-multiple-alembic-environments-from-one-ini-file might work. – snakecharmerb Apr 27 '22 at 05:59

1 Answers1

0

Even if you use the same DB server, I suggest to use a different schema/database for the applicative stuff. This way, when you pass a connection string in the env.py that runs the migrations, it will use a different alembic_version table and therefore they wouldn't collide.

AlexD
  • 4,062
  • 5
  • 38
  • 65