Django, ManyToManyField - ProgrammingError: Relation Foo_bar Does Not Exist. Recognized In Migrations, Though Relation Is Never Created
In this case, 'foo_bar' is actually 'links_userprofile_favorite_feeds'. The problem is, when I go into manage.py shell: manage.py shell from django.contrib.auth.models import User
Solution 1:
Fixed.
For those with this problem in the future:
- Delete all links_* tables from the database (app was called 'links')
Delete all migrations for the 'links' app by doing:
from django.db.migrations.recorder import MigrationRecorder MigrationRecorder.Migration.objects.filter(app='links').delete()
Migrated forward with
manage.py migrate
Post a Comment for "Django, ManyToManyField - ProgrammingError: Relation Foo_bar Does Not Exist. Recognized In Migrations, Though Relation Is Never Created"