airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jesper Baasch-Larsen (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (AIRFLOW-2218) Support user defined database migrations in "airflow upgradedb" and "airflow initdb"
Date Thu, 15 Mar 2018 08:57:00 GMT

     [ https://issues.apache.org/jira/browse/AIRFLOW-2218?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Jesper Baasch-Larsen updated AIRFLOW-2218:
------------------------------------------
    Description: 
We want to record some domain specific statistics about our task runs. An obvious place to
put these are in the airflow metadatabase. To do this we will need to apply some custom migrations
to the database.

A clean solution to this would be to be able to apply custom migrations on top of the official
airflow migrations by providing a second directory with these migrations as an optional command
line argument.

If the first of the custom migrations has a "down_revision" of None this should be substituted
by the last of the official revisions. If a specific official "down_revision" is specified
the migration should fail if this is (no longer) the last official revision.

An example interface could be:

airflow upgradedb [-h] [--custom-migrations-dir]

and the same for initdb and possibly for resetdb as well.

  was:
We want to record some domain specific statistics about our task runs. An obvious place to
put these are in the airflow metadatabase. To do this we will need to apply some custom migrations
to the database.

A clean solution to this would be to be able to apply custom migrations on top of the official
airflow migrations by providing a second directory with these migrations as an optional command
line argument.

If the first of the custom migrations has a "down_revision" of None this should be substituted
by the last of the official revisions. If a specific official "down_revision" is specified
the migration should fail if this is (no longer) the last official revision.

An example interface could be:

airflow upgradedb [-h] [--custom-migrations-dir]

and the same for initdb.


> Support user defined database migrations in "airflow upgradedb" and "airflow initdb"
> ------------------------------------------------------------------------------------
>
>                 Key: AIRFLOW-2218
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-2218
>             Project: Apache Airflow
>          Issue Type: New Feature
>          Components: cli, db
>            Reporter: Jesper Baasch-Larsen
>            Priority: Minor
>
> We want to record some domain specific statistics about our task runs. An obvious place
to put these are in the airflow metadatabase. To do this we will need to apply some custom
migrations to the database.
> A clean solution to this would be to be able to apply custom migrations on top of the
official airflow migrations by providing a second directory with these migrations as an optional
command line argument.
> If the first of the custom migrations has a "down_revision" of None this should be substituted
by the last of the official revisions. If a specific official "down_revision" is specified
the migration should fail if this is (no longer) the last official revision.
> An example interface could be:
> airflow upgradedb [-h] [--custom-migrations-dir]
> and the same for initdb and possibly for resetdb as well.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message