migration.sql 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292
  1. -- CreateTable
  2. CREATE TABLE `AWS_Policy_Role` (
  3. `id` VARCHAR(36) NOT NULL,
  4. `assistant_id` VARCHAR(36) NULL,
  5. `agent_bedrock_policy` LONGTEXT NULL,
  6. `agent_kb_schema_policy` LONGTEXT NULL,
  7. `kb_bedrock_policy` LONGTEXT NULL,
  8. `kb_aoss_policy` LONGTEXT NULL,
  9. `kb_s3_policy` LONGTEXT NULL,
  10. `agent_role_name` TEXT NULL,
  11. `kb_role_name` TEXT NULL,
  12. `createtime` DATETIME(0) NULL,
  13. PRIMARY KEY (`id`)
  14. ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
  15. -- CreateTable
  16. CREATE TABLE `Ai_Agent_Assistants` (
  17. `id` VARCHAR(36) NOT NULL,
  18. `userId` VARCHAR(255) NULL,
  19. `username` VARCHAR(255) NULL,
  20. `agent_sort` VARCHAR(255) NULL,
  21. `agent_tag` VARCHAR(255) NULL,
  22. `assistantName` VARCHAR(255) NULL,
  23. `description` LONGTEXT NULL,
  24. `prologue` LONGTEXT NULL,
  25. `headUrl` LONGTEXT NULL,
  26. `instructions` LONGTEXT NULL,
  27. `isRetrieval` BOOLEAN NULL,
  28. `isCode` BOOLEAN NULL,
  29. `isGoogle` BOOLEAN NULL,
  30. `isDalleImage` BOOLEAN NULL,
  31. `functionNames` LONGTEXT NULL,
  32. `functionContents` LONGTEXT NULL,
  33. `assistant_id` TEXT NULL,
  34. `thread_id` TEXT NULL,
  35. `file_ids` LONGTEXT NULL,
  36. `file_names` LONGTEXT NULL,
  37. `isPublish` BOOLEAN NULL,
  38. `organize_id` LONGTEXT NULL,
  39. `vector_store_id` TEXT NULL,
  40. `modelType` VARCHAR(255) NULL,
  41. `createtime` DATETIME(0) NULL,
  42. `updatetime` DATETIME(0) NULL,
  43. PRIMARY KEY (`id`)
  44. ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
  45. -- CreateTable
  46. CREATE TABLE `Ai_Agent_Threads` (
  47. `id` VARCHAR(36) NOT NULL,
  48. `userId` VARCHAR(255) NULL,
  49. `assistant_id` TEXT NULL,
  50. `thread_id` TEXT NULL,
  51. `createtime` DATETIME(0) NULL,
  52. `session_name` VARCHAR(255) NOT NULL DEFAULT '',
  53. PRIMARY KEY (`id`)
  54. ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
  55. -- CreateTable
  56. CREATE TABLE `Assistant` (
  57. `id` VARCHAR(36) NOT NULL,
  58. `uid` VARCHAR(36) NULL,
  59. `assistant_id` TEXT NULL,
  60. `thread_id` TEXT NULL,
  61. `file_ids` TEXT NULL,
  62. `vector_store_id` TEXT NULL,
  63. `createtime` DATETIME(0) NULL,
  64. PRIMARY KEY (`id`)
  65. ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
  66. -- CreateTable
  67. CREATE TABLE `Chat` (
  68. `id` VARCHAR(36) NOT NULL DEFAULT '',
  69. `groupid` VARCHAR(36) NULL,
  70. `userid` VARCHAR(36) NULL,
  71. `username` VARCHAR(255) NULL,
  72. `answer` TEXT NULL,
  73. `problem` LONGTEXT NULL,
  74. `createtime` DATETIME(0) NULL,
  75. `fileid` VARCHAR(36) NULL,
  76. `isMindMap` INTEGER NULL,
  77. `filename` VARCHAR(255) NULL,
  78. `session_name` VARCHAR(255) NOT NULL DEFAULT '',
  79. `scene` VARCHAR(255) NULL,
  80. INDEX `createtime`(`createtime`),
  81. INDEX `fileid`(`fileid`),
  82. INDEX `groupid`(`groupid`),
  83. INDEX `userid`(`userid`),
  84. PRIMARY KEY (`id`)
  85. ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
  86. -- CreateTable
  87. CREATE TABLE `Disposition` (
  88. `id` VARCHAR(36) NOT NULL,
  89. `module` VARCHAR(255) NULL,
  90. `disposition_class` VARCHAR(255) NULL,
  91. `disposition_type` VARCHAR(255) NULL,
  92. `disposition_style` VARCHAR(255) NULL,
  93. `disposition_theme` VARCHAR(255) NULL,
  94. `user_id` VARCHAR(36) NULL,
  95. `create_time` DATETIME(0) NULL,
  96. PRIMARY KEY (`id`)
  97. ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
  98. -- CreateTable
  99. CREATE TABLE `Group` (
  100. `id` VARCHAR(36) NOT NULL,
  101. `name` VARCHAR(255) NULL,
  102. `userid` VARCHAR(36) NULL,
  103. `createtime` DATETIME(0) NULL,
  104. PRIMARY KEY (`id`)
  105. ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
  106. -- CreateTable
  107. CREATE TABLE `GroupFile` (
  108. `id` VARCHAR(36) NOT NULL,
  109. `userid` VARCHAR(36) NULL,
  110. `fileurl` TEXT NULL,
  111. `filename` TEXT NULL,
  112. `groupid` VARCHAR(36) NULL,
  113. `abstract` TEXT NULL,
  114. `assistantFileId` VARCHAR(36) NULL,
  115. `modelType` VARCHAR(36) NULL,
  116. `createtime` DATETIME(0) NULL,
  117. INDEX `createtime`(`createtime`),
  118. INDEX `groupid`(`groupid`),
  119. PRIMARY KEY (`id`)
  120. ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
  121. -- CreateTable
  122. CREATE TABLE `InvitationCode` (
  123. `id` VARCHAR(36) NOT NULL,
  124. `cid` VARCHAR(36) NULL,
  125. `themeId` VARCHAR(36) NULL,
  126. `type` INTEGER NULL,
  127. `invitationCode` VARCHAR(36) NULL,
  128. `createtime` DATETIME(0) NULL,
  129. PRIMARY KEY (`id`)
  130. ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
  131. -- CreateTable
  132. CREATE TABLE `ai_agent_park_session` (
  133. `id` VARCHAR(36) NOT NULL,
  134. `session_name` VARCHAR(255) NULL,
  135. `user_id` VARCHAR(255) NULL,
  136. `isCocoNote` TINYINT NULL,
  137. `createtime` DATETIME(0) NULL,
  138. `work_area_text` LONGTEXT NULL,
  139. `scene` VARCHAR(255) NULL,
  140. PRIMARY KEY (`id`)
  141. ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
  142. -- CreateTable
  143. CREATE TABLE `classroom_ob_comment` (
  144. `id` VARCHAR(255) NOT NULL,
  145. `module_id` VARCHAR(255) NOT NULL,
  146. `module_name` VARCHAR(255) NULL,
  147. `nickname` VARCHAR(255) NULL,
  148. `commentContent` LONGTEXT NULL,
  149. `audit_status` INTEGER NOT NULL DEFAULT 0,
  150. `t_id` VARCHAR(36) NULL,
  151. `create_time` DATETIME(0) NULL,
  152. INDEX `tid_status`(`audit_status`, `t_id`),
  153. PRIMARY KEY (`id`)
  154. ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
  155. -- CreateTable
  156. CREATE TABLE `classroom_observation` (
  157. `id` VARCHAR(36) NOT NULL,
  158. `jsonData` LONGTEXT NULL,
  159. `Type` INTEGER NULL,
  160. `tIndex` INTEGER NULL,
  161. `tId` VARCHAR(36) NULL,
  162. `createtime` DATETIME(0) NULL,
  163. `like_num` INTEGER NOT NULL DEFAULT 0,
  164. `like_data` LONGTEXT NULL,
  165. `userid` VARCHAR(255) NULL,
  166. `isdel` INTEGER NULL DEFAULT 0,
  167. `limitData` LONGTEXT NULL,
  168. INDEX `Type`(`Type`),
  169. INDEX `createtime`(`createtime`),
  170. INDEX `tIndex`(`tIndex`),
  171. INDEX `type_tid`(`Type`, `tId`),
  172. PRIMARY KEY (`id`)
  173. ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
  174. -- CreateTable
  175. CREATE TABLE `course_resource` (
  176. `id` VARCHAR(36) NOT NULL,
  177. `subject` VARCHAR(255) NULL,
  178. `grade` VARCHAR(255) NULL,
  179. `textbook` VARCHAR(255) NULL,
  180. `book_type` VARCHAR(255) NULL,
  181. `unit` VARCHAR(255) NULL,
  182. `period` VARCHAR(255) NULL,
  183. `unit_content` LONGTEXT NULL,
  184. `course_content` LONGTEXT NULL,
  185. PRIMARY KEY (`id`)
  186. ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
  187. -- CreateTable
  188. CREATE TABLE `knowledge_construction_doc` (
  189. `id` VARCHAR(255) NOT NULL,
  190. `muti_id` VARCHAR(255) NULL,
  191. `user_id` VARCHAR(255) NULL,
  192. `session_id` VARCHAR(255) NULL,
  193. `content` LONGTEXT NULL,
  194. `create_time` DATETIME(0) NULL,
  195. PRIMARY KEY (`id`)
  196. ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
  197. -- CreateTable
  198. CREATE TABLE `meeting_trick` (
  199. `id` VARCHAR(36) NOT NULL,
  200. `createtime` DATETIME(0) NULL,
  201. `userid` VARCHAR(255) NULL,
  202. `meeting_name` VARCHAR(255) NULL,
  203. `meeting_original` LONGTEXT NULL,
  204. `meeting_minutes` LONGTEXT NULL,
  205. `audio_url` VARCHAR(255) NULL,
  206. `duration` VARCHAR(255) NULL,
  207. `ab` LONGTEXT NULL,
  208. INDEX `get_meeting_trick`(`userid`),
  209. PRIMARY KEY (`id`)
  210. ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
  211. -- CreateTable
  212. CREATE TABLE `meeting_trick_chat` (
  213. `id` VARCHAR(36) NOT NULL,
  214. `meeting_id` VARCHAR(36) NULL,
  215. `createtime` DATETIME(0) NULL,
  216. `user_content` TEXT NULL,
  217. `ai_content` TEXT NULL,
  218. INDEX `get_meeting_trick_chat`(`meeting_id`),
  219. PRIMARY KEY (`id`)
  220. ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
  221. -- CreateTable
  222. CREATE TABLE `muti_agent_list` (
  223. `id` VARCHAR(255) NOT NULL,
  224. `userid` VARCHAR(255) NULL,
  225. `username` VARCHAR(255) NULL,
  226. `muti_name` VARCHAR(255) NULL,
  227. `description` LONGTEXT NULL,
  228. `isPublish` BOOLEAN NULL,
  229. `organizeid` LONGTEXT NULL,
  230. `content` LONGTEXT NULL,
  231. `create_time` DATETIME(0) NULL,
  232. `knowledge_construction` INTEGER NULL,
  233. INDEX `index_id`(`id`),
  234. PRIMARY KEY (`id`)
  235. ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
  236. -- CreateTable
  237. CREATE TABLE `park_chat_file_list` (
  238. `id` VARCHAR(255) NOT NULL,
  239. `user_id` VARCHAR(255) NULL,
  240. `file_names` LONGTEXT NOT NULL,
  241. `file_ids` LONGTEXT NOT NULL,
  242. `create_time` DATETIME(0) NULL,
  243. `file_urls` LONGTEXT NULL,
  244. PRIMARY KEY (`id`)
  245. ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
  246. -- CreateTable
  247. CREATE TABLE `token` (
  248. `id` VARCHAR(255) NOT NULL,
  249. `schoolId` VARCHAR(255) NULL,
  250. `key` VARCHAR(255) NULL,
  251. `createUsername` VARCHAR(255) NULL,
  252. `createtime` DATETIME(0) NULL,
  253. PRIMARY KEY (`id`)
  254. ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;