SQL#
Canaille can use any database supported by SQLAlchemy, such as sqlite or postgresql.
Configuration#
It is used when the CANAILLE_SQL configuration parameter is defined. For instance:
config.toml#
[CANAILLE_SQL]
SQL_DATABASE_URI = "postgresql://user:password@localhost/database"
You can find more details on the SQL configuration in the dedicated section.
Migrations#
By default, migrations are applied when you run the web application.
You can disable this behavior with the AUTO_MIGRATE setting.
Migrations are not automatically applied with the use of the CLI though.
Migrations are done with flask-alembic, that provides a dedicated CLI to manually tune migrations.
You can check the flask-alembic documentation and the canaille db command line if you are in trouble.