Skip to content

Commit 64fef7c

Browse files
committed
import backend-related changes from Django-1.10.4
1 parent adc5d88 commit 64fef7c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sql_server/pyodbc/schema.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ def add_field(self, model, field):
461461
}
462462
self.execute(sql)
463463
# Add an index, if required
464-
if field.db_index and not field.unique:
464+
if self._field_should_be_indexed(model, field):
465465
self.deferred_sql.append(self._create_index_sql(model, [field]))
466466
# Add any FK constraints later
467467
if field.remote_field and self.connection.features.supports_foreign_keys and field.db_constraint:

0 commit comments

Comments
 (0)