From 5294950eb242a749ea37e577e29deff6f6679905 Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Thu, 17 Oct 2024 17:16:03 +0800 Subject: [PATCH] =?UTF-8?q?sql:=20=E6=9B=B4=E6=96=B0ne=5Fhost=E8=A1=A8?= =?UTF-8?q?=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- database/upgrade/upg_ne_host.sql | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/database/upgrade/upg_ne_host.sql b/database/upgrade/upg_ne_host.sql index 5a9dffd0..13a7e765 100644 --- a/database/upgrade/upg_ne_host.sql +++ b/database/upgrade/upg_ne_host.sql @@ -24,12 +24,12 @@ CREATE TABLE IF NOT EXISTS `ne_host` ( -- 20241016前旧表更新 ALTER TABLE `ne_host` ADD COLUMN IF NOT EXISTS `db_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '数据库名称' AFTER `pass_phrase`; -ALTER TABLE `ne_host` MODIFY COLUMN IF NOT EXISTS `host_id` bigint NOT NULL COMMENT '主机主键' FIRST; -ALTER TABLE `ne_host` MODIFY COLUMN IF NOT EXISTS `host_type` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '连接类型 ssh telnet redis' AFTER `host_id`; -ALTER TABLE `ne_host` MODIFY COLUMN IF NOT EXISTS `port` int NULL DEFAULT 22 COMMENT '端口 22 4100 6379' AFTER `addr`; -ALTER TABLE `ne_host` MODIFY COLUMN IF NOT EXISTS `user` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '认证用户名' AFTER `port`; -ALTER TABLE `ne_host` MODIFY COLUMN IF NOT EXISTS `create_time` bigint NULL DEFAULT 0 COMMENT '创建时间' AFTER `create_by`; -ALTER TABLE `ne_host` MODIFY COLUMN IF NOT EXISTS `update_time` bigint NULL DEFAULT 0 COMMENT '更新时间' AFTER `update_by`; -ALTER TABLE `ne_host` MODIFY COLUMN IF NOT EXISTS `host_id` bigint NOT NULL AUTO_INCREMENT COMMENT '主机主键'; +ALTER TABLE `ne_host` MODIFY COLUMN IF EXISTS `host_id` bigint NOT NULL COMMENT '主机主键' FIRST; +ALTER TABLE `ne_host` MODIFY COLUMN IF EXISTS `host_type` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '连接类型 ssh telnet redis' AFTER `host_id`; +ALTER TABLE `ne_host` MODIFY COLUMN IF EXISTS `port` int NULL DEFAULT 22 COMMENT '端口 22 4100 6379' AFTER `addr`; +ALTER TABLE `ne_host` MODIFY COLUMN IF EXISTS `user` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '认证用户名' AFTER `port`; +ALTER TABLE `ne_host` MODIFY COLUMN IF EXISTS `create_time` bigint NULL DEFAULT 0 COMMENT '创建时间' AFTER `create_by`; +ALTER TABLE `ne_host` MODIFY COLUMN IF EXISTS `update_time` bigint NULL DEFAULT 0 COMMENT '更新时间' AFTER `update_by`; +ALTER TABLE `ne_host` MODIFY COLUMN IF EXISTS `host_id` bigint NOT NULL AUTO_INCREMENT COMMENT '主机主键'; SET FOREIGN_KEY_CHECKS=1;