Jelajahi Sumber

table_init changes

Henry 1 tahun lalu
induk
melakukan
39dce95e98
1 mengubah file dengan 44 tambahan dan 0 penghapusan
  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,
                                          `result` longtext,
                                          `deployment_id` int(11) DEFAULT NULL,
                                          `deployment_id` int(11) DEFAULT NULL,
                                          PRIMARY KEY (`id`)
                                          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;
 )charset = utf8;