rt-sim-training-service/sql/20210517-zhangsai.sql

21 lines
766 B
SQL

CREATE TABLE `file` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`file_name` varchar(255) NOT NULL,
`file_path` varchar(255) NOT NULL,
`file_type` varchar(255) NOT NULL,
`create_time` datetime NOT NULL ON UPDATE CURRENT_TIMESTAMP,
`creator` bigint(20) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
CREATE TABLE `file_binding` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`file_id` bigint(20) NOT NULL,
`map_id` bigint(20) NOT NULL,
`device_types` varchar(255) DEFAULT NULL,
`device_ids` varchar(10000) DEFAULT NULL,
`creator` bigint(20) NOT NULL,
`create_time` datetime NOT NULL ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;