calyxofheld
calyxofheld

Reputation: 2128

is it possible to undo rake db rollback?

I accidentally ran rake db:migrate, and then ran rake db:rollback. Now the database table I had created before is completely gone. Is there any way to undo a rollback, or should I just revert to the most recent branch?

Upvotes: 3

Views: 3887

Answers (2)

abhimanyuaryan
abhimanyuaryan

Reputation: 4014

Just an update to existing answer by @sabaeus

If rake db:migrate doesn't work for anyone, you can use rake db:migrate:redo.

rake db:migrate is to run all current migrations.

Upvotes: 3

zwippie
zwippie

Reputation: 15515

You can do a rake db:migrate to perform the same migration once again.

Upvotes: 10

Related Questions