<?xml version="1.0" encoding="utf-8"?>

<databaseChangeLog
        xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
        http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.4.xsd">
   
   
   <changeSet author="guowubin" id="1629430730658-1">
    	<comment>alter table jc_controller</comment>
    	<sql>
		    DROP TABLE IF EXISTS `jc_controller`;
			CREATE TABLE `jc_controller`  (
				  `sequence_nbr` bigint(22) NOT NULL COMMENT 'id',
				  `station` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '控制站',
				  `c_ip` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'ip',
				  `c_port` int(11) NULL DEFAULT NULL COMMENT '端口',
				  `c_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '控制器名称',
				  `type` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '控制器类别',
				  `c_state` varchar(2) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '状态',
				  `rec_date` datetime(0) NULL DEFAULT NULL,
				  `rec_user_id` int(11) NULL DEFAULT NULL,
				  `rec_user_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
				  `is_delete` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
				  PRIMARY KEY (`sequence_nbr`) USING BTREE
			) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
    	</sql>
	</changeSet>
	
	<changeSet author="guowubin" id="1629430730658-2">
	 	<preConditions onFail="MARK_RAN">
			<tableExists tableName="jc_controller" />
    	</preConditions>
    	<comment>add data table jc_controller</comment>
    	<sql>
		    INSERT INTO `jc_controller` VALUES (1245230062463119361, '2', NULL, NULL, '南站广播', '2', '1', '2021-08-20 09:46:02', 3111584, 'admin_jcs', '0');
			INSERT INTO `jc_controller` VALUES (1308575795966443521, '1', NULL, NULL, '主站警铃', '1', '1', '2021-08-20 09:46:02', 3111584, 'admin_jcs', '0');
			INSERT INTO `jc_controller` VALUES (1428303671921250305, '3', NULL, NULL, '北站广播', '2', '1', '2021-08-20 09:46:02', 3111584, 'admin_jcs', '0');
			INSERT INTO `jc_controller` VALUES (1428306948020801538, '3', NULL, NULL, '北站警铃', '1', '1', '2021-08-20 09:46:02', 3111584, 'admin_jcs', '0');
			INSERT INTO `jc_controller` VALUES (1428323093599784962, '2', '172.19.111.163', 502, '南站电门控制', '3', '1', '2021-08-20 09:46:02', 3111584, 'admin_jcs', '0');
			INSERT INTO `jc_controller` VALUES (1428325245344845826, '2', NULL, NULL, '南站警铃', '1', '1', '2021-08-20 09:46:02', 3111584, 'admin_jcs', '0');
			INSERT INTO `jc_controller` VALUES (1428325285853433857, '3', '172.19.111.153', 502, '北站电门控制', '3', '1', '2021-08-20 09:46:02', 3111584, 'admin_jcs', '0');
			INSERT INTO `jc_controller` VALUES (1428325336898113537, '1', NULL, NULL, '主站广播', '2', '1', '2021-08-20 09:46:02', 3111584, 'admin_jcs', '0');
    	</sql>
	</changeSet>
	
	<changeSet author="guowubin" id="1629430730658-3">
    	<comment>alter table jc_controller_equip</comment>
    	<sql>
		    DROP TABLE IF EXISTS `jc_controller_equip`;
			CREATE TABLE `jc_controller_equip`  (
				  `sequence_nbr` bigint(20) NOT NULL COMMENT 'id',
				  `controller_seq` bigint(20) NULL DEFAULT NULL COMMENT '控制站',
				  `e_num` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'ip',
				  `e_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '端口',
				  `e_state` varchar(2) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '状态',
				  `rec_date` datetime(0) NULL DEFAULT NULL,
				  `rec_user_id` int(11) NULL DEFAULT NULL,
				  `rec_user_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
				  `is_delete` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
				  PRIMARY KEY (`sequence_nbr`) USING BTREE
			) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
    	</sql>
	</changeSet>
	
	<changeSet author="guowubin" id="1629430730658-4">
		<preConditions onFail="MARK_RAN">
			<tableExists tableName="jc_controller_equip" />
    	</preConditions>
    	<comment>add data table jc_controller_equip</comment>
    	<sql>
		    INSERT INTO `jc_controller_equip` VALUES (1192346783527378946, 1428325245344845826, '206', '警铃终端', '1', '2021-08-20 09:46:02', 3111584, 'admin_jcs', '0');
			INSERT INTO `jc_controller_equip` VALUES (1245230052539396097, 1245230062463119361, '202', '广播终端', '1', '2021-08-20 09:46:02', 3111584, 'admin_jcs', '0');
			INSERT INTO `jc_controller_equip` VALUES (1272442241152421890, 1428325285853433857, '100', '1号门', '1', '2021-08-20 09:46:02', 3111584, 'admin_jcs', '0');
			INSERT INTO `jc_controller_equip` VALUES (1274947632054542338, 1428325285853433857, '101', '2号门', '1', '2021-08-20 09:46:02', 3111584, 'admin_jcs', '0');
			INSERT INTO `jc_controller_equip` VALUES (1302793235940249602, 1428306948020801538, '205', '警铃终端', '1', '2021-08-20 09:46:02', 3111584, 'admin_jcs', '0');
			INSERT INTO `jc_controller_equip` VALUES (1315854437968797697, 1428323093599784962, '100', '4个电门', '1', '2021-08-20 09:46:02', 3111584, 'admin_jcs', '0');
			INSERT INTO `jc_controller_equip` VALUES (1320637765980856322, 1428325285853433857, '102', '3号门', '1', '2021-08-20 09:46:02', 3111584, 'admin_jcs', '0');
			INSERT INTO `jc_controller_equip` VALUES (1332610043605946369, 1308575795966443521, '204', '警铃终端', '1', '2021-08-20 09:46:02', 3111584, 'admin_jcs', '0');
			INSERT INTO `jc_controller_equip` VALUES (1343765647514955778, 1428325336898113537, '201', '广播终端', '1', '2021-08-20 09:46:02', 3111584, 'admin_jcs', '0');
			INSERT INTO `jc_controller_equip` VALUES (1397143491787747330, 1428303671921250305, '203', '广播终端', '1', '2021-08-20 09:46:02', 3111584, 'admin_jcs', '0');
			INSERT INTO `jc_controller_equip` VALUES (1397145718640209921, 1428325285853433857, '103', '4号门', '1', '2021-08-20 09:46:02', 3111584, 'admin_jcs', '0');
    	</sql>
	</changeSet>
	
</databaseChangeLog>
