Search code examples
ruby-on-railsrails-migrations

rails deleted migration file


I stupidly went ahead and manually deleted a migration file after having already migrated my database. Of course this brings an issue when I try to migrate my database again.

Is there anyway to recover from this? Sadly, I didn't add the migration to my git repository. I know what was in the migration, so maybe I could create it again, only I wouldn't know how to recover the timestamp.


Solution

  • Check schema_migrations table, it contains all timestamps.