22👍
I had the following error.
psycopg2.errors.InsufficientPrivilege: permission denied for table django_migrations
Granted privileges of superuser ‘postgres’ to the one I was working with.
For me, this command worked:
GRANT postgres TO <user>;
8👍
After restoring database, all tables will be owned by postgres user.
You need to do this grant:
GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO <user>;
I got the same problem and that solved.
You’ll need also to grant other privileges to Django user:
GRANT USAGE, SELECT ON ALL SEQUENCES IN SCHEMA public TO <user>;
- Pydev not recognizing python installation with django
- Pylint (pylint_django) does not work when –django-settings-module flag is specified
- How do you use Django-filter's '__in' lookup?
- Django – Dictionary update sequence element #0 has length 1; 2 is required
- Using bundle_files = 1 with py2exe is not working
- Django autoupdate user; save() got an unexpected keyword argument 'force_insert'
- Will Django be a good choice for a permissions based web-app?
Source:stackexchange.com