Django saleor postgresql hstore issue

110 views
Skip to first unread message

Asif Saif Uddin

unread,
Apr 11, 2019, 12:05:58 AM4/11/19
to Django users
facing this error even after creating hstore extension from pg shell and generated empty migrations for hstore:

 line 89, in __exit__
    raise dj_exc_value.with_traceback(traceback) from exc_value
  File "/usr/local/lib/python3.6/dist-packages/django/db/backends/utils.py", line 84, in _execute
    return self.cursor.execute(sql, params)
django.db.utils.ProgrammingError: permission denied to create extension "hstore"
HINT:  Must be superuser to create this extension.


the initial empty migration was modified to the following and regenerated. face error while migrating. created admin super user too. but still not working

# Generated by Django 2.2 on 2019-04-11 03:42

from django.db import migrations

from django.contrib.postgres.operations import HStoreExtension


class Migration(migrations.Migration):
    dependencies = [
    ]

    operations = [
        HStoreExtension(),
    ]

 db settings; saleor and postgres both user permission granted to saleor db from pg shell.
DATABASES = {
    'default': dj_database_url.config(
        default='postgres://saleor:saleor@localhost:5432/saleor',
        conn_max_age=600)}

Asif Saif Uddin

unread,
Apr 11, 2019, 12:51:40 AM4/11/19
to Django users
Reply all
Reply to author
Forward
0 new messages