Skip to content

Commit

Permalink
Update contributing doc with breeze generate-migration-file command (#…
Browse files Browse the repository at this point in the history
…39655)

This was suggested in #39632 but I forgot to include it.
  • Loading branch information
ephraimbuddy authored May 16, 2024
1 parent 9ea78d9 commit cba653e
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions contributing-docs/13_metadata_database_updates.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,15 @@ Metadata Database Updates
When developing features, you may need to persist information to the metadata
database. Airflow has `Alembic <https://github.com/sqlalchemy/alembic>`__ built-in
module to handle all schema changes. Alembic must be installed on your
development machine before continuing with migration.
development machine before continuing with migration. If you had made changes to the ORM,
you will need to generate a new migration file. This file will contain the changes to the
database schema that you have made. To generate a new migration file, run the following:


.. code-block:: bash
# starting at the root of the project
$ pwd
~/airflow
# change to the airflow directory
$ cd airflow
$ alembic revision -m "add new field to db"
$ breeze generate-migration-file -m "add new field to db"
Generating
~/airflow/airflow/migrations/versions/a1e23c41f123_add_new_field_to_db.py
Expand Down

0 comments on commit cba653e

Please sign in to comment.