Getting error while syncdb django.db.utils.ProgrammingError: permission denied for relation django_migrations

≡放荡痞女 提交于 2019-12-11 10:46:39

问题


I have installed postgreSQL and psycopg2, then I created a db and user, I have granted all the permission for the user to the db and I have made all the changes in settings.py. But while I try to migrate, I am getting the error django.db.utils.ProgrammingError: permission denied for relation django_migrations

settings.py:

DATABASES = {
        'default': {
            'ENGINE': 'django.db.backends.postgresql_psycopg2', 
            'NAME': 'easyapp',
            'USER': 'krishna',
            'PASSWORD': 'sudeep',
            'HOST': 'localhost',                     
            'PORT': '',                      
        }
    }

Can anybody help me??


回答1:


try to migrate as follows

python manage.py migrate auth
python manage.py migrate


来源:https://stackoverflow.com/questions/32471976/getting-error-while-syncdb-django-db-utils-programmingerror-permission-denied-f

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