fix: 增加ne_list字段的长度限制,修改相关SQL脚本

This commit is contained in:
TsMask
2025-05-29 15:01:35 +08:00
parent d080dcd367
commit ba45cd601c
5 changed files with 14 additions and 8 deletions

View File

@@ -17,7 +17,7 @@ CREATE TABLE "trace_task" (
"create_time" integer,
"title" text(255),
"remark" text(500),
"ne_list" text(32) NOT NULL,
"ne_list" text(255) NOT NULL,
"notify_url" text(128) NOT NULL,
PRIMARY KEY ("id")
);

View File

@@ -1,6 +1,7 @@
-- ----------------------------
-- Table structure for trace_task
-- ----------------------------
ALTER TABLE "trace_task" RENAME TO "trace_task_old";
CREATE TABLE IF NOT EXISTS "trace_task" (
"id" integer NOT NULL,
"trace_id" text(16) NOT NULL,
@@ -16,7 +17,7 @@ CREATE TABLE IF NOT EXISTS "trace_task" (
"create_time" integer,
"title" text(255),
"remark" text(500),
"ne_list" text(32) NOT NULL,
"ne_list" text(255) NOT NULL,
"notify_url" text(128) NOT NULL,
PRIMARY KEY ("id")
);
@@ -26,5 +27,9 @@ CREATE TABLE IF NOT EXISTS "trace_task" (
-- ----------------------------
-- ADD COLUMN
ALTER TABLE trace_task ADD COLUMN title text(255);
-- ----------------------------
-- COLUMN for trace_task
-- ----------------------------
-- ALTER TABLE trace_task ADD COLUMN title text(255);
INSERT INTO "trace_task" ("id", "trace_id", "trace_type", "start_time", "end_time", "interfaces", "imsi", "msisdn", "src_ip", "dst_ip", "create_by", "create_time", "title", "remark", "ne_list", "notify_url") SELECT "id", "trace_id", "trace_type", "start_time", "end_time", "interfaces", "imsi", "msisdn", "src_ip", "dst_ip", "create_by", "create_time", "title", "remark", "ne_list", "notify_url" FROM "trace_task_old";
DROP TABLE IF EXISTS "trace_task_old";