Drop constraints using cascade

This is needed when dropping a constraint used to enforce a foreign key for
example.
This commit is contained in:
Cédric Krier committed 2024-11-20 11:17:15 +01:00
1 parent 7948557d03
commit f93146919f
1 file changed
+1 -1
+1 -1
View File
@@ -524,7 +524,7 @@ class TableHandler(TableHandlerInterface):
return
cursor = Transaction().connection.cursor()
cursor.execute(
SQL('ALTER TABLE {} DROP CONSTRAINT {}').format(
SQL('ALTER TABLE {} DROP CONSTRAINT {} CASCADE').format(
Identifier(self.table_name), Identifier(ident)))
self._update_definitions(constraints=True)