MigrationSchemaMissing(Unable to create the django_migrations table (%s) % exc)

北慕城南 提交于 2020-01-10 04:09:10

问题


Steps I did: 1. Deleted migration files. 2.created only one initial migration file. 3. Enter psql command prompt. Connect to database. drop schema public cascade; create schema public; 4.tried to migrate again.

I get MigrationSchemaMissing(Unable to create the django_migrations table (%s) % exc) Error.


回答1:


This answer and the comment on its question works for me, in brief you must get required grant for a schema as below:

grant usage on schema public to username;
grant create on schema public to username;


来源:https://stackoverflow.com/questions/36691932/migrationschemamissingunable-to-create-the-django-migrations-table-s-exc

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!