Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add airflow db autogenerate command for generating migration files #39576

Closed
wants to merge 1 commit into from

Conversation

ephraimbuddy
Copy link
Contributor

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

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

potiuk commented May 12, 2024

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 ?

@uranusjr
Copy link
Member

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.

@potiuk
Copy link
Member

potiuk commented May 12, 2024

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.

Copy link
Member

@hussein-awala hussein-awala left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice one!

ephraimbuddy added a commit to astronomer/airflow that referenced this pull request May 15, 2024
This helps to generate alembic migration file for ORM changes.

Closes: apache#39576
ephraimbuddy added a commit to astronomer/airflow that referenced this pull request May 15, 2024
This helps to generate alembic migration file for ORM changes.

Closes: apache#39576
ephraimbuddy added a commit that referenced this pull request May 15, 2024
* Add `breeze generate-migration-file` command

This helps to generate alembic migration file for ORM changes.

Closes: #39576

* fixup! Add `breeze generate-migration-file` command
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants