mirror of
https://github.com/certd/certd.git
synced 2026-04-15 05:00:52 +08:00
19 lines
686 B
SQL
19 lines
686 B
SQL
CREATE TABLE "pi_template"
|
|
(
|
|
"id" integer PRIMARY KEY AUTOINCREMENT NOT NULL,
|
|
"user_id" integer,
|
|
"pipeline_id" integer,
|
|
"title" varchar(1024),
|
|
"content" text,
|
|
"order" integer,
|
|
"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");
|
|
|
|
ALTER TABLE pi_pipeline ADD COLUMN "template_id" integer DEFAULT 0;
|
|
CREATE INDEX "index_pipeline_template_id" ON "pi_pipeline" ("template_id");
|