Fixed -- Disabled bundled SQLite renaming atomic references on macOS 10.15.
import operator
+import platform
from django.db import transaction
from django.db.backends.base.features import BaseDatabaseFeatures
@@ -21,7 +22,6 @@ class DatabaseFeatures(BaseDatabaseFeatures):
supports_transactions = True
atomic_transactions = False
can_rollback_ddl = True
- supports_atomic_references_rename = Database.sqlite_version_info >= (3, 26, 0)
can_create_inline_fk = False
supports_paramstyle_pyformat = False
can_clone_databases = True
@@ -44,6 +44,14 @@ class DatabaseFeatures(BaseDatabaseFeatures):
supports_order_by_nulls_modifier = Database.sqlite_version_info >= (3, 30, 0)
order_by_nulls_first = True
+ @cached_property
+ def supports_atomic_references_rename(self):
+ # SQLite 3.28.0 bundled with MacOS 10.15 does not support renaming
+ # references atomically.
+ if platform.mac_ver()[0].startswith('10.15.') and Database.sqlite_version_info == (3, 28, 0):
+ return False
+ return Database.sqlite_version_info >= (3, 26, 0)
+
@cached_property
def introspected_field_types(self):
return{
