Skip to main content
The migrate:status command displays which migrations have been run and which are pending.

Syntax

Basic Usage

Check migration status:
Output:

Understanding the Output

The status table shows:
  • Ran? - Whether the migration has been executed (Yes/No)
  • Migration - The migration file name (timestamp and description)
  • Batch - The batch number when it was run (or - if pending)

Use Cases

Check Before Deploy

Verify which migrations will run in production

Debug Issues

Identify missing or failed migrations

Team Coordination

See what migrations teammates have added

Environment Sync

Compare migration state across environments

Migration States

Ran Migrations

Migrations marked “Yes” have been successfully executed and recorded in the migrations table. These will not run again when you execute php rawr migrate.

Pending Migrations

Migrations marked “No” are pending and will be executed the next time you run php rawr migrate. All pending migrations will run in a single batch.

Common Workflow

Deployment Checklist

Use migrate:status as part of your deployment workflow:
1

Check Status Locally

Verify no pending migrations exist locally
2

Deploy Code

Push your code to production server
3

Check Status on Server

See which migrations need to run
4

Run Migrations

Execute pending migrations
5

Verify Success

Confirm all migrations ran successfully

Troubleshooting

Your migrations table may be out of sync. Check the database/migrations/ directory and ensure all recorded migrations exist as files.
The migration may have failed partway through. Check the migrations table in your database to see if it was recorded. You may need to manually rollback or complete the migration.
Ensure all migration files are committed to version control. Use git log database/migrations/ to see migration file history and sync across environments.

Database Configuration

The command uses your .env database configuration:
.env
The status command works with all supported databases:
  • SQLite
  • PostgreSQL
  • MySQL
  • MariaDB

See Also

migrate

Run pending migrations

migrate:rollback

Rollback last batch

make:migration

Create new migrations

Migration System

Learn about migrations