Cmd/Ctrl + K

Migrations

Migrations version database schema changes.

Create a migration

Generate a timestamped migration file for each schema change.

Migration files live in database/migrations by default.

Migration class

Implement reversible up() and down() operations in the generated migration.

Run migrations

Apply every migration that has not yet run on the configured database.

Roll back

Revert the most recently applied migration batch.

Status

Inspect which migrations have run and which are still pending.

Queue migrations

Database-backed queues need queue tables: