#24645 closed Cleanup/optimization (fixed)
django.db.utils.ProgrammingError: type "hstore" does not exist
Reported by: | Zhang Lei | Owned by: | nobody |
---|---|---|---|
Component: | Documentation | Version: | 1.8 |
Severity: | Normal | Keywords: | type "hstore" does not exist |
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
I'm using new database field 'HStoreField' in my project, my psycopg2 is 2.6 and postgresql is 9.4.11 with postgres.app. When I using python manage.py migrate
, it raise a 'django.db.utils.ProgrammingError' which says django.db.utils.ProgrammingError: type "hstore" does not exist. I have added 'django.contrib.postgres' in my settings.INSTALLED_APPS. I have used ArrayField() with base_field 'CharField' is ok. Only when I using HStoreField, there is error.
Attachments (1)
Change History (9)
comment:1 by , 10 years ago
Component: | contrib.postgres → Documentation |
---|---|
Owner: | set to |
Triage Stage: | Unreviewed → Accepted |
Type: | Uncategorized → Cleanup/optimization |
by , 10 years ago
Attachment: | 24645.diff added |
---|
comment:2 by , 10 years ago
Has patch: | set |
---|
comment:3 by , 10 years ago
Do you mind tell me how to use django.contrib.postgres.operations.HStoreExtension? I have create extension hstore
manually in my psql command line. But I have encounter the same problem when I test my project.
Thank you very much.
comment:4 by , 10 years ago
Ok, I have figured this out. Create a empty migration file and use HStoreExtension. Thank you all the same. please close this ticket or other. Thank you.
comment:5 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:6 by , 10 years ago
Resolution: | fixed |
---|---|
Status: | closed → new |
Triage Stage: | Accepted → Ready for checkin |
Let's wait for the documentation complement before closing the bug.
You need to create the hstore extension. I ran into this too and will submit a documentation patch.