所以我想运行一个Django应用程序初始迁移,当我尝试运行迁移命令(蟒蛇manage.py迁移或makemigrations)我得到以下错误:Django的迁移关系不存在
psycopg2.ProgrammingError: relation "dotworks_server_internship" does not exist
LINE 1: ...s", "dotworks_server_internship"."questions" FROM "dotworks_...
^
我在使用Django 1.9.6的Windows环境中,我的数据库是postgres。另外,我使用PGAdmin来管理我的数据库。
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': 'dotworks',
'USER': 'postgres',
'PASSWORD': 'mypasswordgoeshere',
'HOST': 'localhost',
'PORT': '5432',
}
}
没有工作,问题似乎是表甚至没有被第一次迁移尝试创建 –