Migrations
Generate and apply schema changes from Articulate entity metadata.
Commands
Section titled “Commands”articulate:initcreates the migration tracking table.articulate:diffgenerates migrations from the entity/database schema diff.articulate:migrateruns pending migrations.
Configuration
Section titled “Configuration”parameters: articulate_entities_path: 'src' articulate_migrations_path: '%env(resolve:ARTICULATE_MIGRATIONS_PATH)%' articulate_migrations_namespace: 'App\Migrations'Keep driver-specific migrations in separate folders (e.g. migrations/mysql and migrations/pgsql) and set ARTICULATE_MIGRATIONS_PATH to the active one.
Clean database workflow
Section titled “Clean database workflow”- Start services:
docker compose up -d. - Run
articulate:init. - Run
articulate:migrate.
If migrations are already checked in, articulate:diff isn’t required from a clean checkout. Run articulate:diff when you change entity metadata and want Articulate to generate new migration files from the schema difference. From a clean database, the first diff can generate migrations for all mapped entity tables — later diffs should only contain the delta.
Transactional migrations
Section titled “Transactional migrations”Migrations run inside a transaction by default. Override isTransactional() when a migration contains database operations that must run outside a transaction, such as PostgreSQL CREATE INDEX CONCURRENTLY.
protected function isTransactional(): bool{ return false;}