mercredi 8 juin 2016

Is there a way to resolve Rails deleted migrations?

I happened to have deleted migrations and I don't want to revert these removed migrations.

This is what rake db:migrate:status produces:

 Status   Migration ID    Migration Name
------------------------------------------------------

   up     0               *********NO FILE**********
   up     20150209023430  Create users 
   up     20150320184628  ********** NO FILE **********
   up     20150322004817  Add roles to users
   up     20150403190042  ********** NO FILE **********

rake db:migrate and rake db:rollback commands won't work because of the missing files.

I have no intentions to lose my data, so I don't want to use rake db:drop or rake db:reset.

What can I do to be able to perform migrate and rollback and how to get rid of the missing files?

Aucun commentaire:

Enregistrer un commentaire