migrate:status command displays which migrations have been run and which are pending.
Syntax
Basic Usage
Check migration status: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 themigrations 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 runphp rawr migrate. All pending migrations will run in a single batch.
Common Workflow
Deployment Checklist
Usemigrate:status as part of your deployment workflow:
Troubleshooting
Migrations show as pending but files don't exist
Migrations show as pending but files don't exist
Your
migrations table may be out of sync. Check the database/migrations/ directory and ensure all recorded migrations exist as files.Migration ran but shows as pending
Migration ran but shows as pending
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.Different status between environments
Different status between environments
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
- 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