diff --git a/django/db/backends/sqlite3/schema.py b/django/db/backends/sqlite3/schema.py index edc128fca2..1a4b94fa82 100644 --- a/django/db/backends/sqlite3/schema.py +++ b/django/db/backends/sqlite3/schema.py @@ -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):