CREATE TABLE IF NOT EXISTS cim_repair_log (
	`id` SMALLINT NOT NULL AUTO_INCREMENT,
	`count` INT DEFAULT 0 NOT NULL,
	`status` TINYINT(1) DEFAULT 0 NULL,
	`create_time` INT DEFAULT 0 NOT NULL,
	CONSTRAINT repair_log_pk PRIMARY KEY (id)
);
CREATE TABLE IF NOT EXISTS cim_repair_data (
	`id` INT NOT NULL AUTO_INCREMENT,
	`log_id` SMALLINT DEFAULT 0 NOT NULL,
	`relation_id` SMALLINT(6) DEFAULT 0 NOT NULL,
	`data_id` INT DEFAULT 0 NOT NULL,
	`old` json DEFAULT NULL NULL,
	`new` json DEFAULT NULL NULL,
	`model` VARCHAR(20) NOT NULL DEFAULT '',
	`msg` varchar(200) DEFAULT '' NOT NULL,
	`name` varchar(50) NOT NULL DEFAULT '',
	CONSTRAINT cim_repair_data_pk PRIMARY KEY (id)
);
