mirror of
https://github.com/certd/certd.git
synced 2026-07-12 16:27:34 +08:00
build: 数据库迁移脚本同步
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
CREATE TABLE "cd_cert_apply_template"
|
||||
(
|
||||
"id" bigint PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY NOT NULL,
|
||||
"user_id" bigint NOT NULL,
|
||||
"project_id" bigint NULL,
|
||||
"name" varchar(100) NOT NULL,
|
||||
"content" text NOT NULL,
|
||||
"is_default" boolean NOT NULL DEFAULT (false),
|
||||
"disabled" boolean NOT NULL DEFAULT (false),
|
||||
"create_time" timestamp NOT NULL DEFAULT (CURRENT_TIMESTAMP),
|
||||
"update_time" timestamp NOT NULL DEFAULT (CURRENT_TIMESTAMP)
|
||||
);
|
||||
|
||||
CREATE INDEX "index_cert_apply_template_user_id" ON "cd_cert_apply_template" ("user_id");
|
||||
CREATE INDEX "index_cert_apply_template_project_id" ON "cd_cert_apply_template" ("project_id");
|
||||
CREATE INDEX "index_cert_apply_template_default" ON "cd_cert_apply_template" ("user_id", "project_id", "is_default");
|
||||
Reference in New Issue
Block a user