更新数据库表结构
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
Navicat Premium Dump SQL
|
||||
|
||||
Source Server : 智能控制平台
|
||||
Source Server Type : PostgreSQL
|
||||
Source Server Version : 150013 (150013)
|
||||
Source Host : 10.10.10.9:5432
|
||||
Source Catalog : ktor2
|
||||
Source Schema : public
|
||||
|
||||
Target Server Type : PostgreSQL
|
||||
Target Server Version : 150013 (150013)
|
||||
File Encoding : 65001
|
||||
|
||||
Date: 18/09/2025 16:10:12
|
||||
*/
|
||||
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for ai_reports_fields
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS "public"."ai_reports_fields";
|
||||
CREATE TABLE "public"."ai_reports_fields" (
|
||||
"id" uuid NOT NULL DEFAULT gen_random_uuid(),
|
||||
"table_id" uuid,
|
||||
"name" varchar(100) COLLATE "pg_catalog"."default",
|
||||
"type" varchar(50) COLLATE "pg_catalog"."default",
|
||||
"description" text COLLATE "pg_catalog"."default",
|
||||
"is_active" bool DEFAULT true,
|
||||
"create_by" uuid,
|
||||
"create_at" timestamptz(6) DEFAULT now()
|
||||
)
|
||||
;
|
||||
COMMENT ON COLUMN "public"."ai_reports_fields"."id" IS '主键';
|
||||
COMMENT ON COLUMN "public"."ai_reports_fields"."table_id" IS '外键,所属表';
|
||||
COMMENT ON COLUMN "public"."ai_reports_fields"."name" IS '数据库字段名';
|
||||
COMMENT ON COLUMN "public"."ai_reports_fields"."type" IS '数据库字段数据类型';
|
||||
COMMENT ON COLUMN "public"."ai_reports_fields"."description" IS '字段描述';
|
||||
COMMENT ON COLUMN "public"."ai_reports_fields"."is_active" IS '是否可用';
|
||||
COMMENT ON COLUMN "public"."ai_reports_fields"."create_by" IS '外键,创建人';
|
||||
COMMENT ON COLUMN "public"."ai_reports_fields"."create_at" IS '创建时间';
|
||||
COMMENT ON TABLE "public"."ai_reports_fields" IS 'AI报表-数据源-数据库表字段';
|
||||
|
||||
-- ----------------------------
|
||||
-- Primary Key structure for table ai_reports_fields
|
||||
-- ----------------------------
|
||||
ALTER TABLE "public"."ai_reports_fields" ADD CONSTRAINT "ai_reports_fields_pkey" PRIMARY KEY ("id");
|
||||
Reference in New Issue
Block a user