samedi 9 mai 2015

After I ran rake db:migrate VERSION=0 and redid the migration, I lost everything in my database

Before I was trying to run rake db:migrate I ran into an error called column duplication so I ran rake db:migrate VERSION=0 instead and ran rake db:migrate again.

Basically I was clearing up my previous migration and by running a new migration from VERSION=0, I was finally able to finish my pending migration and had no issue with column duplication again.

But here's the thing, the command I ran actually cleared up all my previous data. Is there a way to retrieve what I had lost? And what is the safest way to run db:migrate if there's a column duplication error. I really don't want to go back to VERSION=0

Aucun commentaire:

Enregistrer un commentaire