wiki.techinc.nl/maintenance/archives/patch-rename-mysql-user_newtalk-indexes.sql
Brad Jorsch 5424238aa9 Remove MySQL index aliasing for user_newtalk indexes
While these have not yet caused problems, we should probably deprecate
the whole confusing "index aliasing" feature. Cleaning this up needs to
be done first.

Method MWLBFactory::setSchemaAliases() is being considered private due
to the @internal notation, and so is being removed without deprecation.

Bug: T233240
Change-Id: Ib04b7bc4af53382fde01bd8550cc7e361124255f
2019-09-27 09:30:31 +00:00

10 lines
348 B
SQL

-- T233240: The indexes on `user_newtalk` may be named `un_user_id`/`un_user_ip`
-- or `user_id`/`user_ip`. At least it won't be both or mixed. Rename them to
-- the former.
-- Do not use the /*i*/ hack here!
ALTER TABLE /*_*/user_newtalk
DROP INDEX user_id,
DROP INDEX user_ip,
ADD INDEX un_user_id (user_id),
ADD INDEX un_user_ip (user_ip);