Database Migrations
Autentico uses explicit, versioned schema migrations. Migrations are applied automatically on startup by default — in most cases, you don’t need to do anything.
How versioning works
Section titled “How versioning works”Autentico uses SQLite’s built-in PRAGMA user_version to track the current schema version. Each release that changes the schema increments this version. On startup, the binary compares the database version against the version it expects and applies any pending migrations.
Fresh databases are automatically stamped with the current version on first start — no action needed.
Upgrading
Section titled “Upgrading”By default, autentico start applies pending migrations automatically. Just deploy the new binary or image and restart:
# Binaryautentico start
# Docker Composedocker compose pulldocker compose up -dManual migrations
Section titled “Manual migrations”If you prefer to review and apply migrations manually, start with --no-auto-migrate:
autentico start --no-auto-migrateThe server will refuse to start if the database is behind, showing:
database is at version 1, this binary requires version 2 — run: autentico migrateThen run the interactive migration command:
autentico migrateThis shows the current and target versions, warns about irreversibility, and asks you to type the target version number to confirm. Type anything else to cancel.
Already up to date
Section titled “Already up to date”If you run autentico migrate and the database is already at the latest version:
Already up to date.No changes are made.