-- public.log_error definition -- Drop table -- DROP TABLE log_error; CREATE TABLE log_error ( id bigserial PRIMARY KEY, -- 主键 "exception" text NULL, -- 异常 message text NULL, -- 异常消息 error_info text NULL, -- 异常详细消息 error_stack_trace text NULL, -- 异常堆栈 create_time timestamp(0) DEFAULT now() NULL -- 创建时间 ); COMMENT ON COLUMN public.log_error.id IS '主键'; COMMENT ON COLUMN public.log_error."exception" IS '异常'; COMMENT ON COLUMN public.log_error.message IS '异常消息'; COMMENT ON COLUMN public.log_error.error_info IS '异常详细消息'; COMMENT ON COLUMN public.log_error.error_stack_trace IS '异常堆栈'; COMMENT ON COLUMN public.log_error.create_time IS '创建时间'; DROP TABLE chat_history; CREATE TABLE chat_history ( id bigserial PRIMARY KEY, -- 主键 user_id text NULL, -- 用户id "user_Q" text NULL, -- 用户提问 "chat_A" text NULL, -- chat回答 create_time timestamp(0) DEFAULT now() NULL, -- 创建时间 update_time timestamp(0) DEFAULT now() NULL, -- 更改时间 is_deleted int4 DEFAULT 0 NULL -- 是否删除 ); COMMENT ON COLUMN public.chat_history.id IS '主键'; COMMENT ON COLUMN public.chat_history.user_id IS '用户id'; COMMENT ON COLUMN public.chat_history."user_Q" IS '用户提问'; COMMENT ON COLUMN public.chat_history."chat_A" IS 'chat回答'; COMMENT ON COLUMN public.chat_history.create_time IS '创建时间'; COMMENT ON COLUMN public.chat_history.update_time IS '更改时间'; COMMENT ON COLUMN public.chat_history.is_deleted IS '是否删除';