Setting up the database

Airflow requires a database. If you're just experimenting and learning Airflow, you can stick with the default SQLite option. If you don't want to use SQLite, then take a look at Set up a Database Backend to setup a different database.

Usually, you need to run airflow db upgrade in order to create the database schema that Airflow can use.

Similarly, upgrading Airflow usually requires an extra step of upgrading the database. This is done with airflow db upgrade CLI command. You should make sure that Airflow components are not running while the upgrade is being executed.

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

Was this entry helpful?