Skip to content

v2.1.3

sql 脚本 - DDL

sql
-- 删除无用字段
ALTER TABLE `command_snippet` 
DROP COLUMN `prefix`;

sql 脚本 - DML

sql
-- 替换终端颜色
UPDATE data_extra
SET value = JSON_SET(
    value, 
    '$.color', 
    CASE 
        WHEN JSON_EXTRACT(value, '$.color') = 'rgb(var(--red-6))' THEN 'red'
        WHEN JSON_EXTRACT(value, '$.color') = 'rgb(var(--orange-6))' THEN 'orange'
        WHEN JSON_EXTRACT(value, '$.color') = 'rgb(var(--yellow-6))' THEN 'yellow'
        WHEN JSON_EXTRACT(value, '$.color') = 'rgb(var(--green-6))' THEN 'green'
        WHEN JSON_EXTRACT(value, '$.color') = 'rgb(var(--cyan-6))' THEN 'cyan'
        WHEN JSON_EXTRACT(value, '$.color') = 'rgb(var(--blue-6))' THEN 'lightblue'
        WHEN JSON_EXTRACT(value, '$.color') = 'rgb(var(--arcoblue-6))' THEN 'blue'
        WHEN JSON_EXTRACT(value, '$.color') = 'rgb(var(--purple-6))' THEN 'purple'
        WHEN JSON_EXTRACT(value, '$.color') = 'rgb(var(--pinkpurple-6))' THEN 'pinkpurple'
        WHEN JSON_EXTRACT(value, '$.color') = 'rgb(var(--gray-6))' THEN 'gray'
        ELSE ''
    END
)
WHERE type = 'HOST' 
AND item = 'LABEL'
AND JSON_EXTRACT(value, '$.color') IN (
    'rgb(var(--red-6))', 
    'rgb(var(--orange-6))', 
    'rgb(var(--yellow-6))', 
    'rgb(var(--green-6))', 
    'rgb(var(--cyan-6))', 
    'rgb(var(--blue-6))', 
    'rgb(var(--arcoblue-6))', 
    'rgb(var(--purple-6))', 
    'rgb(var(--pinkpurple-6))', 
    'rgb(var(--gray-6))'
);
-- 字典项
DELETE FROM `dict_key` WHERE id IN (32);
INSERT INTO `dict_key` VALUES (32, 'terminalTabColor', 'COLOR', '[{\"name\": \"color\", \"type\": \"COLOR\"}, {\"name\": \"bg\", \"type\": \"COLOR\"}]', '终端标签页颜色', '2024-03-01 15:01:44', '2024-08-05 12:36:54', '1', '1', 0);
-- 字典值
DELETE FROM `dict_value` WHERE id IN (203, 204, 205, 206, 207, 208, 209, 210, 211, 213);
INSERT INTO `dict_value` VALUES (203, 32, 'terminalTabColor', 'red', '红色', '{\"bg\": \"rgb(var(--red-2))\", \"color\": \"rgb(var(--red-6))\"}', 10, '2024-03-01 15:07:41', '2024-08-05 14:24:28', '1', '1', 0);
INSERT INTO `dict_value` VALUES (204, 32, 'terminalTabColor', 'orange', '橙色', '{\"bg\": \"rgb(var(--orange-2))\", \"color\": \"rgb(var(--orange-6))\"}', 20, '2024-03-01 15:07:55', '2024-08-05 14:24:23', '1', '1', 0);
INSERT INTO `dict_value` VALUES (205, 32, 'terminalTabColor', 'yellow', '黄色', '{\"bg\": \"rgb(var(--yellow-2))\", \"color\": \"rgb(var(--yellow-6))\"}', 30, '2024-03-01 15:08:13', '2024-08-05 14:24:15', '1', '1', 0);
INSERT INTO `dict_value` VALUES (206, 32, 'terminalTabColor', 'green', '绿色', '{\"bg\": \"rgb(var(--green-2))\", \"color\": \"rgb(var(--green-6))\"}', 40, '2024-03-01 15:08:23', '2024-08-05 14:24:09', '1', '1', 0);
INSERT INTO `dict_value` VALUES (207, 32, 'terminalTabColor', 'cyan', '青色', '{\"bg\": \"rgb(var(--cyan-2))\", \"color\": \"rgb(var(--cyan-6))\"}', 50, '2024-03-01 15:08:46', '2024-08-05 14:24:03', '1', '1', 0);
INSERT INTO `dict_value` VALUES (208, 32, 'terminalTabColor', 'blue', '浅蓝', '{\"bg\": \"rgb(var(--blue-2))\", \"color\": \"rgb(var(--blue-6))\"}', 60, '2024-03-01 15:11:01', '2024-08-05 14:23:59', '1', '1', 0);
INSERT INTO `dict_value` VALUES (209, 32, 'terminalTabColor', 'arcoblue', '蓝色', '{\"bg\": \"rgb(var(--arcoblue-2))\", \"color\": \"rgb(var(--arcoblue-6))\"}', 70, '2024-03-01 15:11:11', '2024-08-05 14:23:55', '1', '1', 0);
INSERT INTO `dict_value` VALUES (210, 32, 'terminalTabColor', 'purple', '紫色', '{\"bg\": \"rgb(var(--purple-2))\", \"color\": \"rgb(var(--purple-6))\"}', 80, '2024-03-01 15:11:20', '2024-08-05 14:23:51', '1', '1', 0);
INSERT INTO `dict_value` VALUES (211, 32, 'terminalTabColor', 'pinkpurple', '粉紫', '{\"bg\": \"rgb(var(--pinkpurple-2))\", \"color\": \"rgb(var(--pinkpurple-6))\"}', 90, '2024-03-01 15:11:41', '2024-08-05 14:23:47', '1', '1', 0);
INSERT INTO `dict_value` VALUES (213, 32, 'terminalTabColor', 'gray', '灰色', '{\"bg\": \"rgb(var(--gray-2))\", \"color\": \"rgb(var(--gray-6))\"}', 100, '2024-03-01 15:12:01', '2024-08-05 14:23:43', '1', '1', 0);

最后更新:

Released under the Apache 2.0 License.