I have a Django project running on Heroku, every time an action is carried out, I get a looong series of errors like this, all pointing back to the same cause:
ERROR:django.request:Internal Server Error: /event/
Traceback (most recent call last):
File "/app/.heroku/python/lib/python3.6/site-packages/django/db/backends/utils.py", line 85, in _execute
return self.cursor.execute(sql, params)
psycopg2.ProgrammingError: permission denied for relation django_session
The URL /event/
does not exist on my project, nor is it referenced anywhere in it, the only database associated with it is as follows:
DATABASES = {"default": dj_database_url.config()}
How can I fix this through Heroku? I tried the online console with some basic psql command, but all I got was this response
psql: could not connect to server: No such file or directory
EDIT: I tried this line from another question but got this response:
heroku pg:psql default -c "GRANT ALL ON ALL TABLES IN SCHEMA public to admin;" --remote master
▸ Unknown database: default. Valid options are: DATABASE_URL
EDIT2: Using this response with heroku-data-explorer I managed to fix my issue, but for future reference, if someone knows of a more robust way of accessing the heroku databases, that'd be great