diff --git a/django/db/backends/ado_mssql/base.py b/django/db/backends/ado_mssql/base.py index 8845f0f79b..8cc01862fd 100644 --- a/django/db/backends/ado_mssql/base.py +++ b/django/db/backends/ado_mssql/base.py @@ -90,7 +90,7 @@ class DatabaseWrapper(local): allows_group_by_ordinal = True allows_unique_and_pk = True -autoindexes_primary_keys = False +autoindexes_primary_keys = True needs_datetime_string_cast = True needs_upper_for_iops = False supports_constraints = True diff --git a/django/db/backends/postgresql/base.py b/django/db/backends/postgresql/base.py index 741d3a3c8c..3abd6d3a49 100644 --- a/django/db/backends/postgresql/base.py +++ b/django/db/backends/postgresql/base.py @@ -106,7 +106,7 @@ class DatabaseWrapper(local): allows_group_by_ordinal = True allows_unique_and_pk = True -autoindexes_primary_keys = False +autoindexes_primary_keys = True needs_datetime_string_cast = True needs_upper_for_iops = False supports_constraints = True diff --git a/django/db/backends/postgresql_psycopg2/base.py b/django/db/backends/postgresql_psycopg2/base.py index 22fcfeac67..9e846304ce 100644 --- a/django/db/backends/postgresql_psycopg2/base.py +++ b/django/db/backends/postgresql_psycopg2/base.py @@ -74,7 +74,7 @@ class DatabaseWrapper(local): allows_group_by_ordinal = True allows_unique_and_pk = True -autoindexes_primary_keys = False +autoindexes_primary_keys = True needs_datetime_string_cast = False needs_upper_for_iops = False supports_constraints = True diff --git a/django/db/backends/sqlite3/base.py b/django/db/backends/sqlite3/base.py index bd829f23a1..abd32a28d0 100644 --- a/django/db/backends/sqlite3/base.py +++ b/django/db/backends/sqlite3/base.py @@ -101,7 +101,7 @@ class SQLiteCursorWrapper(Database.Cursor): allows_group_by_ordinal = True allows_unique_and_pk = True -autoindexes_primary_keys = False +autoindexes_primary_keys = True needs_datetime_string_cast = True needs_upper_for_iops = False supports_constraints = False