Add support for MySQL's DROP INDEX syntax
This patch was authored and released by @gwynne.
MySQL's version of DROP INDEX
differs from PostgreSQL's in that it requires an ON <table name>
clause in order to identify the index to drop, since MySQL treats indexes as table-level objects rather than schema-level. This PR adds support for optionally specifying the table name.
Also deprecates SQLDataType.type(_:)
, which should never have been public - it is a utility method used in one place by a single test case; its behavior is only valid in PostgreSQL, and even then only for custom-typed enums, but its name and placement give no hint of this to callers. Since it is public API, it can not be summarily removed without a semver-major
break, but we can at least remove the single call site and discourage any further use.
Also updates the CI workflows as per the usual in my PRs 🙂.
Note: semver-minor
not only due to the new public API on SQLDropIndexBuilder
but also because the deprecation of a public API is, while not source-breaking, annoying for anyone who actually used it.