sql/sqlite/patch-translate_message_group_subscriptions-composite-primary-key.sql
-- This file is automatically generated using maintenance/generateSchemaChangeSql.php.
-- Source: extensions/Translate/sql/abstractSchemaChanges/patch-translate_message_group_subscriptions-composite-primary-key.json
-- Do not modify this file directly.
-- See https://www.mediawiki.org/wiki/Manual:Schema_changes
CREATE TEMPORARY TABLE /*_*/__temp__translate_message_group_subscriptions AS
SELECT
tmgs_user_id,
tmgs_group
FROM /*_*/translate_message_group_subscriptions;
DROP TABLE /*_*/translate_message_group_subscriptions;
CREATE TABLE /*_*/translate_message_group_subscriptions (
tmgs_user_id INTEGER UNSIGNED NOT NULL,
tmgs_group BLOB NOT NULL,
PRIMARY KEY(tmgs_group, tmgs_user_id)
);
INSERT INTO /*_*/translate_message_group_subscriptions (tmgs_user_id, tmgs_group)
SELECT
tmgs_user_id,
tmgs_group
FROM
/*_*/__temp__translate_message_group_subscriptions;
DROP TABLE /*_*/__temp__translate_message_group_subscriptions;
CREATE INDEX translate_tmgs_user_id ON /*_*/translate_message_group_subscriptions (tmgs_user_id);