pg.sql 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. -- public.log_error definition
  2. -- Drop table
  3. -- DROP TABLE log_error;
  4. CREATE TABLE log_error (
  5. id bigserial PRIMARY KEY, -- 主键
  6. "exception" text NULL, -- 异常
  7. message text NULL, -- 异常消息
  8. error_info text NULL, -- 异常详细消息
  9. error_stack_trace text NULL, -- 异常堆栈
  10. create_time timestamp(0) DEFAULT now() NULL -- 创建时间
  11. );
  12. COMMENT ON COLUMN public.log_error.id IS '主键';
  13. COMMENT ON COLUMN public.log_error."exception" IS '异常';
  14. COMMENT ON COLUMN public.log_error.message IS '异常消息';
  15. COMMENT ON COLUMN public.log_error.error_info IS '异常详细消息';
  16. COMMENT ON COLUMN public.log_error.error_stack_trace IS '异常堆栈';
  17. COMMENT ON COLUMN public.log_error.create_time IS '创建时间';
  18. DROP TABLE chat_history;
  19. CREATE TABLE chat_history (
  20. id bigserial PRIMARY KEY, -- 主键
  21. user_id text NULL, -- 用户id
  22. "user_Q" text NULL, -- 用户提问
  23. "chat_A" text NULL, -- chat回答
  24. create_time timestamp(0) DEFAULT now() NULL, -- 创建时间
  25. update_time timestamp(0) DEFAULT now() NULL, -- 更改时间
  26. is_deleted int4 DEFAULT 0 NULL -- 是否删除
  27. );
  28. COMMENT ON COLUMN public.chat_history.id IS '主键';
  29. COMMENT ON COLUMN public.chat_history.user_id IS '用户id';
  30. COMMENT ON COLUMN public.chat_history."user_Q" IS '用户提问';
  31. COMMENT ON COLUMN public.chat_history."chat_A" IS 'chat回答';
  32. COMMENT ON COLUMN public.chat_history.create_time IS '创建时间';
  33. COMMENT ON COLUMN public.chat_history.update_time IS '更改时间';
  34. COMMENT ON COLUMN public.chat_history.is_deleted IS '是否删除';