CREATE TABLE `was_event_stats_day` (
  `event_stats_day_id` int(11) NOT NULL AUTO_INCREMENT,
  `event_id` int(11) NOT NULL,
  `view_count` int(11) NOT NULL DEFAULT '0',
  `subscriber_count` int(11) NOT NULL DEFAULT '0',
  `like_count` int(11) NOT NULL DEFAULT '0',
  `comment_count` int(11) NOT NULL DEFAULT '0',
  `stats_day` date NOT NULL,
  `insert_timestamp` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `update_timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`event_stats_day_id`),
  KEY `event_id` (`event_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

CREATE TRIGGER `was_event_stats_day_insert_timestamp` BEFORE INSERT ON `was_event_stats_day` FOR EACH ROW SET NEW.insert_timestamp = NOW();