feat(DB/Module): introduce module_string table (#19475)

This commit is contained in:
Kitzunu
2024-08-13 19:53:16 +02:00
committed by GitHub
parent 67010623a0
commit 4b63aa9015
9 changed files with 176 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
--
DROP TABLE IF EXISTS `module_string`;
CREATE TABLE IF NOT EXISTS `module_string` (
`module` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'module dir name, eg mod-cfbg',
`id` int unsigned NOT NULL,
`string` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
PRIMARY KEY (`module`, `id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
DROP TABLE IF EXISTS `module_string_locale`;
CREATE TABLE IF NOT EXISTS `module_string_locale` (
`module` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Corresponds to an existing entry in module_string',
`id` int unsigned NOT NULL COMMENT 'Corresponds to an existing entry in module_string',
`locale` ENUM('koKR', 'frFR', 'deDE', 'zhCN', 'zhTW', 'esES', 'esMX', 'ruRU') NOT NULL,
`string` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
PRIMARY KEY (`module`, `id`, `locale`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
DELETE FROM `command` WHERE `name` = 'reload module_string';
INSERT INTO `command` (`name`, `security`, `help`) VALUES
('reload module_string', 3, 'Syntax: .reload module_string');