@@ -58,12 +58,12 @@ This guide will show you how to hook your application into Airflow's migration p
58
58
59
59
Subclass the BaseDBManager
60
60
==========================
61
- To hook your application into Airflow's migration process, you need to subclass the BaseDBManager class from the
62
- airflow.utils.db_manager.py module. This class provides methods for running Alembic migrations.
61
+ To hook your application into Airflow's migration process, you need to subclass the `` BaseDBManager `` class from the
62
+ `` airflow.utils.db_manager `` module. This class provides methods for running Alembic migrations.
63
63
64
64
Create Alembic migration scripts
65
65
================================
66
- At the root of your application, run "alembic init migrations" to create a new migrations directory. Set
66
+ At the root of your application, run "alembic init migrations" to create a new migrations directory. Set the
67
67
``version_table `` variable in the ``env.py `` file to the name of the table that stores the migration history. Specify this
68
68
version_table in the ``version_table `` argument of the alembic's ``context.configure `` method of the ``run_migration_online ``
69
69
and ``run_migration_offline `` functions. This will ensure that your application's migrations are stored in a separate
@@ -74,10 +74,10 @@ migrations. This too should be specified in the ``context.configure`` method of
74
74
75
75
Next, set the config_file not to disable existing loggers:
76
76
77
- `` ` python
78
- if config.config_file_name is not None:
79
- fileConfig( config.config_file_name, disable_existing_loggers=False)
80
- ` ``
77
+ .. code-block :: python
78
+
79
+ if config.config_file_name is not None :
80
+ fileConfig(config.config_file_name, disable_existing_loggers = False )
81
81
82
82
Replace the content of your application's ``alembic.ini `` file with Airflow's ``alembic.ini `` copy.
83
83
0 commit comments