akasina9
akasina9

Reputation: 43

Django-south: "! These migrations are in the database but not on disk:"

I am trying to migrate a database, after modifying the schema in the models.py file of my app in Django. When I try to migrate using ./manage.py migrate <app-name>, it gives the following message:

! These migrations are in the database but not on disk:

As I went through the schemamigration_table and the files, I noticed that for my last schema migration, the file (which added a table and a column in another table successfully) is not present for some reason. Is there any way I could perform my migration without resetting the database?

Upvotes: 2

Views: 2885

Answers (1)

karthikr
karthikr

Reputation: 99620

Yes,

If you are absolutely confident about the migration to have already applied to the database, You can safely use the --fake option.

./manage.py migrate <app-name> --fake

This would forward the migrations to the most recent migration.

--fake: Records the migration sequence as having been applied, but doesn’t actually run it. Useful for Converting An App.

Upvotes: 2

Related Questions