Database migration operations
Database migration operations
All of these operations are available from the django.contrib.postgres.operations
module.
Creating extension using migrations
You can create a PostgreSQL extension in your database using a migration file. This example creates an hstore extension, but the same principles apply for other extensions.
Set up the hstore extension in PostgreSQL before the first CreateModel
or AddField
operation that involves HStoreField
by adding a