DROP TABLE IF EXISTS `device_car_type`;
CREATE TABLE `device_car_type` (
  `car_type_id` bigint(20) NOT NULL PRIMARY KEY  AUTO_INCREMENT COMMENT '车型Id',
  `brand` varchar(255)  COMMENT '品牌',
  `car_id` varchar(255)  COMMENT '车系',
  `description` varchar(255)  COMMENT '介绍',
  `update_time` datetime COMMENT '更新时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


DROP TABLE IF EXISTS `device_link_protocols`;
CREATE TABLE `device_link_protocols` (
  `link_protocols_id` bigint(20) NOT NULL PRIMARY KEY AUTO_INCREMENT COMMENT '连接协议Id',
  `name` varchar(255)  COMMENT '连接协议名称',
  `description` varchar(255)  COMMENT '介绍',
  `update_time` datetime COMMENT '更新时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

ALTER TABLE `device_channel`
DROP COLUMN `brand`;

ALTER TABLE `device_channel`
ADD COLUMN `car_type_id` bigint(0) COMMENT '车型Id' AFTER `update_time`;