Skip to content

Instantly share code, notes, and snippets.

@jhrr
Last active August 29, 2015 14:02
Show Gist options
  • Save jhrr/9928200cd05df4f951e1 to your computer and use it in GitHub Desktop.
Save jhrr/9928200cd05df4f951e1 to your computer and use it in GitHub Desktop.
hstore install issue

Error:

"hstore type not found in the database. "
django.db.utils.ProgrammingError: hstore type not found in the database. 
please install it from your 'contrib/hstore.sql' file

Fatal error: local() encountered an error (return code 1) while 
executing 'python manage.py syncdb --noinput'

Solution:

Rather than manually install hstore in the application databases, you can install hstore in the template1 database. Postgres copies this database when creating a new one, so every new database will have hstore installed by default.

psql template1 -c 'create extension hstore;'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment