-- Deploy mimas-talos:2019_03_22_create_activity_alert to mysql

BEGIN;

DROP TABLE IF EXISTS `api_activity_alert`;
CREATE TABLE `api_activity_alert` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `activity_id` int(11) NOT NULL,
  `person_id` char(32) NOT NULL,
  `create_time` datetime(6) NOT NULL,
  `update_time` datetime(6) NOT NULL,
  `is_online` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `person_id_refs_id_ef9fd78wef` (`person_id`),
  KEY `activity_id_refs_id_2b42bwfew4` (`activity_id`),
  CONSTRAINT `activity_id_refs_id_2ko2bewce4` FOREIGN KEY (`activity_id`) REFERENCES `api_activity` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=305 DEFAULT CHARSET=utf8;

COMMIT;

