Setting up the database — Airflow Documentation (2024)

Apache Airflow™ requires a database. If you’re just experimenting and learning Airflow, you can stick with thedefault SQLite option. If you don’t want to use SQLite, then take a look atSet up a Database Backend to setup a different database.

Usually, you need to run airflow db migrate in order to create the database schema if it does not existor migrate to the latest version if it does. You should make sure that Airflow components arenot running while the database migration is being executed.

Note

Prior to Airflow version 2.7.0, airflow db upgrade was used to apply migrations,however, it has been deprecated in favor of airflow db migrate.

In some deployments, such as Helm Chart for Apache Airflow, both initializing and running the database migrationis executed automatically when Airflow is upgraded.

Sometimes, after the upgrade, you are also supposed to do some post-migration actions.See Upgrading Airflow™ to a newer version for more details about upgrading and doing post-migration actions.

Setting up the database — Airflow Documentation (2024)
Top Articles
Latest Posts
Article information

Author: Mrs. Angelic Larkin

Last Updated:

Views: 6029

Rating: 4.7 / 5 (67 voted)

Reviews: 82% of readers found this page helpful

Author information

Name: Mrs. Angelic Larkin

Birthday: 1992-06-28

Address: Apt. 413 8275 Mueller Overpass, South Magnolia, IA 99527-6023

Phone: +6824704719725

Job: District Real-Estate Facilitator

Hobby: Letterboxing, Vacation, Poi, Homebrewing, Mountain biking, Slacklining, Cabaret

Introduction: My name is Mrs. Angelic Larkin, I am a cute, charming, funny, determined, inexpensive, joyous, cheerful person who loves writing and wants to share my knowledge and understanding with you.