Skip to content

Detect and fail any command when db is not migrated #18323

@potiuk

Description

@potiuk

Description

We had recently a number of questions from users who did not run airflow db upgrade and run airflow and it was failing because of missing columns etc.

It was not entirely clear for new users that they should do it and I am fixing it in #18282 , however I think we should do better

Use case/motivation

I think we should check what migration is currently applied and fail any Airflow command that requires the DB hard with clear information that the DB is not migrated and what to do.

This should be rather easy, I think. Alembic keeps track of the migration and I believe it has already all the tools to determine "current migration" vs. "expected migration".

Related issues

#18282

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions