Schema Migrations
Astris uses Alembic under the hood, with seamless integration managed by the Orbit CLI.
Automatic Migration Setup
When you create a project, Astris automatically initializes Alembic and sets up:
alembic.ini: Migration configuration.database/migrations/env.py: Auto-configured migration environment.database/migrations/versions/: Directory containing revision scripts.
Running Migrations (orbit migrate)
To apply all pending database migrations:
uv run orbit migrateCreating Migrations (orbit make:migration)
When you create or update a SQLModel table, generate an auto-detected migration revision with:
uv run orbit make:migration "create articles table"Alembic will inspect your SQLModel models, compare them to the current database state, and generate a new version file in database/migrations/versions/.
Powered by Alembic
Because Astris generates standard Alembic revision files, all advanced migration features (such as data migrations, custom downgrade logic, and manual schema operations) are fully supported.
Visit the official Alembic Documentation to learn more about advanced migration capabilities.
Next Steps
- Add authentication: Authentication Starter Kit.
- Secure routes with guards: Auth Guards & Dependencies.