TestLaboratory.sql 40 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750
  1. /*
  2. Navicat Premium Data Transfer
  3. Source Server : localhost_3306
  4. Source Server Type : MySQL
  5. Source Server Version : 80029
  6. Source Host : localhost:3306
  7. Source Schema : TestLaboratory
  8. Target Server Type : MySQL
  9. Target Server Version : 80029
  10. File Encoding : 65001
  11. Date: 20/06/2022 13:11:57
  12. */
  13. SET NAMES utf8mb4;
  14. SET FOREIGN_KEY_CHECKS = 0;
  15. -- ----------------------------
  16. -- Table structure for auth_group
  17. -- ----------------------------
  18. DROP TABLE IF EXISTS `auth_group`;
  19. CREATE TABLE `auth_group` (
  20. `id` int NOT NULL AUTO_INCREMENT,
  21. `name` varchar(150) NOT NULL,
  22. PRIMARY KEY (`id`),
  23. UNIQUE KEY `name` (`name`)
  24. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
  25. -- ----------------------------
  26. -- Records of auth_group
  27. -- ----------------------------
  28. BEGIN;
  29. COMMIT;
  30. -- ----------------------------
  31. -- Table structure for auth_group_permissions
  32. -- ----------------------------
  33. DROP TABLE IF EXISTS `auth_group_permissions`;
  34. CREATE TABLE `auth_group_permissions` (
  35. `id` bigint NOT NULL AUTO_INCREMENT,
  36. `group_id` int NOT NULL,
  37. `permission_id` int NOT NULL,
  38. PRIMARY KEY (`id`),
  39. UNIQUE KEY `auth_group_permissions_group_id_permission_id_0cd325b0_uniq` (`group_id`,`permission_id`),
  40. KEY `auth_group_permissio_permission_id_84c5c92e_fk_auth_perm` (`permission_id`),
  41. CONSTRAINT `auth_group_permissio_permission_id_84c5c92e_fk_auth_perm` FOREIGN KEY (`permission_id`) REFERENCES `auth_permission` (`id`),
  42. CONSTRAINT `auth_group_permissions_group_id_b120cbf9_fk_auth_group_id` FOREIGN KEY (`group_id`) REFERENCES `auth_group` (`id`)
  43. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
  44. -- ----------------------------
  45. -- Records of auth_group_permissions
  46. -- ----------------------------
  47. BEGIN;
  48. COMMIT;
  49. -- ----------------------------
  50. -- Table structure for auth_permission
  51. -- ----------------------------
  52. DROP TABLE IF EXISTS `auth_permission`;
  53. CREATE TABLE `auth_permission` (
  54. `id` int NOT NULL AUTO_INCREMENT,
  55. `name` varchar(255) NOT NULL,
  56. `content_type_id` int NOT NULL,
  57. `codename` varchar(100) NOT NULL,
  58. PRIMARY KEY (`id`),
  59. UNIQUE KEY `auth_permission_content_type_id_codename_01ab375a_uniq` (`content_type_id`,`codename`),
  60. CONSTRAINT `auth_permission_content_type_id_2f476e4b_fk_django_co` FOREIGN KEY (`content_type_id`) REFERENCES `django_content_type` (`id`)
  61. ) ENGINE=InnoDB AUTO_INCREMENT=65 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
  62. -- ----------------------------
  63. -- Records of auth_permission
  64. -- ----------------------------
  65. BEGIN;
  66. INSERT INTO `auth_permission` VALUES (1, 'Can add log entry', 1, 'add_logentry');
  67. INSERT INTO `auth_permission` VALUES (2, 'Can change log entry', 1, 'change_logentry');
  68. INSERT INTO `auth_permission` VALUES (3, 'Can delete log entry', 1, 'delete_logentry');
  69. INSERT INTO `auth_permission` VALUES (4, 'Can view log entry', 1, 'view_logentry');
  70. INSERT INTO `auth_permission` VALUES (5, 'Can add permission', 2, 'add_permission');
  71. INSERT INTO `auth_permission` VALUES (6, 'Can change permission', 2, 'change_permission');
  72. INSERT INTO `auth_permission` VALUES (7, 'Can delete permission', 2, 'delete_permission');
  73. INSERT INTO `auth_permission` VALUES (8, 'Can view permission', 2, 'view_permission');
  74. INSERT INTO `auth_permission` VALUES (9, 'Can add group', 3, 'add_group');
  75. INSERT INTO `auth_permission` VALUES (10, 'Can change group', 3, 'change_group');
  76. INSERT INTO `auth_permission` VALUES (11, 'Can delete group', 3, 'delete_group');
  77. INSERT INTO `auth_permission` VALUES (12, 'Can view group', 3, 'view_group');
  78. INSERT INTO `auth_permission` VALUES (13, 'Can add user', 4, 'add_user');
  79. INSERT INTO `auth_permission` VALUES (14, 'Can change user', 4, 'change_user');
  80. INSERT INTO `auth_permission` VALUES (15, 'Can delete user', 4, 'delete_user');
  81. INSERT INTO `auth_permission` VALUES (16, 'Can view user', 4, 'view_user');
  82. INSERT INTO `auth_permission` VALUES (17, 'Can add content type', 5, 'add_contenttype');
  83. INSERT INTO `auth_permission` VALUES (18, 'Can change content type', 5, 'change_contenttype');
  84. INSERT INTO `auth_permission` VALUES (19, 'Can delete content type', 5, 'delete_contenttype');
  85. INSERT INTO `auth_permission` VALUES (20, 'Can view content type', 5, 'view_contenttype');
  86. INSERT INTO `auth_permission` VALUES (21, 'Can add session', 6, 'add_session');
  87. INSERT INTO `auth_permission` VALUES (22, 'Can change session', 6, 'change_session');
  88. INSERT INTO `auth_permission` VALUES (23, 'Can delete session', 6, 'delete_session');
  89. INSERT INTO `auth_permission` VALUES (24, 'Can view session', 6, 'view_session');
  90. INSERT INTO `auth_permission` VALUES (25, 'Can add 权限', 7, 'add_permission');
  91. INSERT INTO `auth_permission` VALUES (26, 'Can change 权限', 7, 'change_permission');
  92. INSERT INTO `auth_permission` VALUES (27, 'Can delete 权限', 7, 'delete_permission');
  93. INSERT INTO `auth_permission` VALUES (28, 'Can view 权限', 7, 'view_permission');
  94. INSERT INTO `auth_permission` VALUES (29, 'Can add 角色', 8, 'add_role');
  95. INSERT INTO `auth_permission` VALUES (30, 'Can change 角色', 8, 'change_role');
  96. INSERT INTO `auth_permission` VALUES (31, 'Can delete 角色', 8, 'delete_role');
  97. INSERT INTO `auth_permission` VALUES (32, 'Can view 角色', 8, 'view_role');
  98. INSERT INTO `auth_permission` VALUES (33, 'Can add 用户', 9, 'add_user');
  99. INSERT INTO `auth_permission` VALUES (34, 'Can change 用户', 9, 'change_user');
  100. INSERT INTO `auth_permission` VALUES (35, 'Can delete 用户', 9, 'delete_user');
  101. INSERT INTO `auth_permission` VALUES (36, 'Can view 用户', 9, 'view_user');
  102. INSERT INTO `auth_permission` VALUES (37, 'Can add 被测试软件', 10, 'add_software');
  103. INSERT INTO `auth_permission` VALUES (38, 'Can change 被测试软件', 10, 'change_software');
  104. INSERT INTO `auth_permission` VALUES (39, 'Can delete 被测试软件', 10, 'delete_software');
  105. INSERT INTO `auth_permission` VALUES (40, 'Can view 被测试软件', 10, 'view_software');
  106. INSERT INTO `auth_permission` VALUES (41, 'Can add 软件版本', 11, 'add_version');
  107. INSERT INTO `auth_permission` VALUES (42, 'Can change 软件版本', 11, 'change_version');
  108. INSERT INTO `auth_permission` VALUES (43, 'Can delete 软件版本', 11, 'delete_version');
  109. INSERT INTO `auth_permission` VALUES (44, 'Can view 软件版本', 11, 'view_version');
  110. INSERT INTO `auth_permission` VALUES (45, 'Can add 测试计划', 12, 'add_testplan');
  111. INSERT INTO `auth_permission` VALUES (46, 'Can change 测试计划', 12, 'change_testplan');
  112. INSERT INTO `auth_permission` VALUES (47, 'Can delete 测试计划', 12, 'delete_testplan');
  113. INSERT INTO `auth_permission` VALUES (48, 'Can view 测试计划', 12, 'view_testplan');
  114. INSERT INTO `auth_permission` VALUES (49, 'Can add 测试任务', 13, 'add_testtask');
  115. INSERT INTO `auth_permission` VALUES (50, 'Can change 测试任务', 13, 'change_testtask');
  116. INSERT INTO `auth_permission` VALUES (51, 'Can delete 测试任务', 13, 'delete_testtask');
  117. INSERT INTO `auth_permission` VALUES (52, 'Can view 测试任务', 13, 'view_testtask');
  118. INSERT INTO `auth_permission` VALUES (53, 'Can add 测试用例', 14, 'add_testcase');
  119. INSERT INTO `auth_permission` VALUES (54, 'Can change 测试用例', 14, 'change_testcase');
  120. INSERT INTO `auth_permission` VALUES (55, 'Can delete 测试用例', 14, 'delete_testcase');
  121. INSERT INTO `auth_permission` VALUES (56, 'Can view 测试用例', 14, 'view_testcase');
  122. INSERT INTO `auth_permission` VALUES (57, 'Can add 文件管理', 15, 'add_filemanager');
  123. INSERT INTO `auth_permission` VALUES (58, 'Can change 文件管理', 15, 'change_filemanager');
  124. INSERT INTO `auth_permission` VALUES (59, 'Can delete 文件管理', 15, 'delete_filemanager');
  125. INSERT INTO `auth_permission` VALUES (60, 'Can view 文件管理', 15, 'view_filemanager');
  126. INSERT INTO `auth_permission` VALUES (61, 'Can add 日志', 16, 'add_log');
  127. INSERT INTO `auth_permission` VALUES (62, 'Can change 日志', 16, 'change_log');
  128. INSERT INTO `auth_permission` VALUES (63, 'Can delete 日志', 16, 'delete_log');
  129. INSERT INTO `auth_permission` VALUES (64, 'Can view 日志', 16, 'view_log');
  130. COMMIT;
  131. -- ----------------------------
  132. -- Table structure for auth_user
  133. -- ----------------------------
  134. DROP TABLE IF EXISTS `auth_user`;
  135. CREATE TABLE `auth_user` (
  136. `id` int NOT NULL AUTO_INCREMENT,
  137. `password` varchar(128) NOT NULL,
  138. `last_login` datetime(6) DEFAULT NULL,
  139. `is_superuser` tinyint(1) NOT NULL,
  140. `username` varchar(150) NOT NULL,
  141. `first_name` varchar(150) NOT NULL,
  142. `last_name` varchar(150) NOT NULL,
  143. `email` varchar(254) NOT NULL,
  144. `is_staff` tinyint(1) NOT NULL,
  145. `is_active` tinyint(1) NOT NULL,
  146. `date_joined` datetime(6) NOT NULL,
  147. PRIMARY KEY (`id`),
  148. UNIQUE KEY `username` (`username`)
  149. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
  150. -- ----------------------------
  151. -- Records of auth_user
  152. -- ----------------------------
  153. BEGIN;
  154. COMMIT;
  155. -- ----------------------------
  156. -- Table structure for auth_user_groups
  157. -- ----------------------------
  158. DROP TABLE IF EXISTS `auth_user_groups`;
  159. CREATE TABLE `auth_user_groups` (
  160. `id` bigint NOT NULL AUTO_INCREMENT,
  161. `user_id` int NOT NULL,
  162. `group_id` int NOT NULL,
  163. PRIMARY KEY (`id`),
  164. UNIQUE KEY `auth_user_groups_user_id_group_id_94350c0c_uniq` (`user_id`,`group_id`),
  165. KEY `auth_user_groups_group_id_97559544_fk_auth_group_id` (`group_id`),
  166. CONSTRAINT `auth_user_groups_group_id_97559544_fk_auth_group_id` FOREIGN KEY (`group_id`) REFERENCES `auth_group` (`id`),
  167. CONSTRAINT `auth_user_groups_user_id_6a12ed8b_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`)
  168. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
  169. -- ----------------------------
  170. -- Records of auth_user_groups
  171. -- ----------------------------
  172. BEGIN;
  173. COMMIT;
  174. -- ----------------------------
  175. -- Table structure for auth_user_user_permissions
  176. -- ----------------------------
  177. DROP TABLE IF EXISTS `auth_user_user_permissions`;
  178. CREATE TABLE `auth_user_user_permissions` (
  179. `id` bigint NOT NULL AUTO_INCREMENT,
  180. `user_id` int NOT NULL,
  181. `permission_id` int NOT NULL,
  182. PRIMARY KEY (`id`),
  183. UNIQUE KEY `auth_user_user_permissions_user_id_permission_id_14a6b632_uniq` (`user_id`,`permission_id`),
  184. KEY `auth_user_user_permi_permission_id_1fbb5f2c_fk_auth_perm` (`permission_id`),
  185. CONSTRAINT `auth_user_user_permi_permission_id_1fbb5f2c_fk_auth_perm` FOREIGN KEY (`permission_id`) REFERENCES `auth_permission` (`id`),
  186. CONSTRAINT `auth_user_user_permissions_user_id_a95ead1b_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`)
  187. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
  188. -- ----------------------------
  189. -- Records of auth_user_user_permissions
  190. -- ----------------------------
  191. BEGIN;
  192. COMMIT;
  193. -- ----------------------------
  194. -- Table structure for django_admin_log
  195. -- ----------------------------
  196. DROP TABLE IF EXISTS `django_admin_log`;
  197. CREATE TABLE `django_admin_log` (
  198. `id` int NOT NULL AUTO_INCREMENT,
  199. `action_time` datetime(6) NOT NULL,
  200. `object_id` longtext,
  201. `object_repr` varchar(200) NOT NULL,
  202. `action_flag` smallint unsigned NOT NULL,
  203. `change_message` longtext NOT NULL,
  204. `content_type_id` int DEFAULT NULL,
  205. `user_id` int NOT NULL,
  206. PRIMARY KEY (`id`),
  207. KEY `django_admin_log_content_type_id_c4bce8eb_fk_django_co` (`content_type_id`),
  208. KEY `django_admin_log_user_id_c564eba6_fk_auth_user_id` (`user_id`),
  209. CONSTRAINT `django_admin_log_content_type_id_c4bce8eb_fk_django_co` FOREIGN KEY (`content_type_id`) REFERENCES `django_content_type` (`id`),
  210. CONSTRAINT `django_admin_log_user_id_c564eba6_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`),
  211. CONSTRAINT `django_admin_log_chk_1` CHECK ((`action_flag` >= 0))
  212. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
  213. -- ----------------------------
  214. -- Records of django_admin_log
  215. -- ----------------------------
  216. BEGIN;
  217. COMMIT;
  218. -- ----------------------------
  219. -- Table structure for django_content_type
  220. -- ----------------------------
  221. DROP TABLE IF EXISTS `django_content_type`;
  222. CREATE TABLE `django_content_type` (
  223. `id` int NOT NULL AUTO_INCREMENT,
  224. `app_label` varchar(100) NOT NULL,
  225. `model` varchar(100) NOT NULL,
  226. PRIMARY KEY (`id`),
  227. UNIQUE KEY `django_content_type_app_label_model_76bd3d3b_uniq` (`app_label`,`model`)
  228. ) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
  229. -- ----------------------------
  230. -- Records of django_content_type
  231. -- ----------------------------
  232. BEGIN;
  233. INSERT INTO `django_content_type` VALUES (1, 'admin', 'logentry');
  234. INSERT INTO `django_content_type` VALUES (3, 'auth', 'group');
  235. INSERT INTO `django_content_type` VALUES (2, 'auth', 'permission');
  236. INSERT INTO `django_content_type` VALUES (4, 'auth', 'user');
  237. INSERT INTO `django_content_type` VALUES (5, 'contenttypes', 'contenttype');
  238. INSERT INTO `django_content_type` VALUES (15, 'file', 'filemanager');
  239. INSERT INTO `django_content_type` VALUES (16, 'log', 'log');
  240. INSERT INTO `django_content_type` VALUES (12, 'plan', 'testplan');
  241. INSERT INTO `django_content_type` VALUES (6, 'sessions', 'session');
  242. INSERT INTO `django_content_type` VALUES (10, 'software', 'software');
  243. INSERT INTO `django_content_type` VALUES (11, 'software', 'version');
  244. INSERT INTO `django_content_type` VALUES (14, 'task', 'testcase');
  245. INSERT INTO `django_content_type` VALUES (13, 'task', 'testtask');
  246. INSERT INTO `django_content_type` VALUES (7, 'user', 'permission');
  247. INSERT INTO `django_content_type` VALUES (8, 'user', 'role');
  248. INSERT INTO `django_content_type` VALUES (9, 'user', 'user');
  249. COMMIT;
  250. -- ----------------------------
  251. -- Table structure for django_migrations
  252. -- ----------------------------
  253. DROP TABLE IF EXISTS `django_migrations`;
  254. CREATE TABLE `django_migrations` (
  255. `id` bigint NOT NULL AUTO_INCREMENT,
  256. `app` varchar(255) NOT NULL,
  257. `name` varchar(255) NOT NULL,
  258. `applied` datetime(6) NOT NULL,
  259. PRIMARY KEY (`id`)
  260. ) ENGINE=InnoDB AUTO_INCREMENT=31 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
  261. -- ----------------------------
  262. -- Records of django_migrations
  263. -- ----------------------------
  264. BEGIN;
  265. INSERT INTO `django_migrations` VALUES (1, 'contenttypes', '0001_initial', '2022-06-19 10:44:32.394371');
  266. INSERT INTO `django_migrations` VALUES (2, 'auth', '0001_initial', '2022-06-19 10:44:32.487851');
  267. INSERT INTO `django_migrations` VALUES (3, 'admin', '0001_initial', '2022-06-19 10:44:32.512785');
  268. INSERT INTO `django_migrations` VALUES (4, 'admin', '0002_logentry_remove_auto_add', '2022-06-19 10:44:32.517001');
  269. INSERT INTO `django_migrations` VALUES (5, 'admin', '0003_logentry_add_action_flag_choices', '2022-06-19 10:44:32.521252');
  270. INSERT INTO `django_migrations` VALUES (6, 'contenttypes', '0002_remove_content_type_name', '2022-06-19 10:44:32.537446');
  271. INSERT INTO `django_migrations` VALUES (7, 'auth', '0002_alter_permission_name_max_length', '2022-06-19 10:44:32.549952');
  272. INSERT INTO `django_migrations` VALUES (8, 'auth', '0003_alter_user_email_max_length', '2022-06-19 10:44:32.559319');
  273. INSERT INTO `django_migrations` VALUES (9, 'auth', '0004_alter_user_username_opts', '2022-06-19 10:44:32.564573');
  274. INSERT INTO `django_migrations` VALUES (10, 'auth', '0005_alter_user_last_login_null', '2022-06-19 10:44:32.575576');
  275. INSERT INTO `django_migrations` VALUES (11, 'auth', '0006_require_contenttypes_0002', '2022-06-19 10:44:32.576488');
  276. INSERT INTO `django_migrations` VALUES (12, 'auth', '0007_alter_validators_add_error_messages', '2022-06-19 10:44:32.581006');
  277. INSERT INTO `django_migrations` VALUES (13, 'auth', '0008_alter_user_username_max_length', '2022-06-19 10:44:32.596255');
  278. INSERT INTO `django_migrations` VALUES (14, 'auth', '0009_alter_user_last_name_max_length', '2022-06-19 10:44:32.609861');
  279. INSERT INTO `django_migrations` VALUES (15, 'auth', '0010_alter_group_name_max_length', '2022-06-19 10:44:32.617614');
  280. INSERT INTO `django_migrations` VALUES (16, 'auth', '0011_update_proxy_permissions', '2022-06-19 10:44:32.621214');
  281. INSERT INTO `django_migrations` VALUES (17, 'auth', '0012_alter_user_first_name_max_length', '2022-06-19 10:44:32.633468');
  282. INSERT INTO `django_migrations` VALUES (18, 'file', '0001_initial', '2022-06-19 10:44:32.640435');
  283. INSERT INTO `django_migrations` VALUES (19, 'file', '0002_alter_filemanager_id', '2022-06-19 10:44:32.647955');
  284. INSERT INTO `django_migrations` VALUES (20, 'log', '0001_initial', '2022-06-19 10:44:32.657577');
  285. INSERT INTO `django_migrations` VALUES (21, 'log', '0002_alter_log_id', '2022-06-19 10:44:32.665621');
  286. INSERT INTO `django_migrations` VALUES (22, 'user', '0001_initial', '2022-06-19 10:44:32.726788');
  287. INSERT INTO `django_migrations` VALUES (23, 'software', '0001_initial', '2022-06-19 10:44:32.751318');
  288. INSERT INTO `django_migrations` VALUES (24, 'plan', '0001_initial', '2022-06-19 10:44:32.795555');
  289. INSERT INTO `django_migrations` VALUES (25, 'plan', '0002_alter_testplan_id', '2022-06-19 10:44:32.806378');
  290. INSERT INTO `django_migrations` VALUES (26, 'sessions', '0001_initial', '2022-06-19 10:44:32.814163');
  291. INSERT INTO `django_migrations` VALUES (27, 'software', '0002_alter_software_name', '2022-06-19 10:44:32.825552');
  292. INSERT INTO `django_migrations` VALUES (28, 'task', '0001_initial', '2022-06-19 10:44:32.893446');
  293. INSERT INTO `django_migrations` VALUES (29, 'task', '0002_alter_testtask_id', '2022-06-19 10:44:32.938279');
  294. INSERT INTO `django_migrations` VALUES (30, 'user', '0002_auto_20220619_1043', '2022-06-19 10:44:33.059425');
  295. COMMIT;
  296. -- ----------------------------
  297. -- Table structure for django_session
  298. -- ----------------------------
  299. DROP TABLE IF EXISTS `django_session`;
  300. CREATE TABLE `django_session` (
  301. `session_key` varchar(40) NOT NULL,
  302. `session_data` longtext NOT NULL,
  303. `expire_date` datetime(6) NOT NULL,
  304. PRIMARY KEY (`session_key`),
  305. KEY `django_session_expire_date_a5c62663` (`expire_date`)
  306. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
  307. -- ----------------------------
  308. -- Records of django_session
  309. -- ----------------------------
  310. BEGIN;
  311. COMMIT;
  312. -- ----------------------------
  313. -- Table structure for file_manager
  314. -- ----------------------------
  315. DROP TABLE IF EXISTS `file_manager`;
  316. CREATE TABLE `file_manager` (
  317. `id` varchar(128) NOT NULL,
  318. `path` varchar(200) NOT NULL,
  319. `create_time` datetime(6) NOT NULL,
  320. `update_time` datetime(6) NOT NULL,
  321. `delete` tinyint(1) NOT NULL,
  322. `category` varchar(20) NOT NULL,
  323. PRIMARY KEY (`id`)
  324. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
  325. -- ----------------------------
  326. -- Records of file_manager
  327. -- ----------------------------
  328. BEGIN;
  329. COMMIT;
  330. -- ----------------------------
  331. -- Table structure for log
  332. -- ----------------------------
  333. DROP TABLE IF EXISTS `log`;
  334. CREATE TABLE `log` (
  335. `id` varchar(128) NOT NULL,
  336. `action` varchar(100) NOT NULL,
  337. `entity_class` varchar(50) NOT NULL,
  338. `entity_name` varchar(50) DEFAULT NULL,
  339. `method` varchar(30) NOT NULL,
  340. `executor_id` varchar(50) NOT NULL,
  341. `executor_username` varchar(50) NOT NULL,
  342. `executor_identify` int NOT NULL,
  343. `create_time` datetime(6) NOT NULL,
  344. `update_time` datetime(6) NOT NULL,
  345. `delete` tinyint(1) NOT NULL,
  346. PRIMARY KEY (`id`)
  347. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
  348. -- ----------------------------
  349. -- Records of log
  350. -- ----------------------------
  351. BEGIN;
  352. COMMIT;
  353. -- ----------------------------
  354. -- Table structure for permission
  355. -- ----------------------------
  356. DROP TABLE IF EXISTS `permission`;
  357. CREATE TABLE `permission` (
  358. `id` varchar(128) NOT NULL,
  359. `name` varchar(25) NOT NULL,
  360. `url` varchar(125) DEFAULT NULL,
  361. `method` varchar(20) DEFAULT NULL,
  362. `create_time` datetime(6) NOT NULL,
  363. `update_time` datetime(6) NOT NULL,
  364. `delete` tinyint(1) NOT NULL,
  365. PRIMARY KEY (`id`)
  366. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
  367. -- ----------------------------
  368. -- Records of permission
  369. -- ----------------------------
  370. BEGIN;
  371. INSERT INTO `permission` VALUES ('TestLaboratory_V1_Permission_1', '新建测试目标', '/api/v1/software', 'POST', '2021-07-14 10:20:49.000000', '2021-07-14 10:20:51.000000', 0);
  372. INSERT INTO `permission` VALUES ('TestLaboratory_V1_Permission_10', '导出测试用例', '/api/v1/software/.*/versions', 'GET', '2021-07-14 10:31:00.000000', '2021-07-14 10:31:03.000000', 0);
  373. INSERT INTO `permission` VALUES ('TestLaboratory_V1_Permission_11', '创建测试计划', '/api/v1/test-plans', 'POST', '2021-07-14 10:32:39.000000', '2021-07-14 10:32:41.000000', 0);
  374. INSERT INTO `permission` VALUES ('TestLaboratory_V1_Permission_12', '查看测试计划列表', '/api/v1/test-plans', 'GET', '2021-07-14 10:33:34.000000', '2021-07-14 10:33:39.000000', 0);
  375. INSERT INTO `permission` VALUES ('TestLaboratory_V1_Permission_13', '编辑测试计划', '/api/v1/test-plans/.*/edit', 'POST', '2021-07-14 10:34:37.000000', '2021-07-14 10:34:41.000000', 0);
  376. INSERT INTO `permission` VALUES ('TestLaboratory_V1_Permission_14', '查看测试计划', '/api/v1/test-plans/.*', 'GET', '2021-07-14 10:35:27.000000', '2021-07-14 10:35:30.000000', 0);
  377. INSERT INTO `permission` VALUES ('TestLaboratory_V1_Permission_15', '删除测试计划', '/api/v1/test-plans/.*', 'DELETE', '2021-07-14 10:35:53.000000', '2021-07-14 10:35:56.000000', 0);
  378. INSERT INTO `permission` VALUES ('TestLaboratory_V1_Permission_16', '创建测试任务', '/api/v1/test-tasks', 'POST', '2021-07-14 10:37:00.000000', '2021-07-14 10:37:04.000000', 0);
  379. INSERT INTO `permission` VALUES ('TestLaboratory_V1_Permission_17', '查看测试任务列表', '/api/v1/test-tasks', 'GET', '2021-07-14 10:37:43.000000', '2021-07-14 10:37:47.000000', 0);
  380. INSERT INTO `permission` VALUES ('TestLaboratory_V1_Permission_18', '查看测试任务', '/api/v1/test-tasks/.*', 'GET', '2021-07-14 10:38:34.000000', '2021-07-14 10:38:37.000000', 0);
  381. INSERT INTO `permission` VALUES ('TestLaboratory_V1_Permission_19', '编辑测试任务', '/api/v1/test-tasks/.*/edit', 'POST', '2021-07-14 10:39:01.000000', '2021-07-14 10:39:05.000000', 0);
  382. INSERT INTO `permission` VALUES ('TestLaboratory_V1_Permission_2', '查看测试目标列表', '/api/v1/software', 'GET', '2021-07-14 10:23:46.000000', '2021-07-14 10:23:49.000000', 0);
  383. INSERT INTO `permission` VALUES ('TestLaboratory_V1_Permission_20', '删除测试任务', '/api/v1/test-tasks/.*', 'DELETE', '2021-07-14 10:39:54.000000', '2021-07-14 10:39:58.000000', 0);
  384. INSERT INTO `permission` VALUES ('TestLaboratory_V1_Permission_21', '执行测试任务', '/api/v1/test-tasks/.*/case-file/execute', 'POST', '2021-07-14 10:40:58.000000', '2021-07-14 10:41:01.000000', 0);
  385. INSERT INTO `permission` VALUES ('TestLaboratory_V1_Permission_22', '导出测试用例', '/api/v1/test-tasks/.*/case-file', 'GET', '2021-07-14 10:42:06.000000', '2021-07-14 10:42:12.000000', 0);
  386. INSERT INTO `permission` VALUES ('TestLaboratory_V1_Permission_23', '查看用户列表', '/api/v1/users', 'GET', '2021-07-15 11:22:54.000000', '2021-07-15 11:22:57.000000', 0);
  387. INSERT INTO `permission` VALUES ('TestLaboratory_V1_Permission_24', '上传文件', '/api/v1/file', 'POST', '2021-07-17 11:08:14.000000', '2021-07-17 11:08:18.000000', 0);
  388. INSERT INTO `permission` VALUES ('TestLaboratory_V1_Permission_25', '删除文件', '/api/v1/file', 'DELETE', '2021-07-17 11:08:14.000000', '2021-07-17 11:08:18.000000', 0);
  389. INSERT INTO `permission` VALUES ('TestLaboratory_V1_Permission_26', '查看用户', '/api/v1/users/.*', 'GET', '2021-07-17 17:18:35.000000', '2021-07-17 17:18:38.000000', 0);
  390. INSERT INTO `permission` VALUES ('TestLaboratory_V1_Permission_27', '编辑用户信息', '/api/v1/users/.*/edit', 'POST', '2021-07-15 11:22:54.000000', '2021-07-15 11:22:57.000000', 0);
  391. INSERT INTO `permission` VALUES ('TestLaboratory_V1_Permission_28', '查看版本列表', '/api/v1/software/versions', 'GET', '2021-07-20 17:32:29.000000', '2021-07-20 17:32:33.000000', 0);
  392. INSERT INTO `permission` VALUES ('TestLaboratory_V1_Permission_3', '查看测试目标', '/api/v1/software/.*', 'GET', '2021-07-14 10:25:16.000000', '2021-07-14 10:25:19.000000', 0);
  393. INSERT INTO `permission` VALUES ('TestLaboratory_V1_Permission_4', '编辑测试目标', '/api/v1/software/.*/edit', 'POST', '2021-07-14 10:25:48.000000', '2021-07-14 10:25:50.000000', 0);
  394. INSERT INTO `permission` VALUES ('TestLaboratory_V1_Permission_5', '删除测试目标', '/api/v1/software/.*', 'DELETE', '2021-07-14 10:26:40.000000', '2021-07-14 10:26:42.000000', 0);
  395. INSERT INTO `permission` VALUES ('TestLaboratory_V1_Permission_6', '生成测试报告', '/api/v1/software/.*/report', 'GET', '2021-07-14 10:27:43.000000', '2021-07-14 10:27:46.000000', 0);
  396. INSERT INTO `permission` VALUES ('TestLaboratory_V1_Permission_7', '新建版本', '/api/v1/software/.*/versions', 'POST', '2021-07-14 10:29:22.000000', '2021-07-14 10:29:25.000000', 0);
  397. INSERT INTO `permission` VALUES ('TestLaboratory_V1_Permission_8', '编辑版本', '/api/v1/software/.*/versions/edit', 'POST', '2021-07-14 10:29:51.000000', '2021-07-14 10:29:59.000000', 0);
  398. INSERT INTO `permission` VALUES ('TestLaboratory_V1_Permission_9', '删除版本', '/api/v1/software/.*/versions', 'DELETE', '2021-07-14 10:30:31.000000', '2021-07-14 10:30:33.000000', 0);
  399. COMMIT;
  400. -- ----------------------------
  401. -- Table structure for plan
  402. -- ----------------------------
  403. DROP TABLE IF EXISTS `plan`;
  404. CREATE TABLE `plan` (
  405. `id` varchar(128) NOT NULL,
  406. `title` varchar(30) NOT NULL,
  407. `version` varchar(20) NOT NULL,
  408. `state` int NOT NULL,
  409. `description` longtext NOT NULL,
  410. `statement_file` longtext NOT NULL,
  411. `create_time` datetime(6) NOT NULL,
  412. `update_time` datetime(6) NOT NULL,
  413. `delete` tinyint(1) NOT NULL,
  414. `creator_id` varchar(128) DEFAULT NULL,
  415. `software_id` varchar(30) NOT NULL,
  416. PRIMARY KEY (`id`),
  417. KEY `plan_software_id_4b28cc2e_fk_software_id` (`software_id`),
  418. KEY `plan_creator_id_c94ecd21_fk` (`creator_id`),
  419. CONSTRAINT `plan_creator_id_c94ecd21_fk` FOREIGN KEY (`creator_id`) REFERENCES `user` (`id`),
  420. CONSTRAINT `plan_software_id_4b28cc2e_fk_software_id` FOREIGN KEY (`software_id`) REFERENCES `software` (`id`)
  421. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
  422. -- ----------------------------
  423. -- Records of plan
  424. -- ----------------------------
  425. BEGIN;
  426. COMMIT;
  427. -- ----------------------------
  428. -- Table structure for role
  429. -- ----------------------------
  430. DROP TABLE IF EXISTS `role`;
  431. CREATE TABLE `role` (
  432. `id` varchar(128) NOT NULL,
  433. `name` varchar(25) NOT NULL,
  434. `create_time` datetime(6) NOT NULL,
  435. `update_time` datetime(6) NOT NULL,
  436. `delete` tinyint(1) NOT NULL,
  437. PRIMARY KEY (`id`),
  438. UNIQUE KEY `name` (`name`)
  439. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
  440. -- ----------------------------
  441. -- Records of role
  442. -- ----------------------------
  443. BEGIN;
  444. INSERT INTO `role` VALUES ('TestLaboratory_V1_Role_1', '系统管理员', '2021-07-14 10:44:26.000000', '2021-07-14 10:44:34.000000', 0);
  445. INSERT INTO `role` VALUES ('TestLaboratory_V1_Role_2', '测试管理员', '2021-07-14 10:44:53.000000', '2021-07-14 10:44:56.000000', 0);
  446. INSERT INTO `role` VALUES ('TestLaboratory_V1_Role_3', '测试工程师', '2021-07-14 10:45:12.000000', '2021-07-14 10:45:15.000000', 0);
  447. COMMIT;
  448. -- ----------------------------
  449. -- Table structure for role_permissions
  450. -- ----------------------------
  451. DROP TABLE IF EXISTS `role_permissions`;
  452. CREATE TABLE `role_permissions` (
  453. `id` bigint NOT NULL AUTO_INCREMENT,
  454. `role_id` varchar(128) NOT NULL,
  455. `permission_id` varchar(128) NOT NULL,
  456. PRIMARY KEY (`id`),
  457. UNIQUE KEY `role_permissions_role_id_permission_id_04f77df0_uniq` (`role_id`,`permission_id`),
  458. KEY `role_permissions_permission_id_ad343843_fk_permission_id` (`permission_id`)
  459. ) ENGINE=InnoDB AUTO_INCREMENT=67 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
  460. -- ----------------------------
  461. -- Records of role_permissions
  462. -- ----------------------------
  463. BEGIN;
  464. INSERT INTO `role_permissions` VALUES (1, 'TestLaboratory_V1_Role_1', 'TestLaboratory_V1_Permission_1');
  465. INSERT INTO `role_permissions` VALUES (10, 'TestLaboratory_V1_Role_1', 'TestLaboratory_V1_Permission_10');
  466. INSERT INTO `role_permissions` VALUES (11, 'TestLaboratory_V1_Role_1', 'TestLaboratory_V1_Permission_11');
  467. INSERT INTO `role_permissions` VALUES (12, 'TestLaboratory_V1_Role_1', 'TestLaboratory_V1_Permission_12');
  468. INSERT INTO `role_permissions` VALUES (13, 'TestLaboratory_V1_Role_1', 'TestLaboratory_V1_Permission_13');
  469. INSERT INTO `role_permissions` VALUES (14, 'TestLaboratory_V1_Role_1', 'TestLaboratory_V1_Permission_14');
  470. INSERT INTO `role_permissions` VALUES (15, 'TestLaboratory_V1_Role_1', 'TestLaboratory_V1_Permission_15');
  471. INSERT INTO `role_permissions` VALUES (16, 'TestLaboratory_V1_Role_1', 'TestLaboratory_V1_Permission_16');
  472. INSERT INTO `role_permissions` VALUES (17, 'TestLaboratory_V1_Role_1', 'TestLaboratory_V1_Permission_17');
  473. INSERT INTO `role_permissions` VALUES (18, 'TestLaboratory_V1_Role_1', 'TestLaboratory_V1_Permission_18');
  474. INSERT INTO `role_permissions` VALUES (19, 'TestLaboratory_V1_Role_1', 'TestLaboratory_V1_Permission_19');
  475. INSERT INTO `role_permissions` VALUES (2, 'TestLaboratory_V1_Role_1', 'TestLaboratory_V1_Permission_2');
  476. INSERT INTO `role_permissions` VALUES (20, 'TestLaboratory_V1_Role_1', 'TestLaboratory_V1_Permission_20');
  477. INSERT INTO `role_permissions` VALUES (21, 'TestLaboratory_V1_Role_1', 'TestLaboratory_V1_Permission_21');
  478. INSERT INTO `role_permissions` VALUES (51, 'TestLaboratory_V1_Role_1', 'TestLaboratory_V1_Permission_23');
  479. INSERT INTO `role_permissions` VALUES (54, 'TestLaboratory_V1_Role_1', 'TestLaboratory_V1_Permission_24');
  480. INSERT INTO `role_permissions` VALUES (56, 'TestLaboratory_V1_Role_1', 'TestLaboratory_V1_Permission_25');
  481. INSERT INTO `role_permissions` VALUES (58, 'TestLaboratory_V1_Role_1', 'TestLaboratory_V1_Permission_26');
  482. INSERT INTO `role_permissions` VALUES (61, 'TestLaboratory_V1_Role_1', 'TestLaboratory_V1_Permission_27');
  483. INSERT INTO `role_permissions` VALUES (65, 'TestLaboratory_V1_Role_1', 'TestLaboratory_V1_Permission_28');
  484. INSERT INTO `role_permissions` VALUES (3, 'TestLaboratory_V1_Role_1', 'TestLaboratory_V1_Permission_3');
  485. INSERT INTO `role_permissions` VALUES (4, 'TestLaboratory_V1_Role_1', 'TestLaboratory_V1_Permission_4');
  486. INSERT INTO `role_permissions` VALUES (5, 'TestLaboratory_V1_Role_1', 'TestLaboratory_V1_Permission_5');
  487. INSERT INTO `role_permissions` VALUES (6, 'TestLaboratory_V1_Role_1', 'TestLaboratory_V1_Permission_6');
  488. INSERT INTO `role_permissions` VALUES (7, 'TestLaboratory_V1_Role_1', 'TestLaboratory_V1_Permission_7');
  489. INSERT INTO `role_permissions` VALUES (8, 'TestLaboratory_V1_Role_1', 'TestLaboratory_V1_Permission_8');
  490. INSERT INTO `role_permissions` VALUES (9, 'TestLaboratory_V1_Role_1', 'TestLaboratory_V1_Permission_9');
  491. INSERT INTO `role_permissions` VALUES (22, 'TestLaboratory_V1_Role_2', 'TestLaboratory_V1_Permission_1');
  492. INSERT INTO `role_permissions` VALUES (31, 'TestLaboratory_V1_Role_2', 'TestLaboratory_V1_Permission_10');
  493. INSERT INTO `role_permissions` VALUES (32, 'TestLaboratory_V1_Role_2', 'TestLaboratory_V1_Permission_11');
  494. INSERT INTO `role_permissions` VALUES (33, 'TestLaboratory_V1_Role_2', 'TestLaboratory_V1_Permission_12');
  495. INSERT INTO `role_permissions` VALUES (34, 'TestLaboratory_V1_Role_2', 'TestLaboratory_V1_Permission_13');
  496. INSERT INTO `role_permissions` VALUES (35, 'TestLaboratory_V1_Role_2', 'TestLaboratory_V1_Permission_14');
  497. INSERT INTO `role_permissions` VALUES (36, 'TestLaboratory_V1_Role_2', 'TestLaboratory_V1_Permission_15');
  498. INSERT INTO `role_permissions` VALUES (37, 'TestLaboratory_V1_Role_2', 'TestLaboratory_V1_Permission_16');
  499. INSERT INTO `role_permissions` VALUES (38, 'TestLaboratory_V1_Role_2', 'TestLaboratory_V1_Permission_17');
  500. INSERT INTO `role_permissions` VALUES (39, 'TestLaboratory_V1_Role_2', 'TestLaboratory_V1_Permission_18');
  501. INSERT INTO `role_permissions` VALUES (40, 'TestLaboratory_V1_Role_2', 'TestLaboratory_V1_Permission_19');
  502. INSERT INTO `role_permissions` VALUES (23, 'TestLaboratory_V1_Role_2', 'TestLaboratory_V1_Permission_2');
  503. INSERT INTO `role_permissions` VALUES (41, 'TestLaboratory_V1_Role_2', 'TestLaboratory_V1_Permission_20');
  504. INSERT INTO `role_permissions` VALUES (42, 'TestLaboratory_V1_Role_2', 'TestLaboratory_V1_Permission_21');
  505. INSERT INTO `role_permissions` VALUES (52, 'TestLaboratory_V1_Role_2', 'TestLaboratory_V1_Permission_23');
  506. INSERT INTO `role_permissions` VALUES (55, 'TestLaboratory_V1_Role_2', 'TestLaboratory_V1_Permission_24');
  507. INSERT INTO `role_permissions` VALUES (57, 'TestLaboratory_V1_Role_2', 'TestLaboratory_V1_Permission_25');
  508. INSERT INTO `role_permissions` VALUES (59, 'TestLaboratory_V1_Role_2', 'TestLaboratory_V1_Permission_26');
  509. INSERT INTO `role_permissions` VALUES (62, 'TestLaboratory_V1_Role_2', 'TestLaboratory_V1_Permission_27');
  510. INSERT INTO `role_permissions` VALUES (66, 'TestLaboratory_V1_Role_2', 'TestLaboratory_V1_Permission_28');
  511. INSERT INTO `role_permissions` VALUES (24, 'TestLaboratory_V1_Role_2', 'TestLaboratory_V1_Permission_3');
  512. INSERT INTO `role_permissions` VALUES (25, 'TestLaboratory_V1_Role_2', 'TestLaboratory_V1_Permission_4');
  513. INSERT INTO `role_permissions` VALUES (26, 'TestLaboratory_V1_Role_2', 'TestLaboratory_V1_Permission_5');
  514. INSERT INTO `role_permissions` VALUES (27, 'TestLaboratory_V1_Role_2', 'TestLaboratory_V1_Permission_6');
  515. INSERT INTO `role_permissions` VALUES (28, 'TestLaboratory_V1_Role_2', 'TestLaboratory_V1_Permission_7');
  516. INSERT INTO `role_permissions` VALUES (29, 'TestLaboratory_V1_Role_2', 'TestLaboratory_V1_Permission_8');
  517. INSERT INTO `role_permissions` VALUES (30, 'TestLaboratory_V1_Role_2', 'TestLaboratory_V1_Permission_9');
  518. INSERT INTO `role_permissions` VALUES (45, 'TestLaboratory_V1_Role_3', 'TestLaboratory_V1_Permission_12');
  519. INSERT INTO `role_permissions` VALUES (46, 'TestLaboratory_V1_Role_3', 'TestLaboratory_V1_Permission_14');
  520. INSERT INTO `role_permissions` VALUES (47, 'TestLaboratory_V1_Role_3', 'TestLaboratory_V1_Permission_17');
  521. INSERT INTO `role_permissions` VALUES (48, 'TestLaboratory_V1_Role_3', 'TestLaboratory_V1_Permission_18');
  522. INSERT INTO `role_permissions` VALUES (64, 'TestLaboratory_V1_Role_3', 'TestLaboratory_V1_Permission_19');
  523. INSERT INTO `role_permissions` VALUES (43, 'TestLaboratory_V1_Role_3', 'TestLaboratory_V1_Permission_2');
  524. INSERT INTO `role_permissions` VALUES (49, 'TestLaboratory_V1_Role_3', 'TestLaboratory_V1_Permission_21');
  525. INSERT INTO `role_permissions` VALUES (50, 'TestLaboratory_V1_Role_3', 'TestLaboratory_V1_Permission_22');
  526. INSERT INTO `role_permissions` VALUES (53, 'TestLaboratory_V1_Role_3', 'TestLaboratory_V1_Permission_23');
  527. INSERT INTO `role_permissions` VALUES (60, 'TestLaboratory_V1_Role_3', 'TestLaboratory_V1_Permission_26');
  528. INSERT INTO `role_permissions` VALUES (63, 'TestLaboratory_V1_Role_3', 'TestLaboratory_V1_Permission_27');
  529. INSERT INTO `role_permissions` VALUES (44, 'TestLaboratory_V1_Role_3', 'TestLaboratory_V1_Permission_3');
  530. COMMIT;
  531. -- ----------------------------
  532. -- Table structure for software
  533. -- ----------------------------
  534. DROP TABLE IF EXISTS `software`;
  535. CREATE TABLE `software` (
  536. `name` varchar(128) NOT NULL,
  537. `id` varchar(30) NOT NULL,
  538. `type` varchar(20) NOT NULL,
  539. `report_file` longtext,
  540. `create_time` datetime(6) NOT NULL,
  541. `update_time` datetime(6) NOT NULL,
  542. `delete` tinyint(1) NOT NULL,
  543. PRIMARY KEY (`id`)
  544. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
  545. -- ----------------------------
  546. -- Records of software
  547. -- ----------------------------
  548. BEGIN;
  549. INSERT INTO `software` VALUES ('test1', 'TestLaboratory_V1_Software_1', '功能测试', NULL, '1900-01-20 15:25:09.000000', '1900-01-20 15:25:09.000000', 0);
  550. COMMIT;
  551. -- ----------------------------
  552. -- Table structure for task
  553. -- ----------------------------
  554. DROP TABLE IF EXISTS `task`;
  555. CREATE TABLE `task` (
  556. `id` varchar(128) NOT NULL,
  557. `title` varchar(50) NOT NULL,
  558. `state` int NOT NULL,
  559. `description` longtext NOT NULL,
  560. `statement_file` longtext NOT NULL,
  561. `case_file` longtext,
  562. `case_all` int DEFAULT NULL,
  563. `case_not_execute` int DEFAULT NULL,
  564. `case_success` int DEFAULT NULL,
  565. `case_fail` int DEFAULT NULL,
  566. `create_time` datetime(6) NOT NULL,
  567. `update_time` datetime(6) NOT NULL,
  568. `delete` tinyint(1) NOT NULL,
  569. `plan_id` varchar(128) NOT NULL,
  570. PRIMARY KEY (`id`),
  571. KEY `task_plan_id_77395325_fk_plan_id` (`plan_id`),
  572. CONSTRAINT `task_plan_id_77395325_fk_plan_id` FOREIGN KEY (`plan_id`) REFERENCES `plan` (`id`)
  573. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
  574. -- ----------------------------
  575. -- Records of task
  576. -- ----------------------------
  577. BEGIN;
  578. COMMIT;
  579. -- ----------------------------
  580. -- Table structure for task_executor
  581. -- ----------------------------
  582. DROP TABLE IF EXISTS `task_executor`;
  583. CREATE TABLE `task_executor` (
  584. `id` bigint NOT NULL AUTO_INCREMENT,
  585. `testtask_id` varchar(128) NOT NULL,
  586. `user_id` varchar(128) NOT NULL,
  587. PRIMARY KEY (`id`),
  588. UNIQUE KEY `task_executor_testtask_id_user_id_33019daf_uniq` (`testtask_id`,`user_id`),
  589. KEY `task_executor_user_id_0f117fee_fk_user_id` (`user_id`)
  590. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
  591. -- ----------------------------
  592. -- Records of task_executor
  593. -- ----------------------------
  594. BEGIN;
  595. COMMIT;
  596. -- ----------------------------
  597. -- Table structure for test_case
  598. -- ----------------------------
  599. DROP TABLE IF EXISTS `test_case`;
  600. CREATE TABLE `test_case` (
  601. `id` varchar(30) NOT NULL,
  602. `id_in_task` varchar(30) NOT NULL,
  603. `version` varchar(30) DEFAULT NULL,
  604. `name` varchar(50) NOT NULL,
  605. `state` int NOT NULL,
  606. `writer` varchar(30) DEFAULT NULL,
  607. `executor` varchar(30) DEFAULT NULL,
  608. `assessor` varchar(30) DEFAULT NULL,
  609. `requisite` longtext,
  610. `priority` varchar(10) DEFAULT NULL,
  611. `environment` longtext,
  612. `type` varchar(30) DEFAULT NULL,
  613. `process` longtext NOT NULL,
  614. `expected_result` longtext NOT NULL,
  615. `actual_result` longtext,
  616. `create_time` datetime(6) NOT NULL,
  617. `update_time` datetime(6) NOT NULL,
  618. `delete` tinyint(1) NOT NULL,
  619. `remark` longtext,
  620. `software_id` varchar(30) DEFAULT NULL,
  621. `task_id` varchar(128) NOT NULL,
  622. PRIMARY KEY (`id`),
  623. KEY `test_case_software_id_b7e9af75_fk_software_id` (`software_id`),
  624. KEY `test_case_task_id_6c501356_fk` (`task_id`),
  625. CONSTRAINT `test_case_software_id_b7e9af75_fk_software_id` FOREIGN KEY (`software_id`) REFERENCES `software` (`id`),
  626. CONSTRAINT `test_case_task_id_6c501356_fk` FOREIGN KEY (`task_id`) REFERENCES `task` (`id`)
  627. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
  628. -- ----------------------------
  629. -- Records of test_case
  630. -- ----------------------------
  631. BEGIN;
  632. COMMIT;
  633. -- ----------------------------
  634. -- Table structure for user
  635. -- ----------------------------
  636. DROP TABLE IF EXISTS `user`;
  637. CREATE TABLE `user` (
  638. `id` varchar(128) NOT NULL,
  639. `username` varchar(30) NOT NULL,
  640. `name` varchar(20) NOT NULL,
  641. `password` varchar(60) NOT NULL,
  642. `tel` varchar(20) NOT NULL,
  643. `identify` int NOT NULL,
  644. `create_time` datetime(6) NOT NULL,
  645. `update_time` datetime(6) NOT NULL,
  646. `is_login` tinyint(1) NOT NULL,
  647. `delete` tinyint(1) NOT NULL,
  648. `group` varchar(128) NOT NULL,
  649. PRIMARY KEY (`id`),
  650. UNIQUE KEY `username` (`username`)
  651. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
  652. -- ----------------------------
  653. -- Records of user
  654. -- ----------------------------
  655. BEGIN;
  656. INSERT INTO `user` VALUES ('TestLaboratory_V1_User_1', 'honghong', '小红', '123456', '18851111391', 1, '2021-07-13 14:23:25.000000', '2022-06-19 12:19:23.861094', 1, 0, '默认分组');
  657. INSERT INTO `user` VALUES ('TestLaboratory_V1_User_2', 'zxc', '小蓝', '123456', '11223344556', 2, '2021-09-26 15:41:37.000000', '1900-01-20 17:33:18.000000', 1, 0, '默认分组');
  658. INSERT INTO `user` VALUES ('TestLaboratory_V1_User_3', 'bcd', '小黄', '123456', '138138138138', 2, '2021-09-26 15:44:39.000000', '2021-09-26 15:44:43.000000', 0, 0, '默认分组');
  659. INSERT INTO `user` VALUES ('TestLaboratory_V1_User_4', 'doctor', '医生', '12345', '13888', 1, '2022-06-19 11:21:02.296993', '2022-06-20 12:17:07.818682', 1, 0, '教室');
  660. COMMIT;
  661. -- ----------------------------
  662. -- Table structure for user_roles
  663. -- ----------------------------
  664. DROP TABLE IF EXISTS `user_roles`;
  665. CREATE TABLE `user_roles` (
  666. `id` bigint NOT NULL AUTO_INCREMENT,
  667. `user_id` varchar(128) NOT NULL,
  668. `role_id` varchar(128) NOT NULL,
  669. PRIMARY KEY (`id`),
  670. UNIQUE KEY `user_roles_user_id_role_id_69bfd9a0_uniq` (`user_id`,`role_id`),
  671. KEY `user_roles_role_id_816a4486_fk_role_id` (`role_id`)
  672. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
  673. -- ----------------------------
  674. -- Records of user_roles
  675. -- ----------------------------
  676. BEGIN;
  677. COMMIT;
  678. -- ----------------------------
  679. -- Table structure for version
  680. -- ----------------------------
  681. DROP TABLE IF EXISTS `version`;
  682. CREATE TABLE `version` (
  683. `id` varchar(30) NOT NULL,
  684. `number` varchar(20) NOT NULL,
  685. `version_file` longtext NOT NULL,
  686. `create_time` datetime(6) NOT NULL,
  687. `update_time` datetime(6) NOT NULL,
  688. `delete` tinyint(1) NOT NULL,
  689. `software_id` varchar(30) NOT NULL,
  690. PRIMARY KEY (`id`),
  691. KEY `version_software_id_d30b116d` (`software_id`),
  692. CONSTRAINT `version_software_id_d30b116d_fk_software_id` FOREIGN KEY (`software_id`) REFERENCES `software` (`id`)
  693. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
  694. -- ----------------------------
  695. -- Records of version
  696. -- ----------------------------
  697. BEGIN;
  698. COMMIT;
  699. SET FOREIGN_KEY_CHECKS = 1;