Remove migration from southern migration history

I have an application called "robots" and I'm using version 0.9

Later I find out that 0.9 has a function that I don't want and is downgraded to 0.8

After some time, I try to perform south migration in my project and encounter the south.exceptions.NoMigrations: Application '<module 'robots' from '/home/ubuntu/virtualenvs/codingqna/local/lib/python2.7/site-packages/robots/__init__.pyc'>' has no migrations.

I think 0.9 had a migration file, but 0.8 didn't, and the south complains about it.

How to remove it from southern history, as it never existed? (for example, I used 0.8 from the very beginning without migration files)

Or in any other way that I can use here?

+4
source share
1 answer
 delete from south_migrationhistory where app_name='robots'; 

the south_migrationhistory table simply keeps track of which migrations have been applied and what remains to be applied. Since 0.8 robots do not have migration files, any entries for it from the south_migrationhistory table can be deleted, and this will not affect anything.

+1
source

Source: https://habr.com/ru/post/1490832/


All Articles