mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
[1.5.x] Created special PostgreSQL text indexes when unique is True
Refs #19441.
Backport of c698c55966 from master.
This commit is contained in:
@@ -42,7 +42,7 @@ class DatabaseCreation(BaseDatabaseCreation):
|
||||
|
||||
def sql_indexes_for_field(self, model, f, style):
|
||||
output = []
|
||||
if f.db_index:
|
||||
if f.db_index or f.unique:
|
||||
qn = self.connection.ops.quote_name
|
||||
db_table = model._meta.db_table
|
||||
tablespace = f.db_tablespace or model._meta.db_tablespace
|
||||
|
||||
Reference in New Issue
Block a user