Skip to content
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

Merged
merged 1 commit into from
Dec 17, 2018

Conversation

charettes
Copy link
Member

Contains eb5dd93 which is also part of #10744.

Copy link
Member

@carltongibson carltongibson left a 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!

@@ -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)
Copy link
Member

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
Copy link
Member

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.

@charettes charettes deleted the ticket-28670 branch December 20, 2018 16:22
@charettes
Copy link
Member Author

@timgraham both changes make sense, I blindly copy pasted the version_info 🤦‍♂️

Would you like me to submit a PR or are you planning to tackle it?

@timgraham
Copy link
Member

Please go ahead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants