operations.txt 1005 B

123456789101112131415161718192021222324252627282930313233343536
  1. =============================
  2. Database migration operations
  3. =============================
  4. All of these :doc:`operations </ref/migration-operations>` are available from
  5. the ``django.contrib.postgres.operations`` module.
  6. .. currentmodule:: django.contrib.postgres.operations
  7. ``CreateExtension``
  8. ===================
  9. .. class:: CreateExtension(name)
  10. An ``Operation`` subclass which installs PostgreSQL extensions.
  11. .. attribute:: name
  12. This is a required argument. The name of the extension to be installed.
  13. ``HStoreExtension``
  14. ===================
  15. .. class:: HStoreExtension()
  16. A subclass of :class:`~django.contrib.postgres.operations.CreateExtension`
  17. which will install the ``hstore`` extension and also immediately set up the
  18. connection to interpret hstore data.
  19. ``UnaccentExtension``
  20. =====================
  21. .. class:: UnaccentExtension()
  22. A subclass of :class:`~django.contrib.postgres.operations.CreateExtension`
  23. which will install the ``unaccent`` extension.