Reference for Database Migrations¶
Here’s the list of all the Database Migrations that are executed via when you run airflow db upgrade
.
Warning
Those migration details are mostly used here to make the users aware when and what kind of migrations will be executed during migrations between specific Airflow versions. The intention here is that the “DB conscious” users might perform an analysis on the migrations and draw conclusions about the impact of the migrations on their Airflow database. Those users might also want to take a look at the ERD Schema of the Database document to understand how the internal DB of Airflow structure looks like. However, you should be aware that the structure is internal and you should not access the DB directly to retrieve or modify any data - you should use the REST API to do that instead.
Revision ID |
Revises ID |
Airflow Version |
Description |
---|---|---|---|
|
|
|
Increase length of user identifier columns in |
|
|
|
add dttm index on log table |
|
|
|
Add is_orphaned to DatasetModel |
|
|
|
Add DagRunNote and TaskInstanceNote |
|
|
|
Add updated_at column to DagRun and TaskInstance |
|
|
|
Add case-insensitive unique constraint for username |
|
|
|
Add missing auto-increment to columns on FAB tables |
|
|
|
Add processor_subdir column to DagModel, SerializedDagModel and CallbackRequest tables. |
|
|
|
add dag_owner_attributes table |
|
|
|
Remove smart sensors |
|
|
|
Add Dataset model |
|
|
|
compare types between ORM and DB. |
|
|
|
Add DagWarning model |
|
|
|
Add indexes for CASCADE deletes on task_instance |
|
|
|
Add cascade to dag_tag foreign key |
|
|
|
Add index for |
|
|
|
Update dag.default_view to grid. |
|
|
|
Add map_index to Log. |
|
|
|
Update migration for FAB tables to add missing constraints |
|
|
|
Add map_index to TaskFail |
|
|
|
Migrate RTIF to use run_id and map_index |
|
|
|
add callback request table |
|
|
|
Switch XCom table to use |
|
|
|
add data_compressed to serialized_dag |
|
|
|
Add |
|
|
|
Add |
|
|
|
Add |
|
|
|
Increase length of email and username in |
|
|
|
Add index for |
|
|
|
Create a |
|
|
|
Add has_import_errors column to DagModel |
|
|
|
Change |
|
|
|
Add data_interval_[start|end] to DagModel and DagRun. |
|
|
|
Adds |
|
|
|
Rename |
|
|
|
Make XCom primary key columns non-nullable |
|
|
|
Improve MSSQL compatibility |
|
|
|
Add index on state, dag_id for queued |
|
|
|
Add |
|
|
|
Add |
|
|
|
Resource based permissions for default |
|
|
|
Add description field to |
|
|
|
Increase maximum length of pool name in |
|
|
|
Rename |
|
|
|
Change default |
|
|
|
Increase size of |
|
|
|
Remove |
|
|
|
Change field in |
|
|
|
Fix description field in |
|
|
|
Add description field to |
|
|
|
Resource based permissions. |
|
|
|
Prefix DAG permissions. |
|
|
|
add-k8s-yaml-to-rendered-templates |
|
|
|
Add |
|
|
|
fix_mssql_exec_date_rendered_task_instance_fields_for_MSSQL |
|
|
|
Add |
|
|
|
Drop |
|
|
|
Add external executor ID to TI |
|
|
|
Add queued by Job ID to TI |
|
|
|
Add |
|
|
|
Add unique constraint to |
|
|
|
Set |
|
|
|
Add |
|
|
|
Increase length of pool name |
|
|
|
Remove id column from xcom |
|
|
|
Drop |
|
|
|
Increase length of |
|
|
|
Create FAB Tables |
|
|
|
Add |
|
|
|
Add Precision to |
|
|
|
Add |
|
|
|
Add |
|
|
|
Add |
|
|
|
Add |
|
|
|
Increase length for connection password |
|
|
|
Straighten out the migrations |
|
|
|
Remove |
|
|
|
Increase queue name size limit |
|
|
|
change datetime to datetime2(6) on MSSQL tables. |
|
|
|
Add |
|
|
|
Add |
|
|
|
Make |
|
|
|
task reschedule foreign key on cascade delete |
|
|
|
Add schedule interval to dag |
|
|
|
Add |
|
|
|
Add superuser field |
|
|
|
Merge migrations Heads. |
|
|
|
Add |
|
|
|
Add index to |
|
|
|
Add index on |
|
|
|
Create index on |
|
|
|
Fix Sqlite foreign key |
|
|
|
Fix MySQL not null constraint |
|
|
|
Merge migrations Heads |
|
|
|
Add kubernetes scheduler uniqueness |
|
|
|
Add |
|
|
|
Add Kubernetes resource check-pointing |
|
|
|
Add time zone awareness |
|
|
|
Increase text size for MySQL (not relevant for other DBs’ text types) |
|
|
|
Create index on |
|
|
|
Make xcom value column a large binary |
|
|
|
Add |
|
|
|
Add |
|
|
|
Add |
|
|
|
Add indices on |
|
|
|
Add fractional seconds to MySQL tables |
|
|
|
Add |
|
|
|
Add |
|
|
|
Add TI state index |
|
|
|
Rename user table |
|
|
|
Add |
|
|
|
Add a column to track the encryption state of the ‘Extra’ field in connection |
|
|
|
Add |
|
|
|
Add |
|
|
|
Add |
|
|
|
Add |
|
|
|
Change |
|
|
|
Add |
|
|
|
Adding |
|
|
|
Add indices in |
|
|
|
Add |
|
|
|
Maintain history for compatibility with earlier migrations |
|
|
|
Add |
|
|
|
current schema |