Drop constraints using cascade
This is needed when dropping a constraint used to enforce a foreign key for example.
This commit is contained in:
1 parent
7948557d03
commit
f93146919f
1 file changed
+1
-1
@@ -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)
|
||||
|
||||
|
||||
Reference in new issue
Block a user