CREATE database test;

CREATE TABLE `t1` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `site` char(2) NOT NULL,
  `project` varchar(7) NOT NULL,
  `app_server` varchar(30) NOT NULL,
  `instance` varchar(20) NOT NULL,
  `db_name` varchar(20) NOT NULL,
  `status` varchar(7) NOT NULL,
  `check_time` datetime NOT NULL,
  `img` blob DEFAULT NULL,
  PRIMARY KEY (`id`,`site`,`project`,`app_server`,`instance`,`db_name`,`status`,`check_time`),
  KEY `key_app_to_db_status_history` (`project`,`app_server`,`instance`,`db_name`,`status`,`check_time`),
  KEY `idx_app_to_db_status_history` (`site`,`project`,`app_server`,`instance`,`db_name`,`status`,`check_time`),
  KEY `idx_app_to_db_status_history_2` (`site`,`project`,`app_server`,`instance`,`db_name`,`check_time`),
  KEY `my_index` (`db_name`)
) ENGINE=InnoDB AUTO_INCREMENT=6000001 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci
