From d7cd2455d7ef2d0f3aa51e45c49d20e5e0b817fd Mon Sep 17 00:00:00 2001 From: Alex Date: Thu, 20 Oct 2022 10:43:54 -0700 Subject: [PATCH] fix some error fix the error of muc_rooms and muc_light_rooms --- priv/mysql.sql | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/priv/mysql.sql b/priv/mysql.sql index 700889f8cdb..bd2ce0499f3 100644 --- a/priv/mysql.sql +++ b/priv/mysql.sql @@ -321,8 +321,8 @@ CREATE TABLE muc_light_rooms( luser VARCHAR(250) NOT NULL, lserver VARCHAR(250) NOT NULL, version VARCHAR(20) NOT NULL, - PRIMARY KEY (lserver, luser), - UNIQUE KEY k_id USING HASH (id) + PRIMARY KEY (id), + UNIQUE KEY (lserver, luser) ) CHARACTER SET utf8mb4 ROW_FORMAT=DYNAMIC; @@ -359,11 +359,12 @@ CREATE TABLE muc_light_blocking( CREATE INDEX i_muc_light_blocking_su USING BTREE ON muc_light_blocking(lserver, luser); CREATE TABLE muc_rooms( - id SERIAL, + id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, muc_host VARCHAR(250) NOT NULL, room_name VARCHAR(250) NOT NULL, options JSON NOT NULL, - PRIMARY KEY (muc_host, room_name) + PRIMARY KEY (id), + UNIQUE KEY (muc_host, room_name) ); CREATE TABLE muc_room_aff(