From c8cdf5e14b71d09f3cab231feda3e8dbd4ae0c0e Mon Sep 17 00:00:00 2001 From: Parker Date: Mon, 21 Dec 2020 10:15:57 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=87=E7=BA=A7=20=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=BA=93=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db-file/v1.1.1 升级 v1.1.2/升级SQL.txt | 139 +++++++++++++++++++++ 1 file changed, 139 insertions(+) diff --git a/db-file/v1.1.1 升级 v1.1.2/升级SQL.txt b/db-file/v1.1.1 升级 v1.1.2/升级SQL.txt index 243515c..a6d2efe 100644 --- a/db-file/v1.1.1 升级 v1.1.2/升级SQL.txt +++ b/db-file/v1.1.1 升级 v1.1.2/升级SQL.txt @@ -9,3 +9,142 @@ alter table sys_user drop index unique_username ; ### 2. 增加新索引 alter table sys_user add index `sys_user_index` (`username`,`real_name`); +### 3. 增加表 +-- ---------------------------- +-- Table structure for test_car +-- ---------------------------- +DROP TABLE IF EXISTS `test_car`; +CREATE TABLE `test_car` ( + `id` bigint(19) NOT NULL COMMENT '主键', + `car_name` varchar(20) COLLATE utf8mb4_general_ci NOT NULL COMMENT '汽车名称', + `car_type` varchar(20) COLLATE utf8mb4_general_ci NOT NULL COMMENT '汽车类型', + `car_brand` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '汽车品牌', + `produce_data` date NOT NULL COMMENT '生产日期', + `iz_usable` char(1) COLLATE utf8mb4_general_ci NOT NULL COMMENT '是否启用', + `tenant_id` bigint(19) DEFAULT NULL COMMENT '多租户ID', + `deleted` char(1) COLLATE utf8mb4_general_ci NOT NULL COMMENT '删除标记:0未删除,1删除', + `version` int(10) NOT NULL COMMENT '版本号(乐观锁)', + `create_by` bigint(19) NOT NULL COMMENT '创建用户', + `create_time` datetime NOT NULL COMMENT '创建日期', + `update_by` bigint(19) NOT NULL COMMENT '修改用户', + `update_time` datetime NOT NULL COMMENT '修改日期', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='测试汽车'; + +-- ---------------------------- +-- Records of test_car +-- ---------------------------- +BEGIN; +INSERT INTO `test_car` VALUES (1340634224709677058, '奔驰GXX', 'Gxx', '奔驰', '2020-12-20', '1', 1, '0', 0, 1313694379541635074, '2020-12-20 20:24:42', 1313694379541635074, '2020-12-20 20:24:42'); +INSERT INTO `test_car` VALUES (1340634337075081217, '北汽绅宝', '电动', '绅宝', '2020-12-13', '1', 1, '0', 0, 1313694379541635074, '2020-12-20 20:25:08', 1313694379541635074, '2020-12-20 20:25:08'); +INSERT INTO `test_car` VALUES (1340634432696823810, '宝马7系', '烧油', '宝马', '2020-12-20', '0', 1, '0', 0, 1313694379541635074, '2020-12-20 20:25:31', 1313694379541635074, '2020-12-20 20:25:31'); +INSERT INTO `test_car` VALUES (1340634485616357378, '测试', '123', '123', '2020-12-07', '0', 1, '1', 0, 1313694379541635074, '2020-12-20 20:25:44', 1313694379541635074, '2020-12-20 20:25:44'); +INSERT INTO `test_car` VALUES (1340635288087375874, '宝马7系', '烧油', '宝马', '2020-12-20', '0', 1, '0', 0, 1313694379541635074, '2020-12-20 20:28:55', 1313694379541635074, '2020-12-20 20:28:55'); +INSERT INTO `test_car` VALUES (1340635288095764482, '北汽绅宝', '电动', '绅宝', '2020-12-13', '1', 1, '0', 0, 1313694379541635074, '2020-12-20 20:28:55', 1313694379541635074, '2020-12-20 20:28:55'); +INSERT INTO `test_car` VALUES (1340635288099958786, '奔驰GXX', 'Gxx', '奔驰', '2020-12-20', '1', 1, '0', 0, 1313694379541635074, '2020-12-20 20:28:55', 1313694379541635074, '2020-12-20 20:28:55'); +COMMIT; + +-- ---------------------------- +-- Table structure for test_car_copy1 +-- ---------------------------- +DROP TABLE IF EXISTS `test_car_copy1`; +CREATE TABLE `test_car_copy1` ( + `id` bigint(19) NOT NULL COMMENT '主键', + `car_name` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '汽车名称', + `car_type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '汽车类型', + `car_brand` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '汽车品牌', + `produce_data` date NOT NULL COMMENT '生产日期', + `iz_usable` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '是否启用', + `tenant_id` bigint(19) DEFAULT NULL COMMENT '多租户ID', + `deleted` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '删除标记:0未删除,1删除', + `version` int(10) NOT NULL COMMENT '版本号(乐观锁)', + `create_by` bigint(19) NOT NULL COMMENT '创建用户', + `create_time` datetime NOT NULL COMMENT '创建日期', + `update_by` bigint(19) NOT NULL COMMENT '修改用户', + `update_time` datetime NOT NULL COMMENT '修改日期', + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='测试'; + +-- ---------------------------- +-- Table structure for test_car_copy2 +-- ---------------------------- +DROP TABLE IF EXISTS `test_car_copy2`; +CREATE TABLE `test_car_copy2` ( + `id` bigint(19) NOT NULL COMMENT '主键', + `car_name` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '汽车名称', + `car_type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '汽车类型', + `car_brand` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '汽车品牌', + `produce_data` date NOT NULL COMMENT '生产日期', + `iz_usable` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '是否启用', + `tenant_id` bigint(19) DEFAULT NULL COMMENT '多租户ID', + `deleted` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '删除标记:0未删除,1删除', + `version` int(10) NOT NULL COMMENT '版本号(乐观锁)', + `create_by` bigint(19) NOT NULL COMMENT '创建用户', + `create_time` datetime NOT NULL COMMENT '创建日期', + `update_by` bigint(19) NOT NULL COMMENT '修改用户', + `update_time` datetime NOT NULL COMMENT '修改日期', + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='测试'; + +-- ---------------------------- +-- Table structure for test_car_copy3 +-- ---------------------------- +DROP TABLE IF EXISTS `test_car_copy3`; +CREATE TABLE `test_car_copy3` ( + `id` bigint(19) NOT NULL COMMENT '主键', + `car_name` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '汽车名称', + `car_type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '汽车类型', + `car_brand` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '汽车品牌', + `produce_data` date NOT NULL COMMENT '生产日期', + `iz_usable` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '是否启用', + `tenant_id` bigint(19) DEFAULT NULL COMMENT '多租户ID', + `deleted` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '删除标记:0未删除,1删除', + `version` int(10) NOT NULL COMMENT '版本号(乐观锁)', + `create_by` bigint(19) NOT NULL COMMENT '创建用户', + `create_time` datetime NOT NULL COMMENT '创建日期', + `update_by` bigint(19) NOT NULL COMMENT '修改用户', + `update_time` datetime NOT NULL COMMENT '修改日期', + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='测试'; + +-- ---------------------------- +-- Table structure for test_car_copy4 +-- ---------------------------- +DROP TABLE IF EXISTS `test_car_copy4`; +CREATE TABLE `test_car_copy4` ( + `id` bigint(19) NOT NULL COMMENT '主键', + `car_name` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '汽车名称', + `car_type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '汽车类型', + `car_brand` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '汽车品牌', + `produce_data` date NOT NULL COMMENT '生产日期', + `iz_usable` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '是否启用', + `tenant_id` bigint(19) DEFAULT NULL COMMENT '多租户ID', + `deleted` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '删除标记:0未删除,1删除', + `version` int(10) NOT NULL COMMENT '版本号(乐观锁)', + `create_by` bigint(19) NOT NULL COMMENT '创建用户', + `create_time` datetime NOT NULL COMMENT '创建日期', + `update_by` bigint(19) NOT NULL COMMENT '修改用户', + `update_time` datetime NOT NULL COMMENT '修改日期', + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='测试'; + +-- ---------------------------- +-- Table structure for test_car_copy5 +-- ---------------------------- +DROP TABLE IF EXISTS `test_car_copy5`; +CREATE TABLE `test_car_copy5` ( + `id` bigint(19) NOT NULL COMMENT '主键', + `car_name` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '汽车名称', + `car_type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '汽车类型', + `car_brand` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '汽车品牌', + `produce_data` date NOT NULL COMMENT '生产日期', + `iz_usable` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '是否启用', + `tenant_id` bigint(19) DEFAULT NULL COMMENT '多租户ID', + `deleted` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '删除标记:0未删除,1删除', + `version` int(10) NOT NULL COMMENT '版本号(乐观锁)', + `create_by` bigint(19) NOT NULL COMMENT '创建用户', + `create_time` datetime NOT NULL COMMENT '创建日期', + `update_by` bigint(19) NOT NULL COMMENT '修改用户', + `update_time` datetime NOT NULL COMMENT '修改日期', + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='测试';