소스 검색

table_init changes

Henry 1 년 전
부모
커밋
39dce95e98
1개의 변경된 파일44개의 추가작업 그리고 0개의 파일을 삭제
  1. 44 0
      web/src/main/resources/sql/table_init.sql

+ 44 - 0
web/src/main/resources/sql/table_init.sql

@@ -308,4 +308,48 @@ CREATE TABLE if not exists devcloud.interface_test_result (
                                          `result` longtext,
                                          `deployment_id` int(11) DEFAULT NULL,
                                          PRIMARY KEY (`id`)
+)charset = utf8;
+
+
+create table if not exists dify_message
+(
+    id              bigint auto_increment
+        primary key,
+    user_id         bigint       not null,
+    conversation_id varchar(255) null,
+    created_time    datetime     not null,
+    role            varchar(50)  null,
+    content         text         null
+)charset = utf8;
+
+
+create table if not exists conversation
+(
+    id              bigint auto_increment
+        primary key,
+    user_id         bigint                             not null,
+    conversation_id varchar(255)                       not null,
+    created_time    datetime default CURRENT_TIMESTAMP null,
+    category        varchar(50)                        null,
+    constraint conversation_id
+        unique (conversation_id)
+)charset = utf8;
+
+create table if not exists file_change
+(
+    id           bigint auto_increment
+        primary key,
+    user_id      bigint   not null,
+    old_file_id  bigint   not null,
+    new_file_id  bigint   not null,
+    created_time datetime not null
+)charset = utf8;
+
+create table if not exists code_file
+(
+    id           bigint auto_increment
+        primary key,
+    file_path    varchar(255) not null,
+    created_time datetime     not null,
+    content      text         null
 )charset = utf8;