airflow icon indicating copy to clipboard operation
airflow copied to clipboard

Add `airflow db autogenerate` command for generating migration files

Open ephraimbuddy opened this issue 1 year ago • 3 comments

This PR customizes the alembic autogenerate command. The DB is reset using the migration files helping to determine new additions in the ORM accurately

ephraimbuddy avatar May 12 '24 14:05 ephraimbuddy

Should we add description about it to https://github.com/apache/airflow/blob/main/contributing-docs/13_metadata_database_updates.rst ? I think that one needs a bit more love and describe the process of adding migration scripts in a bit more detail for anyone who wants to do it ?

potiuk avatar May 12 '24 15:05 potiuk

Should this be an airflow command? I feel the end users probably never need this. It would fit better for this to be a breeze command instead, or just a script in the repo.

uranusjr avatar May 12 '24 23:05 uranusjr

Should this be an airflow command? I feel the end users probably never need this. It would fit better for this to be a breeze command instead, or just a script in the repo.

Yep. Breeze command would seem most appropriate.

potiuk avatar May 12 '24 23:05 potiuk