Kaydet (Commit) 790d108c authored tarafından Simon Charette's avatar Simon Charette Kaydeden (comit) Tim Graham

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.
üst 6b9bd093
......@@ -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):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment