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:
Simon Charette 2018-12-21 19:47:47 -05:00 committed by Tim Graham
parent 6b9bd0933e
commit 790d108c97
1 changed files with 1 additions and 1 deletions

View File

@ -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):