mirror of https://github.com/django/django.git
Fixed #31765 -- Disabled bundled SQLite renaming atomic references on macOS 10.15.
This commit is contained in:
parent
ff55adbd0d
commit
80a8be03d9
|
@ -1,4 +1,5 @@
|
||||||
import operator
|
import operator
|
||||||
|
import platform
|
||||||
|
|
||||||
from django.db import transaction
|
from django.db import transaction
|
||||||
from django.db.backends.base.features import BaseDatabaseFeatures
|
from django.db.backends.base.features import BaseDatabaseFeatures
|
||||||
|
@ -21,7 +22,6 @@ class DatabaseFeatures(BaseDatabaseFeatures):
|
||||||
supports_transactions = True
|
supports_transactions = True
|
||||||
atomic_transactions = False
|
atomic_transactions = False
|
||||||
can_rollback_ddl = True
|
can_rollback_ddl = True
|
||||||
supports_atomic_references_rename = Database.sqlite_version_info >= (3, 26, 0)
|
|
||||||
can_create_inline_fk = False
|
can_create_inline_fk = False
|
||||||
supports_paramstyle_pyformat = False
|
supports_paramstyle_pyformat = False
|
||||||
can_clone_databases = True
|
can_clone_databases = True
|
||||||
|
@ -44,6 +44,14 @@ class DatabaseFeatures(BaseDatabaseFeatures):
|
||||||
supports_order_by_nulls_modifier = Database.sqlite_version_info >= (3, 30, 0)
|
supports_order_by_nulls_modifier = Database.sqlite_version_info >= (3, 30, 0)
|
||||||
order_by_nulls_first = True
|
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
|
@cached_property
|
||||||
def introspected_field_types(self):
|
def introspected_field_types(self):
|
||||||
return{
|
return{
|
||||||
|
|
Loading…
Reference in New Issue