-
-
Notifications
You must be signed in to change notification settings - Fork 31.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed #29928 -- Enabled deferred constraint checks on SQLite 3.20+. #10752
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, yep. Great. (I will rebase when merging eb5dd93)
Thanks for the effort!
Refs django#11665, django#14204. Thanks Michel Samia for the report.
985c043
to
3aaf5bd
Compare
@@ -38,6 +38,9 @@ class DatabaseFeatures(BaseDatabaseFeatures): | |||
# Is "ALTER TABLE ... RENAME COLUMN" supported? | |||
can_alter_table_rename_column = Database.sqlite_version_info >= (3, 25, 0) | |||
supports_parentheses_in_compound = False | |||
# Deferred constraint checks can be emulated on SQLite < 3.20 but not in a | |||
# reasonably performant way. | |||
can_defer_constraint_checks = Database.version_info >= (3, 20, 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this supposed to be sqlite_version_info
rather than version_info
? I guess other usages in this file might be incorrect also.
@@ -265,6 +265,11 @@ Tests | |||
* The new :setting:`ORACLE_MANAGED_FILES <TEST_ORACLE_MANAGED_FILES>` test | |||
database setting allows using Oracle Managed Files (OMF) tablespaces. | |||
|
|||
* Deferrable database constraints are now checked at the end of each | |||
:class:`~django.test.TestCase` test on SQLite 3.20+ as well. These checks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you could drop "as well" (or at least clarify what "as well" refers to). I believe the meaning is that these checks are already performed on other databases.
In fcd08c1, this was also mentioned as a backwards incompatible change.
@timgraham both changes make sense, I blindly copy pasted the Would you like me to submit a PR or are you planning to tackle it? |
Please go ahead. |
Contains eb5dd93 which is also part of #10744.