summaryrefslogtreecommitdiff
path: root/django/db/backends/postgresql/schema.py
diff options
context:
space:
mode:
authorAkshesh <aksheshdoshi@gmail.com>2016-08-08 17:20:25 +0530
committerTim Graham <timograham@gmail.com>2016-08-12 18:37:03 -0400
commit6e07ec3f655073bebdf1b1dfd2303e91202e14e1 (patch)
treed62f91ee2af2a9ae218087037f76d48767ebac35 /django/db/backends/postgresql/schema.py
parent236baa0f0ec31422bc8c36b24e41112f7a564532 (diff)
downloaddjango-6e07ec3f655073bebdf1b1dfd2303e91202e14e1.tar.gz
Fixed #27030 -- Added contrib.postgres.indexes.GinIndex.
Diffstat (limited to 'django/db/backends/postgresql/schema.py')
-rw-r--r--django/db/backends/postgresql/schema.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/django/db/backends/postgresql/schema.py b/django/db/backends/postgresql/schema.py
index 16f2003196..1afb85d468 100644
--- a/django/db/backends/postgresql/schema.py
+++ b/django/db/backends/postgresql/schema.py
@@ -11,6 +11,7 @@ class DatabaseSchemaEditor(BaseDatabaseSchemaEditor):
sql_delete_sequence = "DROP SEQUENCE IF EXISTS %(sequence)s CASCADE"
sql_set_sequence_max = "SELECT setval('%(sequence)s', MAX(%(column)s)) FROM %(table)s"
+ sql_create_index = "CREATE INDEX %(name)s ON %(table)s%(using)s (%(columns)s)%(extra)s"
sql_create_varchar_index = "CREATE INDEX %(name)s ON %(table)s (%(columns)s varchar_pattern_ops)%(extra)s"
sql_create_text_index = "CREATE INDEX %(name)s ON %(table)s (%(columns)s text_pattern_ops)%(extra)s"