This is an automated email from the ASF dual-hosted git repository.
ephraimanierobi pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new cba653ee23 Update contributing doc with breeze generate-migration-file
command (#39655)
cba653ee23 is described below
commit cba653ee23c1e596855cdc620fe893fecb3a6a44
Author: Ephraim Anierobi <[email protected]>
AuthorDate: Thu May 16 08:05:38 2024 +0100
Update contributing doc with breeze generate-migration-file command (#39655)
This was suggested in #39632 but I forgot to include it.
---
contributing-docs/13_metadata_database_updates.rst | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/contributing-docs/13_metadata_database_updates.rst
b/contributing-docs/13_metadata_database_updates.rst
index fc82e0d8bd..86b578199e 100644
--- a/contributing-docs/13_metadata_database_updates.rst
+++ b/contributing-docs/13_metadata_database_updates.rst
@@ -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