mirror of
https://github.com/django/django.git
synced 2025-11-02 21:03:53 +00:00
Refs #30033 -- Checked constraints before committing SQLite schema changes.
This order of operations is more in line with SQLite's documented table rebuild procedure and ensures that changes aren't committed if foreign key integrity is broken.
This commit is contained in:
parent
6b9bd0933e
commit
790d108c97
1 changed files with 1 additions and 1 deletions
|
|
@ -30,8 +30,8 @@ class DatabaseSchemaEditor(BaseDatabaseSchemaEditor):
|
|||
return super().__enter__()
|
||||
|
||||
def __exit__(self, exc_type, exc_value, traceback):
|
||||
super().__exit__(exc_type, exc_value, traceback)
|
||||
self.connection.check_constraints()
|
||||
super().__exit__(exc_type, exc_value, traceback)
|
||||
self.connection.enable_constraint_checking()
|
||||
|
||||
def quote_value(self, value):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue