# Rolling back Rails Database migrations

I ran into a situation at work where I had to roll back Rails migrations to get my database back into a usable state.

`rails db:migrate:status` - This shows us the current status of our migrations.

| Status | Migration ID | Migration |
| --- | --- | --- |
| up | `20350319081542` | First migration |
| up | `20350419081542` | Second migration |
| up | `203504519081542` | Third migration |

`rails db:rollback` - This lets you roll back one migration at a time.

`rails db:migrate:down VERSION=20350419081542` - This rolls back this specific migration file.
