summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorTom Forbes <tom@tomforb.es>2020-07-21 11:42:39 +0200
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2020-07-22 09:39:55 +0200
commit80a8be03d9321669a239dbced8ac48a4ebbbb7e1 (patch)
tree4df9a6e2f8128c247558ab46a229595781c06d1f /django
parentff55adbd0da6618abaf265d16196bf54f81aa77a (diff)
Fixed #31765 -- Disabled bundled SQLite renaming atomic references on macOS 10.15.
Diffstat (limited to 'django')
-rw-r--r--django/db/backends/sqlite3/features.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/django/db/backends/sqlite3/features.py b/django/db/backends/sqlite3/features.py
index 84358838db..9e5ce4c4ae 100644
--- a/django/db/backends/sqlite3/features.py
+++ b/django/db/backends/sqlite3/features.py
@@ -1,4 +1,5 @@
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
@@ -45,6 +45,14 @@ class DatabaseFeatures(BaseDatabaseFeatures):
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{
**super().introspected_field_types,