From d02a84e87e5c40be707198fbb3f2a70aa42823f9 Mon Sep 17 00:00:00 2001 From: hide_d Date: Sat, 12 May 2018 05:36:25 +0900 Subject: [PATCH] =?UTF-8?q?kvstorage=EB=A5=BC=20schema=EC=97=90=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- f_install/sql/common_schema.sql | 15 ++++++++++----- hwe/sql/schema.sql | 14 ++++++++++++++ 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/f_install/sql/common_schema.sql b/f_install/sql/common_schema.sql index 52b5a75b..fd6f2100 100644 --- a/f_install/sql/common_schema.sql +++ b/f_install/sql/common_schema.sql @@ -57,11 +57,16 @@ CREATE TABLE `member_log` ( ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; -CREATE TABLE `config` ( +################### +# KV storage +################### +CREATE TABLE if not exists `storage` ( `id` INT(11) NOT NULL AUTO_INCREMENT, - `key` VARCHAR(50) NOT NULL, - `value` VARCHAR(100) NULL DEFAULT NULL, + `namespace` VARCHAR(40) NOT NULL, + `key` VARCHAR(40) NOT NULL, + `value` VARCHAR(100) NOT NULL, PRIMARY KEY (`id`), - UNIQUE INDEX `key` (`key`) + UNIQUE INDEX `key` (`namespace`, `key`) ) -ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; \ No newline at end of file +DEFAULT CHARSET=utf8mb4 +ENGINE=MyISAM; diff --git a/hwe/sql/schema.sql b/hwe/sql/schema.sql index 911c594f..8ebcf36c 100644 --- a/hwe/sql/schema.sql +++ b/hwe/sql/schema.sql @@ -672,3 +672,17 @@ CREATE TABLE `select_npc_token` ( ) DEFAULT CHARSET=utf8mb4 ENGINE=MyISAM; + +################### +# KV storage +################### +CREATE TABLE if not exists `storage` ( + `id` INT(11) NOT NULL AUTO_INCREMENT, + `namespace` VARCHAR(40) NOT NULL, + `key` VARCHAR(40) NOT NULL, + `value` VARCHAR(100) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE INDEX `key` (`namespace`, `key`) +) +DEFAULT CHARSET=utf8mb4 +ENGINE=MyISAM;