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 6048db2 commit fd43b29Copy full SHA for fd43b29
mssql/schema.py
@@ -80,7 +80,7 @@ class DatabaseSchemaEditor(BaseDatabaseSchemaEditor):
80
@sql_drop_constraint = 'ALTER TABLE [' + OBJECT_NAME(parent_object_id) + '] ' +
81
'DROP CONSTRAINT [' + @sql_froeign_constraint_name + '] '
82
FROM sys.foreign_keys
83
- WHERE referenced_object_id = object_id('%(table)s')
+ WHERE referenced_object_id = object_id('%(table)s') and name = @sql_froeign_constraint_name
84
exec sp_executesql @sql_drop_constraint
85
END
86
DROP TABLE %(table)s
0 commit comments