Skip to content

1.44.0 - Fully work around MySQL 5.7's lack of the DROP CONSTRAINT statement

Compare
Choose a tag to compare
@gwynne gwynne released this 30 Jul 02:09
· 26 commits to main since this release
e562a10

What's Changed

Fully work around MySQL 5.7's lack of the DROP CONSTRAINT statement in #575

The work done in #522 added the ability to drop foreign keys when using a MySQL 5.7 database by enabling Fluent to generate the necessary DROP FOREIGN KEY syntax to make up for the old version's lack of the more standard and more flexible DROP CONSTRAINT statement.

However, this still required users to specify the complete and current foreign key constraint definition at the time of deletion so Fluent could work out the correct "normalized" constraint identifier. These changes make it possible to also drop a foreign key constraint by name, requiring only the knowledge that it is, in fact, a foreign key.

Users wishing to drop foreign key constraints by name when using MySQL 5.7 must use the new API provided. Users of other versions of MySQL and other databases may also use the new API, or continue to use the old one.

New APIs added in this release:

Fixes #491, vapor/fluent#722. Supersedes #492, #522.

This patch was released by @gwynne.

Full Changelog: 1.43.2...1.44.0