Просмотр исходного кода

chore: 整合初始化建表语句

370774330@qq.com 5 лет назад
Родитель
Сommit
a7f40c063f

+ 0 - 29
web/src/main/resources/SQLScripts/test_info.sql

@@ -1,29 +0,0 @@
-/*
- Navicat Premium Data Transfer
-
- Source Server         : zhaoxingrui
- Source Server Type    : MySQL
- Source Server Version : 80016
- Source Host           : localhost:3306
- Source Schema         : devcloud
-
- Target Server Type    : MySQL
- Target Server Version : 80016
- File Encoding         : 65001
-
- Date: 20/04/2021 21:43:55
-*/
-CREATE TABLE `test_info` (
-  `test_id` int(11) NOT NULL AUTO_INCREMENT,
-  `test_name` varchar(255) NOT NULL,
-  `project_id` int(11) NOT NULL,
-  `username` varchar(255) NOT NULL,
-  `create_time` datetime NOT NULL,
-  `url` varchar(255) NOT NULL,
-  `params` json DEFAULT NULL,
-  `qps` int(11) NOT NULL,
-  `method` varchar(255) NOT NULL,
-  PRIMARY KEY (`test_id`)
-) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
-
-SET FOREIGN_KEY_CHECKS = 1;

+ 0 - 29
web/src/main/resources/SQLScripts/test_result.sql

@@ -1,29 +0,0 @@
-/*
- Navicat Premium Data Transfer
-
- Source Server         : zhaoxingrui
- Source Server Type    : MySQL
- Source Server Version : 80016
- Source Host           : localhost:3306
- Source Schema         : devcloud
-
- Target Server Type    : MySQL
- Target Server Version : 80016
- File Encoding         : 65001
-
- Date: 20/04/2021 21:44:04
-*/
-CREATE TABLE `test_result` (
-  `id` int(11) NOT NULL AUTO_INCREMENT,
-  `test_id` int(11) NOT NULL,
-  `execute_time` datetime NOT NULL,
-  `success` int(11) NOT NULL DEFAULT '0',
-  `failure` int(11) NOT NULL DEFAULT '0',
-  `time_list` text NOT NULL,
-  `max_time` int(11) NOT NULL,
-  `min_time` int(11) NOT NULL,
-  `average_time` double NOT NULL,
-  PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
-
-SET FOREIGN_KEY_CHECKS = 1;

+ 14 - 0
web/src/main/resources/sql/init.sql

@@ -76,6 +76,20 @@ create table if not exists devcloud.stage_config
     editable tinyint(1)  null
 );
 
+create table if not exists devcloud.test_info
+(
+    test_id     int auto_increment
+        primary key,
+    test_name   varchar(255) not null,
+    project_id  int          not null,
+    username    varchar(255) not null,
+    create_time datetime     not null,
+    url         varchar(255) not null,
+    params      json         null,
+    qps         int          not null,
+    method      varchar(255) not null
+);
+
 create table if not exists devcloud.test_result
 (
     id           int auto_increment