Skip to content

Instance Method

deleteForeignKey(name:)

Delete a FOREIGN KEY constraint with the given name.
@discardableResult func deleteForeignKey(name: String) -> Self

Discussion

This method allows correctly handling referential constraints with custom names when using MySQL 5.7 without being forced to also know the full definition of the constraint at the time of deletion. See namedForeignKey(_:) for a more complete discussion.