I used my django migrations to migrate my database. One of the migrations was data migrations. But I made a mistake: I didn't save the model). Thus, no change was applied to data. I corrected the .py file that executed the python code for the data migrations. I now want to re-execute it. Is there a way to rollback to the previous version of my database or just running
./manage.py migrate my_app 0004
with 0004 being the file that did the datamigrations does the trick?
In order to rollback I had to do the following
showmigrations
to see where I ammigrate 0003
(to go one step back)showmigrations
to verify that it worked and I am one version behindmigrate 0004
to migrate correctly