We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 33b4e23 commit 06417e8Copy full SHA for 06417e8
mssql/base.py
@@ -489,12 +489,12 @@ def check_constraints(self, table_names=None):
489
490
def disable_constraint_checking(self):
491
if not self.needs_rollback:
492
- self.cursor().execute('EXEC sp_msforeachtable "ALTER TABLE ? NOCHECK CONSTRAINT ALL"')
+ self._execute_foreach('ALTER TABLE %s NOCHECK CONSTRAINT ALL')
493
return not self.needs_rollback
494
495
def enable_constraint_checking(self):
496
497
- self.cursor().execute('EXEC sp_msforeachtable "ALTER TABLE ? WITH NOCHECK CHECK CONSTRAINT ALL"')
+ self._execute_foreach('ALTER TABLE %s WITH NOCHECK CHECK CONSTRAINT ALL')
498
499
500
class CursorWrapper(object):
0 commit comments