[wp-trac] [WordPress Trac] #34870: dbDelta Not Specifying Key Length Duplicate Indexes
WordPress Trac
noreply at wordpress.org
Mon Sep 12 05:40:14 UTC 2016
#34870: dbDelta Not Specifying Key Length Duplicate Indexes
-------------------------------------------------+-------------------------
Reporter: charlestonsw | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting
Component: Database | Review
Severity: normal | Version: 2.8.1
Keywords: has-patch needs-unit-tests needs- | Resolution:
refresh | Focuses:
| performance
-------------------------------------------------+-------------------------
Changes (by pento):
* keywords: has-patch needs-testing needs-unit-tests dev-feedback => has-
patch needs-unit-tests needs-refresh
Comment:
`dbDelta()` deliberately doesn't support any `DROP` operations, due to the
potential for irrevocable data loss. In Core, any schema changes requiring
a `DROP` operation are manually written in the `upgrade_xxx()` functions
in `wp-admin/includes/upgrade.php`, plugins with custom tables should use
a similar practice.
[32108] added some flexibility in the other direction - if MySQL has an
index sub part defined that the schema sent to `dbDelta()` doesn't know
about, we don't try to re-create that index. I'd be fine with a similar
for this ticket - if the schema sent to `dbDelta()` has an index sub part
that MySQL doesn't know about, don't try to re-create the index.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/34870#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list