Reputation: 1
The following error occurs while doing manage.py migrate.
psycopg2.errors.UndefinedTable: relation "relation_name" does not exist ... ... ... django.db.utils.ProgrammingError: relation "relation_name" does not exist
Happened when I tried to set up a copy of my project elsewhere. Yes, I have installed all the dependencies.
Upvotes: -1
Views: 183
Reputation: 1
Error caused by missing migrations folder. Steps:
Create a folder 'migrations' in the app folder. eg: if you have app called students, create it inside that folder.
Create 'init.py' This is critical as django won't look inside folders without the init file.
Now perform makemigrations and migrate.
Note: If you have more than one app, create this folder inside every app.
This fixed it for me. Hope it helps someone out there as well.
Upvotes: 0