Aureline
Migrations

Migration Overview

Snapshot-based migration generation and apply behavior.

Aureline migrations are generated by comparing the current schema with the previous migration snapshot. They are not live-database diffs.

Generated layout

migrations/{idx:04}_{name}/migration.surql
migrations/{idx:04}_{name}/down.surql
migrations/meta/{idx:04}_snapshot.json
migrations/migration_lock.toml
migrations/meta/_journal.json

Generate flow

aureline migrate diff
aureline migrate generate --name init

The snapshot captures the schema state for the next diff. The journal records generated migrations and checksums.

Apply flow

aureline migrate apply --dry-run
aureline migrate apply

Apply verifies checksums, skips already-applied migrations, and records successful migrations in _aureline_migrations.

Destructive changes

Potentially destructive operations are blocked during apply unless --allow-destructive is provided. Review generated migration.surql and down.surql before applying.

Rename limitation

Renames are currently represented as remove/create changes. If you rename a table, field, or index, inspect the generated migration carefully.

On this page