mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-12-18 02:40:50 +00:00
d35c502b60
MediaWiki does not use foreign keys in the database schema Additional changes to the schema: - Mysql and sqlite creates index for each foreign keys, keep the index to allow fast joins with this columns by explicit statement on new wikis - Explicit create statement for the UNIQUE index on column eps_token_sha256 to make the index more visible on the sql file - Rename existing index to match the prefix for existing indexes Bug: T306473 Change-Id: I4bd29a6d0f9515e1a678c2a967799b90ef22f7b9
11 lines
655 B
SQL
11 lines
655 B
SQL
-- Drop foreign keys from echo_push_subscription - T306473
|
|
ALTER TABLE /*_*/echo_push_subscription DROP FOREIGN KEY IF EXISTS /*_*/echo_push_subscription_ibfk_1;
|
|
ALTER TABLE /*_*/echo_push_subscription DROP FOREIGN KEY IF EXISTS /*_*/echo_push_subscription_ibfk_2;
|
|
|
|
-- Rename index to match table prefix
|
|
DROP INDEX IF EXISTS /*i*/echo_push_subscription_user_id ON /*_*/echo_push_subscription;
|
|
CREATE INDEX IF NOT EXISTS /*i*/eps_user ON /*_*/echo_push_subscription (eps_user);
|
|
|
|
DROP INDEX IF EXISTS /*i*/echo_push_subscription_token ON /*_*/echo_push_subscription;
|
|
CREATE INDEX IF NOT EXISTS /*i*/eps_token ON /*_*/echo_push_subscription (eps_token(10));
|