operations.txt 951 B

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