Skip to content

v2.2.2

sql 脚本 - DDL

sql
-- 添加修改密码字段
ALTER TABLE `system_user` 
ADD COLUMN `update_password_status` tinyint(0) NULL DEFAULT 0 COMMENT '修改密码状态 0无需修改 1需要修改' AFTER `status`,
ADD COLUMN `update_password_reason` varchar(12) NULL DEFAULT NULL COMMENT '修改密码原因' AFTER `update_password_status`;

-- 添加系统类型
ALTER TABLE `host` 
ADD COLUMN `os_type` char(12) NULL COMMENT '系统类型' AFTER `type`,
ADD INDEX `idx_type_address`(`type`, `address`) USING BTREE;

-- 添加执行任务id
ALTER TABLE `exec_job` 
ADD COLUMN `exec_user_id` bigint(0) NULL COMMENT '执行用户id' AFTER `recent_log_id`,
ADD COLUMN `exec_username` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '执行用户名' AFTER `exec_user_id`,
ADD INDEX `idx_exec_user_id`(`exec_user_id`);

-- 添加执行方式
ALTER TABLE `exec_log` 
ADD COLUMN `exec_mode` char(8) NULL COMMENT '执行方式' AFTER `source_id`;

-- 添加错误信息
ALTER TABLE `upload_task_file` 
ADD COLUMN `error_message` varchar(1024) NULL COMMENT '错误信息' AFTER `create_time`;

sql 脚本 - DML

sql
-- 菜单
DELETE FROM `system_menu` WHERE id IN (8, 161, 167, 177, 184, 185, 193, 197, 198, 271);
INSERT INTO `system_menu` VALUES (8, 0, '项目地址', NULL, 1, 1000, 1, 1, 1, 0, 'icon-link', 'https://visor.dromara.org', '', '2023-07-28 11:04:59', '2024-08-29 18:10:57', '1', '1', 0);
INSERT INTO `system_menu` VALUES (161, 176, '执行模板', NULL, 2, 80, 1, 1, 1, 0, 'IconBookmark', NULL, 'execTemplate', '2024-03-07 18:32:41', '2024-12-12 23:31:06', '1', '1', 0);
INSERT INTO `system_menu` VALUES (167, 176, '执行日志', NULL, 2, 20, 1, 1, 1, 0, 'IconFindReplace', NULL, 'execCommandLog', '2024-03-13 15:08:23', '2024-12-12 23:35:30', '1', '1', 0);
INSERT INTO `system_menu` VALUES (177, 176, '任务列表', NULL, 2, 30, 1, 1, 1, 0, 'IconUnorderedList', NULL, 'execJob', '2024-04-10 16:13:27', '2024-12-12 23:34:35', '1', '1', 0);
INSERT INTO `system_menu` VALUES (184, 176, '任务日志', NULL, 2, 40, 1, 1, 1, 0, 'icon-history', '', 'execJobLog', '2024-04-11 13:40:47', '2024-12-12 23:34:45', '2', '1', 0);
INSERT INTO `system_menu` VALUES (185, 176, '计划任务日志', NULL, 2, 50, 0, 1, 0, 1, NULL, NULL, 'execJobLogView', '2024-04-11 13:41:47', '2024-12-12 23:34:55', '2', '1', 0);
INSERT INTO `system_menu` VALUES (193, 0, '计划任务', NULL, 1, 430, 1, 1, 1, 0, 'IconCalendarClock', NULL, 'jobModule', '2024-04-28 15:31:24', '2024-12-12 23:31:52', '1', '1', 1);
INSERT INTO `system_menu` VALUES (197, 176, '批量上传', NULL, 2, 60, 1, 1, 1, 0, 'IconUpload', NULL, 'batchUpload', '2024-05-08 22:12:23', '2024-12-12 23:34:11', '1', '1', 0);
INSERT INTO `system_menu` VALUES (198, 176, '上传任务', NULL, 2, 70, 1, 1, 1, 0, 'IconCloud', NULL, 'uploadTask', '2024-05-08 22:16:05', '2024-12-12 23:34:19', '1', '1', 0);
INSERT INTO `system_menu` VALUES (271, 177, '修改任务执行用户', 'asset:exec-job:update-exec-user', 3, 45, 1, 1, 1, 0, NULL, NULL, NULL, '2024-12-13 00:18:13', '2024-12-13 00:18:13', '1', '1', 0);

-- 字典项
DELETE FROM `dict_key` WHERE id IN (38, 61);
INSERT INTO `dict_key` VALUES (38, 'hostOsType', 'STRING', '[]', '主机系统类型', '2024-04-16 22:18:59', '2024-12-12 16:20:52', '1', '3', 0);
INSERT INTO `dict_key` VALUES (61, 'updatePasswordReason', 'STRING', '[]', '修改密码原因', '2024-12-11 17:19:40', '2024-12-11 17:20:04', '1', '1', 0);

-- 字典值
DELETE FROM `dict_value` WHERE id IN (272, 273, 431, 432);
INSERT INTO `dict_value` VALUES (272, 38, 'hostOsType', 'LINUX', 'linux', '{}', 10, '2024-04-16 22:19:25', '2024-12-12 16:20:39', '1', '3', 0);
INSERT INTO `dict_value` VALUES (273, 38, 'hostOsType', 'WINDOWS', 'windows', '{}', 20, '2024-04-16 22:19:39', '2024-12-12 16:20:39', '1', '3', 0);
INSERT INTO `dict_value` VALUES (431, 61, 'updatePasswordReason', 'NEW', '为了保障账户安全,请立即修改初始密码。', '{}', 10, '2024-12-11 17:24:19', '2024-12-11 17:24:19', '1', '1', 0);
INSERT INTO `dict_value` VALUES (432, 2, 'operatorLogType', 'exec-job:update-exec-user', '修改计划执行用户', '{}', 45, '2024-12-13 00:17:03', '2024-12-13 00:17:03', '1', '1', 0);

-- 初始化系统类型
UPDATE host SET os_type = IFNULL(REPLACE(JSON_EXTRACT(config, '$.osType'), '"', ''), 'LINUX');

-- 设置执行用户
UPDATE exec_job t SET exec_user_id = t.creator, exec_username = (SELECT username FROM system_user WHERE id = t.creator AND deleted = 0 LIMIT 1);

-- 设置执行方式
UPDATE exec_log SET exec_mode = 'MANUAL' WHERE user_id <> 0;
UPDATE exec_log SET exec_mode = 'JOB' WHERE user_id = 0;

-- 设置错误信息
UPDATE upload_task_file SET error_message = '上传失败' WHERE status = 'FAILED';

sql 脚本 - DDL - 修改排序规则

sql
ALTER DATABASE orion_visor CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
SET FOREIGN_KEY_CHECKS=0;
ALTER TABLE `QRTZ_BLOB_TRIGGERS` COLLATE = utf8mb4_unicode_ci;
ALTER TABLE `QRTZ_BLOB_TRIGGERS` MODIFY COLUMN `SCHED_NAME` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL FIRST;
ALTER TABLE `QRTZ_BLOB_TRIGGERS` MODIFY COLUMN `TRIGGER_NAME` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL AFTER `SCHED_NAME`;
ALTER TABLE `QRTZ_BLOB_TRIGGERS` MODIFY COLUMN `TRIGGER_GROUP` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL AFTER `TRIGGER_NAME`;
ALTER TABLE `QRTZ_CALENDARS` COLLATE = utf8mb4_unicode_ci;
ALTER TABLE `QRTZ_CALENDARS` MODIFY COLUMN `SCHED_NAME` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL FIRST;
ALTER TABLE `QRTZ_CALENDARS` MODIFY COLUMN `CALENDAR_NAME` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL AFTER `SCHED_NAME`;
ALTER TABLE `QRTZ_CRON_TRIGGERS` COLLATE = utf8mb4_unicode_ci;
ALTER TABLE `QRTZ_CRON_TRIGGERS` MODIFY COLUMN `SCHED_NAME` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL FIRST;
ALTER TABLE `QRTZ_CRON_TRIGGERS` MODIFY COLUMN `TRIGGER_NAME` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL AFTER `SCHED_NAME`;
ALTER TABLE `QRTZ_CRON_TRIGGERS` MODIFY COLUMN `TRIGGER_GROUP` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL AFTER `TRIGGER_NAME`;
ALTER TABLE `QRTZ_CRON_TRIGGERS` MODIFY COLUMN `CRON_EXPRESSION` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL AFTER `TRIGGER_GROUP`;
ALTER TABLE `QRTZ_CRON_TRIGGERS` MODIFY COLUMN `TIME_ZONE_ID` varchar(80) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL AFTER `CRON_EXPRESSION`;
ALTER TABLE `QRTZ_FIRED_TRIGGERS` COLLATE = utf8mb4_unicode_ci;
ALTER TABLE `QRTZ_FIRED_TRIGGERS` MODIFY COLUMN `SCHED_NAME` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL FIRST;
ALTER TABLE `QRTZ_FIRED_TRIGGERS` MODIFY COLUMN `ENTRY_ID` varchar(95) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL AFTER `SCHED_NAME`;
ALTER TABLE `QRTZ_FIRED_TRIGGERS` MODIFY COLUMN `TRIGGER_NAME` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL AFTER `ENTRY_ID`;
ALTER TABLE `QRTZ_FIRED_TRIGGERS` MODIFY COLUMN `TRIGGER_GROUP` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL AFTER `TRIGGER_NAME`;
ALTER TABLE `QRTZ_FIRED_TRIGGERS` MODIFY COLUMN `INSTANCE_NAME` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL AFTER `TRIGGER_GROUP`;
ALTER TABLE `QRTZ_FIRED_TRIGGERS` MODIFY COLUMN `STATE` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL AFTER `PRIORITY`;
ALTER TABLE `QRTZ_FIRED_TRIGGERS` MODIFY COLUMN `JOB_NAME` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL AFTER `STATE`;
ALTER TABLE `QRTZ_FIRED_TRIGGERS` MODIFY COLUMN `JOB_GROUP` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL AFTER `JOB_NAME`;
ALTER TABLE `QRTZ_FIRED_TRIGGERS` MODIFY COLUMN `IS_NONCONCURRENT` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL AFTER `JOB_GROUP`;
ALTER TABLE `QRTZ_FIRED_TRIGGERS` MODIFY COLUMN `REQUESTS_RECOVERY` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL AFTER `IS_NONCONCURRENT`;
ALTER TABLE `QRTZ_JOB_DETAILS` COLLATE = utf8mb4_unicode_ci;
ALTER TABLE `QRTZ_JOB_DETAILS` MODIFY COLUMN `SCHED_NAME` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL FIRST;
ALTER TABLE `QRTZ_JOB_DETAILS` MODIFY COLUMN `JOB_NAME` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL AFTER `SCHED_NAME`;
ALTER TABLE `QRTZ_JOB_DETAILS` MODIFY COLUMN `JOB_GROUP` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL AFTER `JOB_NAME`;
ALTER TABLE `QRTZ_JOB_DETAILS` MODIFY COLUMN `DESCRIPTION` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL AFTER `JOB_GROUP`;
ALTER TABLE `QRTZ_JOB_DETAILS` MODIFY COLUMN `JOB_CLASS_NAME` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL AFTER `DESCRIPTION`;
ALTER TABLE `QRTZ_JOB_DETAILS` MODIFY COLUMN `IS_DURABLE` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL AFTER `JOB_CLASS_NAME`;
ALTER TABLE `QRTZ_JOB_DETAILS` MODIFY COLUMN `IS_NONCONCURRENT` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL AFTER `IS_DURABLE`;
ALTER TABLE `QRTZ_JOB_DETAILS` MODIFY COLUMN `IS_UPDATE_DATA` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL AFTER `IS_NONCONCURRENT`;
ALTER TABLE `QRTZ_JOB_DETAILS` MODIFY COLUMN `REQUESTS_RECOVERY` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL AFTER `IS_UPDATE_DATA`;
ALTER TABLE `QRTZ_LOCKS` COLLATE = utf8mb4_unicode_ci;
ALTER TABLE `QRTZ_LOCKS` MODIFY COLUMN `SCHED_NAME` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL FIRST;
ALTER TABLE `QRTZ_LOCKS` MODIFY COLUMN `LOCK_NAME` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL AFTER `SCHED_NAME`;
ALTER TABLE `QRTZ_PAUSED_TRIGGER_GRPS` COLLATE = utf8mb4_unicode_ci;
ALTER TABLE `QRTZ_PAUSED_TRIGGER_GRPS` MODIFY COLUMN `SCHED_NAME` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL FIRST;
ALTER TABLE `QRTZ_PAUSED_TRIGGER_GRPS` MODIFY COLUMN `TRIGGER_GROUP` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL AFTER `SCHED_NAME`;
ALTER TABLE `QRTZ_SCHEDULER_STATE` COLLATE = utf8mb4_unicode_ci;
ALTER TABLE `QRTZ_SCHEDULER_STATE` MODIFY COLUMN `SCHED_NAME` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL FIRST;
ALTER TABLE `QRTZ_SCHEDULER_STATE` MODIFY COLUMN `INSTANCE_NAME` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL AFTER `SCHED_NAME`;
ALTER TABLE `QRTZ_SIMPLE_TRIGGERS` COLLATE = utf8mb4_unicode_ci;
ALTER TABLE `QRTZ_SIMPLE_TRIGGERS` MODIFY COLUMN `SCHED_NAME` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL FIRST;
ALTER TABLE `QRTZ_SIMPLE_TRIGGERS` MODIFY COLUMN `TRIGGER_NAME` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL AFTER `SCHED_NAME`;
ALTER TABLE `QRTZ_SIMPLE_TRIGGERS` MODIFY COLUMN `TRIGGER_GROUP` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL AFTER `TRIGGER_NAME`;
ALTER TABLE `QRTZ_SIMPROP_TRIGGERS` COLLATE = utf8mb4_unicode_ci;
ALTER TABLE `QRTZ_SIMPROP_TRIGGERS` MODIFY COLUMN `SCHED_NAME` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL FIRST;
ALTER TABLE `QRTZ_SIMPROP_TRIGGERS` MODIFY COLUMN `TRIGGER_NAME` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL AFTER `SCHED_NAME`;
ALTER TABLE `QRTZ_SIMPROP_TRIGGERS` MODIFY COLUMN `TRIGGER_GROUP` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL AFTER `TRIGGER_NAME`;
ALTER TABLE `QRTZ_SIMPROP_TRIGGERS` MODIFY COLUMN `STR_PROP_1` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL AFTER `TRIGGER_GROUP`;
ALTER TABLE `QRTZ_SIMPROP_TRIGGERS` MODIFY COLUMN `STR_PROP_2` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL AFTER `STR_PROP_1`;
ALTER TABLE `QRTZ_SIMPROP_TRIGGERS` MODIFY COLUMN `STR_PROP_3` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL AFTER `STR_PROP_2`;
ALTER TABLE `QRTZ_SIMPROP_TRIGGERS` MODIFY COLUMN `BOOL_PROP_1` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL AFTER `DEC_PROP_2`;
ALTER TABLE `QRTZ_SIMPROP_TRIGGERS` MODIFY COLUMN `BOOL_PROP_2` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL AFTER `BOOL_PROP_1`;
ALTER TABLE `QRTZ_TRIGGERS` COLLATE = utf8mb4_unicode_ci;
ALTER TABLE `QRTZ_TRIGGERS` MODIFY COLUMN `SCHED_NAME` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL FIRST;
ALTER TABLE `QRTZ_TRIGGERS` MODIFY COLUMN `TRIGGER_NAME` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL AFTER `SCHED_NAME`;
ALTER TABLE `QRTZ_TRIGGERS` MODIFY COLUMN `TRIGGER_GROUP` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL AFTER `TRIGGER_NAME`;
ALTER TABLE `QRTZ_TRIGGERS` MODIFY COLUMN `JOB_NAME` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL AFTER `TRIGGER_GROUP`;
ALTER TABLE `QRTZ_TRIGGERS` MODIFY COLUMN `JOB_GROUP` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL AFTER `JOB_NAME`;
ALTER TABLE `QRTZ_TRIGGERS` MODIFY COLUMN `DESCRIPTION` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL AFTER `JOB_GROUP`;
ALTER TABLE `QRTZ_TRIGGERS` MODIFY COLUMN `TRIGGER_STATE` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL AFTER `PRIORITY`;
ALTER TABLE `QRTZ_TRIGGERS` MODIFY COLUMN `TRIGGER_TYPE` varchar(8) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL AFTER `TRIGGER_STATE`;
ALTER TABLE `QRTZ_TRIGGERS` MODIFY COLUMN `CALENDAR_NAME` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL AFTER `END_TIME`;
ALTER TABLE `_copy` COLLATE = utf8mb4_unicode_ci;
ALTER TABLE `command_snippet` COLLATE = utf8mb4_unicode_ci;
ALTER TABLE `command_snippet` MODIFY COLUMN `name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '名称' AFTER `group_id`;
ALTER TABLE `command_snippet` MODIFY COLUMN `command` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL COMMENT '代码片段' AFTER `name`;
ALTER TABLE `data_extra` COLLATE = utf8mb4_unicode_ci;
ALTER TABLE `data_extra` MODIFY COLUMN `type` char(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '数据类型' AFTER `rel_id`;
ALTER TABLE `data_extra` MODIFY COLUMN `item` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '配置项' AFTER `type`;
ALTER TABLE `data_group` COLLATE = utf8mb4_unicode_ci;
ALTER TABLE `data_group` MODIFY COLUMN `type` char(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '组类型' AFTER `parent_id`;
ALTER TABLE `data_group` MODIFY COLUMN `name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '组名称' AFTER `type`;
ALTER TABLE `data_group_rel` COLLATE = utf8mb4_unicode_ci;
ALTER TABLE `data_group_rel` MODIFY COLUMN `type` char(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '组类型' AFTER `id`;
ALTER TABLE `data_permission` COLLATE = utf8mb4_unicode_ci;
ALTER TABLE `data_permission` MODIFY COLUMN `type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '数据类型' AFTER `rel_id`;
ALTER TABLE `dict_key` COLLATE = utf8mb4_unicode_ci;
ALTER TABLE `dict_key` MODIFY COLUMN `key_name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '配置项' AFTER `id`;
ALTER TABLE `dict_key` MODIFY COLUMN `value_type` char(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '配置值定义' AFTER `key_name`;
ALTER TABLE `dict_key` MODIFY COLUMN `description` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '配置描述' AFTER `extra_schema`;
ALTER TABLE `dict_value` COLLATE = utf8mb4_unicode_ci;
ALTER TABLE `dict_value` MODIFY COLUMN `key_name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '配置项' AFTER `key_id`;
ALTER TABLE `dict_value` MODIFY COLUMN `value` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '配置值' AFTER `key_name`;
ALTER TABLE `dict_value` MODIFY COLUMN `label` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '配置描述' AFTER `value`;
ALTER TABLE `exec_host_log` COLLATE = utf8mb4_unicode_ci;
ALTER TABLE `exec_host_log` MODIFY COLUMN `host_name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '主机名称' AFTER `host_id`;
ALTER TABLE `exec_host_log` MODIFY COLUMN `host_address` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '主机地址' AFTER `host_name`;
ALTER TABLE `exec_host_log` MODIFY COLUMN `status` char(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '执行状态' AFTER `host_address`;
ALTER TABLE `exec_host_log` MODIFY COLUMN `command` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL COMMENT '执行命令' AFTER `status`;
ALTER TABLE `exec_host_log` MODIFY COLUMN `log_path` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '日志路径' AFTER `exit_code`;
ALTER TABLE `exec_host_log` MODIFY COLUMN `script_path` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '脚本路径' AFTER `log_path`;
ALTER TABLE `exec_host_log` MODIFY COLUMN `error_message` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '错误信息' AFTER `script_path`;
ALTER TABLE `exec_job` COLLATE = utf8mb4_unicode_ci;
ALTER TABLE `exec_job` MODIFY COLUMN `name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '任务名称' AFTER `id`;
ALTER TABLE `exec_job` MODIFY COLUMN `expression` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT 'cron 表达式' AFTER `exec_seq`;
ALTER TABLE `exec_job` MODIFY COLUMN `command` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL COMMENT '执行命令' AFTER `script_exec`;
ALTER TABLE `exec_job` MODIFY COLUMN `exec_username` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '执行用户名' AFTER `exec_user_id`;
ALTER TABLE `exec_job_host` COLLATE = utf8mb4_unicode_ci;
ALTER TABLE `exec_log` COLLATE = utf8mb4_unicode_ci;
ALTER TABLE `exec_log` MODIFY COLUMN `username` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '执行用户名' AFTER `user_id`;
ALTER TABLE `exec_log` MODIFY COLUMN `source` char(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '执行来源' AFTER `username`;
ALTER TABLE `exec_log` MODIFY COLUMN `exec_mode` char(8) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '执行方式' AFTER `source_id`;
ALTER TABLE `exec_log` MODIFY COLUMN `description` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '执行描述' AFTER `exec_mode`;
ALTER TABLE `exec_log` MODIFY COLUMN `command` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL COMMENT '执行命令' AFTER `exec_seq`;
ALTER TABLE `exec_log` MODIFY COLUMN `status` char(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '执行状态' AFTER `script_exec`;
ALTER TABLE `exec_template` COLLATE = utf8mb4_unicode_ci;
ALTER TABLE `exec_template` MODIFY COLUMN `name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '名称' AFTER `id`;
ALTER TABLE `exec_template` MODIFY COLUMN `command` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL COMMENT '命令' AFTER `name`;
ALTER TABLE `exec_template_host` COLLATE = utf8mb4_unicode_ci;
ALTER TABLE `favorite` COLLATE = utf8mb4_unicode_ci;
ALTER TABLE `favorite` MODIFY COLUMN `type` char(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '收藏类型' AFTER `rel_id`;
ALTER TABLE `history_value` COLLATE = utf8mb4_unicode_ci;
ALTER TABLE `history_value` MODIFY COLUMN `type` char(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '类型' AFTER `rel_id`;
ALTER TABLE `history_value` MODIFY COLUMN `before_value` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL COMMENT '修改前' AFTER `type`;
ALTER TABLE `history_value` MODIFY COLUMN `after_value` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL COMMENT '修改后' AFTER `before_value`;
ALTER TABLE `host` COLLATE = utf8mb4_unicode_ci;
ALTER TABLE `host` MODIFY COLUMN `type` char(8) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '主机类型' AFTER `id`;
ALTER TABLE `host` MODIFY COLUMN `os_type` char(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '系统类型' AFTER `type`;
ALTER TABLE `host` MODIFY COLUMN `name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '主机名称' AFTER `os_type`;
ALTER TABLE `host` MODIFY COLUMN `code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '主机编码' AFTER `name`;
ALTER TABLE `host` MODIFY COLUMN `address` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '主机地址' AFTER `code`;
ALTER TABLE `host` MODIFY COLUMN `status` char(8) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '主机状态' AFTER `port`;
ALTER TABLE `host_identity` COLLATE = utf8mb4_unicode_ci;
ALTER TABLE `host_identity` MODIFY COLUMN `name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '名称' AFTER `id`;
ALTER TABLE `host_identity` MODIFY COLUMN `type` char(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '类型' AFTER `name`;
ALTER TABLE `host_identity` MODIFY COLUMN `username` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '用户名' AFTER `type`;
ALTER TABLE `host_identity` MODIFY COLUMN `password` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '用户密码' AFTER `username`;
ALTER TABLE `host_key` COLLATE = utf8mb4_unicode_ci;
ALTER TABLE `host_key` MODIFY COLUMN `name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '名称' AFTER `id`;
ALTER TABLE `host_key` MODIFY COLUMN `public_key` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL COMMENT '公钥文本' AFTER `name`;
ALTER TABLE `host_key` MODIFY COLUMN `private_key` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL COMMENT '私钥文本' AFTER `public_key`;
ALTER TABLE `host_key` MODIFY COLUMN `password` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '密码' AFTER `private_key`;
ALTER TABLE `operator_log` COLLATE = utf8mb4_unicode_ci;
ALTER TABLE `operator_log` MODIFY COLUMN `username` char(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '用户名' AFTER `user_id`;
ALTER TABLE `operator_log` MODIFY COLUMN `trace_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT 'traceId' AFTER `username`;
ALTER TABLE `operator_log` MODIFY COLUMN `address` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '请求ip' AFTER `trace_id`;
ALTER TABLE `operator_log` MODIFY COLUMN `location` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '请求地址' AFTER `address`;
ALTER TABLE `operator_log` MODIFY COLUMN `user_agent` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT 'userAgent' AFTER `location`;
ALTER TABLE `operator_log` MODIFY COLUMN `risk_level` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '风险等级' AFTER `user_agent`;
ALTER TABLE `operator_log` MODIFY COLUMN `module` char(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '模块' AFTER `risk_level`;
ALTER TABLE `operator_log` MODIFY COLUMN `type` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '操作类型' AFTER `module`;
ALTER TABLE `operator_log` MODIFY COLUMN `log_info` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL COMMENT '日志' AFTER `type`;
ALTER TABLE `operator_log` MODIFY COLUMN `error_message` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '错误信息' AFTER `result`;
ALTER TABLE `path_bookmark` COLLATE = utf8mb4_unicode_ci;
ALTER TABLE `path_bookmark` MODIFY COLUMN `name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '名称' AFTER `group_id`;
ALTER TABLE `path_bookmark` MODIFY COLUMN `type` char(4) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '类型' AFTER `name`;
ALTER TABLE `path_bookmark` MODIFY COLUMN `path` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '路径' AFTER `type`;
ALTER TABLE `preference` COLLATE = utf8mb4_unicode_ci;
ALTER TABLE `preference` MODIFY COLUMN `type` char(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '偏好类型' AFTER `user_id`;
ALTER TABLE `preference` MODIFY COLUMN `item` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '配置项' AFTER `type`;
ALTER TABLE `system_message` COLLATE = utf8mb4_unicode_ci;
ALTER TABLE `system_message` MODIFY COLUMN `classify` char(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '消息分类' AFTER `id`;
ALTER TABLE `system_message` MODIFY COLUMN `type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '消息类型' AFTER `classify`;
ALTER TABLE `system_message` MODIFY COLUMN `rel_key` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '消息关联' AFTER `status`;
ALTER TABLE `system_message` MODIFY COLUMN `title` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '标题' AFTER `rel_key`;
ALTER TABLE `system_message` MODIFY COLUMN `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL COMMENT '消息内容' AFTER `title`;
ALTER TABLE `system_message` MODIFY COLUMN `receiver_username` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '接收人用户名' AFTER `receiver_id`;
ALTER TABLE `system_setting` COLLATE = utf8mb4_unicode_ci;
ALTER TABLE `system_setting` MODIFY COLUMN `type` char(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '配置类型' AFTER `id`;
ALTER TABLE `system_setting` MODIFY COLUMN `item` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '配置项' AFTER `type`;
ALTER TABLE `tag` COLLATE = utf8mb4_unicode_ci;
ALTER TABLE `tag` MODIFY COLUMN `name` char(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '标签名称' AFTER `id`;
ALTER TABLE `tag` MODIFY COLUMN `type` char(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '标签类型' AFTER `name`;
ALTER TABLE `tag_rel` COLLATE = utf8mb4_unicode_ci;
ALTER TABLE `tag_rel` MODIFY COLUMN `tag_name` char(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '标签名称' AFTER `tag_id`;
ALTER TABLE `tag_rel` MODIFY COLUMN `tag_type` char(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '标签类型' AFTER `tag_name`;
ALTER TABLE `terminal_connect_log` COLLATE = utf8mb4_unicode_ci;
ALTER TABLE `terminal_connect_log` MODIFY COLUMN `username` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '用户名' AFTER `user_id`;
ALTER TABLE `terminal_connect_log` MODIFY COLUMN `host_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '主机名称' AFTER `host_id`;
ALTER TABLE `terminal_connect_log` MODIFY COLUMN `host_address` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '主机地址' AFTER `host_name`;
ALTER TABLE `terminal_connect_log` MODIFY COLUMN `type` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '类型' AFTER `host_address`;
ALTER TABLE `terminal_connect_log` MODIFY COLUMN `status` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '状态' AFTER `type`;
ALTER TABLE `terminal_connect_log` MODIFY COLUMN `token` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT 'token' AFTER `status`;
ALTER TABLE `upload_task` COLLATE = utf8mb4_unicode_ci;
ALTER TABLE `upload_task` MODIFY COLUMN `username` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '用户名' AFTER `user_id`;
ALTER TABLE `upload_task` MODIFY COLUMN `remote_path` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '远程路径' AFTER `username`;
ALTER TABLE `upload_task` MODIFY COLUMN `description` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '描述' AFTER `remote_path`;
ALTER TABLE `upload_task` MODIFY COLUMN `status` char(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '状态' AFTER `description`;
ALTER TABLE `upload_task_file` COLLATE = utf8mb4_unicode_ci;
ALTER TABLE `upload_task_file` MODIFY COLUMN `file_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '文件id' AFTER `host_id`;
ALTER TABLE `upload_task_file` MODIFY COLUMN `file_path` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '文件路径' AFTER `file_id`;
ALTER TABLE `upload_task_file` MODIFY COLUMN `real_file_path` varchar(2048) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '实际文件路径' AFTER `file_path`;
ALTER TABLE `upload_task_file` MODIFY COLUMN `status` char(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '状态' AFTER `file_size`;
ALTER TABLE `upload_task_file` MODIFY COLUMN `error_message` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '错误信息' AFTER `create_time`;
SET FOREIGN_KEY_CHECKS=1;

最后更新:

Released under the Apache 2.0 License.