From 413ca990d0eeb7e1da34832c157edb55a52d78c2 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 4 Jun 2021 14:32:15 +0800 Subject: [PATCH] Upgrade nel database charsets --- web/private_php/setup/sql/nel_00005.sql | 25 +++++++++++++++++++++++++ web/public_php/setup/database.php | 2 +- web/public_php/setup/version.php | 2 +- 3 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 web/private_php/setup/sql/nel_00005.sql diff --git a/web/private_php/setup/sql/nel_00005.sql b/web/private_php/setup/sql/nel_00005.sql new file mode 100644 index 000000000..7f025fd19 --- /dev/null +++ b/web/private_php/setup/sql/nel_00005.sql @@ -0,0 +1,25 @@ +ALTER TABLE `domain` + CHANGE `domain_name` `domain_name` VARCHAR(32) CHARACTER SET ascii COLLATE ascii_general_ci NOT NULL DEFAULT '', + CHANGE `status` `status` ENUM('ds_close','ds_dev','ds_restricted','ds_open') CHARACTER SET ascii COLLATE ascii_general_ci NOT NULL DEFAULT 'ds_dev', + CHANGE `ring_db_name` `ring_db_name` VARCHAR(255) CHARACTER SET ascii COLLATE ascii_general_ci NOT NULL DEFAULT ''; + +ALTER TABLE `permission` + CHANGE `AccessPrivilege` `AccessPrivilege` SET('OPEN','DEV','RESTRICTED') CHARACTER SET ascii COLLATE ascii_general_ci NOT NULL DEFAULT 'OPEN'; + +ALTER TABLE `shard` + CHANGE `Name` `Name` VARCHAR(255) CHARACTER SET ascii COLLATE ascii_general_ci NULL DEFAULT 'unknown shard', + CHANGE `Version` `Version` VARCHAR(64) CHARACTER SET ascii COLLATE ascii_general_ci NOT NULL DEFAULT '', + CHANGE `State` `State` ENUM('ds_close','ds_dev','ds_restricted','ds_open') CHARACTER SET ascii COLLATE ascii_general_ci NOT NULL DEFAULT 'ds_dev'; + +ALTER TABLE `user` + CHANGE `Password` `Password` VARCHAR(106) CHARACTER SET ascii COLLATE ascii_bin NULL DEFAULT NULL, + CHANGE `State` `State` ENUM('Offline','Online') CHARACTER SET ascii COLLATE ascii_general_ci NOT NULL DEFAULT 'Offline', + CHANGE `Privilege` `Privilege` VARCHAR(255) CHARACTER SET ascii COLLATE ascii_general_ci NOT NULL DEFAULT '', + CHANGE `ExtendedPrivilege` `ExtendedPrivilege` VARCHAR(128) CHARACTER SET ascii COLLATE ascii_general_ci NOT NULL DEFAULT ''; + +ALTER TABLE `permission` + ADD UNIQUE KEY `UserShard` (`UId`,`ShardId`) USING BTREE; + +ALTER TABLE `user` + ADD PRIMARY KEY (`UId`), + ADD KEY `Login` (`Login`); diff --git a/web/public_php/setup/database.php b/web/public_php/setup/database.php index b0a97eec9..a3efc36e2 100644 --- a/web/public_php/setup/database.php +++ b/web/public_php/setup/database.php @@ -1,7 +1,7 @@