From a2be5230fa5cd274abf2ee1b5f560be7db1f141d Mon Sep 17 00:00:00 2001 From: ning <710leo@gmail.com> Date: Thu, 30 May 2024 17:53:45 +0800 Subject: [PATCH] docs: change some sql --- .../a-n9e-for-Postgres.sql | 35 ++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/docker/compose-postgres/initsql_for_postgres/a-n9e-for-Postgres.sql b/docker/compose-postgres/initsql_for_postgres/a-n9e-for-Postgres.sql index 2114ccb1..95fb179c 100644 --- a/docker/compose-postgres/initsql_for_postgres/a-n9e-for-Postgres.sql +++ b/docker/compose-postgres/initsql_for_postgres/a-n9e-for-Postgres.sql @@ -850,4 +850,37 @@ CREATE TABLE board_busigroup ( busi_group_id BIGINT NOT NULL DEFAULT 0, board_id BIGINT NOT NULL DEFAULT 0, PRIMARY KEY (busi_group_id, board_id) -); \ No newline at end of file +); + + +CREATE TABLE builtin_components ( + id BIGSERIAL PRIMARY KEY, + ident VARCHAR(191) NOT NULL, + logo VARCHAR(191) NOT NULL, + readme TEXT NOT NULL, + created_at BIGINT NOT NULL DEFAULT 0, + created_by VARCHAR(191) NOT NULL DEFAULT '', + updated_at BIGINT NOT NULL DEFAULT 0, + updated_by VARCHAR(191) NOT NULL DEFAULT '' +); + +CREATE INDEX idx_ident ON builtin_components (ident); + +CREATE TABLE builtin_payloads ( + id BIGSERIAL PRIMARY KEY, + type VARCHAR(191) NOT NULL, + component VARCHAR(191) NOT NULL, + cate VARCHAR(191) NOT NULL, + name VARCHAR(191) NOT NULL, + tags VARCHAR(191) NOT NULL DEFAULT '', + content TEXT NOT NULL, + created_at BIGINT NOT NULL DEFAULT 0, + created_by VARCHAR(191) NOT NULL DEFAULT '', + updated_at BIGINT NOT NULL DEFAULT 0, + updated_by VARCHAR(191) NOT NULL DEFAULT '' +); + +CREATE INDEX idx_component ON builtin_payloads (component); +CREATE INDEX idx_name ON builtin_payloads (name); +CREATE INDEX idx_cate ON builtin_payloads (cate); +CREATE INDEX idx_type ON builtin_payloads (type); \ No newline at end of file