Files
certd/packages/ui/certd-server/db/migration/v10026__template.sql

21 lines
789 B
MySQL
Raw Normal View History

2025-06-19 18:17:35 +08:00
CREATE TABLE "pi_template"
(
"id" integer PRIMARY KEY AUTOINCREMENT NOT NULL,
"user_id" integer,
"pipeline_id" integer,
"title" varchar(1024),
"content" text,
"order" integer,
2025-06-25 18:18:57 +08:00
"desc" varchar(1024),
2025-06-19 18:17:35 +08:00
"disabled" boolean NOT NULL DEFAULT (false),
"create_time" datetime NOT NULL DEFAULT (CURRENT_TIMESTAMP),
"update_time" datetime NOT NULL DEFAULT (CURRENT_TIMESTAMP)
);
CREATE INDEX "index_template_user_id" ON "pi_template" ("user_id");
CREATE INDEX "index_template_pipeline_id" ON "pi_template" ("pipeline_id");
2025-06-25 14:41:27 +08:00
2025-06-25 18:18:57 +08:00
ALTER TABLE pi_pipeline ADD COLUMN "template_id" integer DEFAULT (0);
ALTER TABLE pi_pipeline ADD COLUMN "is_template" boolean DEFAULT (0);
2025-06-25 14:41:27 +08:00
CREATE INDEX "index_pipeline_template_id" ON "pi_pipeline" ("template_id");