fredley
fredley

Reputation: 33891

Botched Migration: Table already deleted

I'm not sure what went wrong, but I have a migration to remove a model (database table). The table has been removed, but South does not think the migration has been applied, so when I migrate it tries to remove it, and fails, halting further migrations.

What should I do?

Upvotes: 1

Views: 70

Answers (1)

fredley
fredley

Reputation: 33891

All you need to do to fix this kind of inconsistency is run the migration with --fake:

./manage.py migrate app --fake

From the docs:

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

Upvotes: 1

Related Questions