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

Syntax

php rawr migrate:status

Basic Usage

Check migration status:
php rawr migrate:status
Output:
Migration status for: sqlite

+------+------------------------------------------+-------+
| Ran? | Migration                                | Batch |
+------+------------------------------------------+-------+
| Yes  | 2026_03_08_120000_create_users_table     | 1     |
| Yes  | 2026_03_08_120500_create_posts_table     | 1     |
| Yes  | 2026_03_08_130000_add_status_to_users    | 2     |
| No   | 2026_03_08_140000_create_orders_table    | -     |
| No   | 2026_03_08_140500_create_products_table  | -     |
+------+------------------------------------------+-------+

Pending migrations: 2

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

# Pull latest code with new migrations
git pull origin main

# Check what's new
php rawr migrate:status

# See pending migrations
# Pending migrations: 3

# Run the pending migrations
php rawr migrate

# Verify everything ran
php rawr migrate:status

# All migrations should show "Yes"

Deployment Checklist

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

Check Status Locally

php rawr migrate:status
Verify no pending migrations exist locally
2

Deploy Code

Push your code to production server
3

Check Status on Server

ssh production
cd /var/www/app
php rawr migrate:status
See which migrations need to run
4

Run Migrations

php rawr migrate
Execute pending migrations
5

Verify Success

php rawr migrate:status
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
DB_CONNECTION=sqlite
DB_DATABASE=database/database.sqlite
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