2016-01-03 10:56:22 +00:00
|
|
|
=============================
|
2014-03-14 17:34:49 +00:00
|
|
|
Database migration operations
|
|
|
|
=============================
|
|
|
|
|
|
|
|
All of these :doc:`operations </ref/migration-operations>` are available from
|
|
|
|
the ``django.contrib.postgres.operations`` module.
|
|
|
|
|
|
|
|
.. currentmodule:: django.contrib.postgres.operations
|
|
|
|
|
2016-01-24 21:26:11 +00:00
|
|
|
``CreateExtension``
|
|
|
|
===================
|
2014-03-14 17:34:49 +00:00
|
|
|
|
|
|
|
.. class:: CreateExtension(name)
|
|
|
|
|
|
|
|
An ``Operation`` subclass which installs PostgreSQL extensions.
|
|
|
|
|
|
|
|
.. attribute:: name
|
|
|
|
|
|
|
|
This is a required argument. The name of the extension to be installed.
|
|
|
|
|
2016-01-24 21:26:11 +00:00
|
|
|
``HStoreExtension``
|
|
|
|
===================
|
2014-03-14 17:34:49 +00:00
|
|
|
|
|
|
|
.. class:: HStoreExtension()
|
|
|
|
|
|
|
|
A subclass of :class:`~django.contrib.postgres.operations.CreateExtension`
|
|
|
|
which will install the ``hstore`` extension and also immediately set up the
|
|
|
|
connection to interpret hstore data.
|
2014-09-05 20:53:11 +00:00
|
|
|
|
2015-06-05 16:37:48 +00:00
|
|
|
``TrigramExtension``
|
|
|
|
====================
|
|
|
|
|
|
|
|
.. class:: TrigramExtension()
|
|
|
|
|
|
|
|
.. versionadded:: 1.10
|
|
|
|
|
|
|
|
A subclass of :class:`~django.contrib.postgres.operations.CreateExtension`
|
|
|
|
that installs the ``pg_trgm`` extension.
|
|
|
|
|
2016-01-24 21:26:11 +00:00
|
|
|
``UnaccentExtension``
|
|
|
|
=====================
|
2014-09-05 20:53:11 +00:00
|
|
|
|
|
|
|
.. class:: UnaccentExtension()
|
|
|
|
|
|
|
|
A subclass of :class:`~django.contrib.postgres.operations.CreateExtension`
|
|
|
|
which will install the ``unaccent`` extension.
|