You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Jesper Baasch-Larsen (JIRA)" <ji...@apache.org> on 2018/03/15 08:57:00 UTC

[jira] [Updated] (AIRFLOW-2218) Support user defined database migrations in "airflow upgradedb" and "airflow initdb"

     [ 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)