CREATE TABLE IF NOT EXISTS `mod_calendar_calendars` (
  `id` INT(10) unsigned NOT NULL AUTO_INCREMENT,
  `calType` VARCHAR(10) NOT NULL,
  `pageId` INT(10) unsigned NOT NULL,
  `uniSyncLink` INT(11) NOT NULL,
  `lastUpdated` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (id)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=latin1;

CREATE TABLE IF NOT EXISTS `mod_calendar_settings` (
  `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `calId` INT(10) UNSIGNED NOT NULL,
  `entity_id` INT(11),
  `start_time` TIME,
  `end_time` TIME,
  `display_increment` TINYINT(2),
  `snap_increment` TINYINT(2),
  `lastUpdated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (id)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=latin1;

CREATE TABLE IF NOT EXISTS `mod_calendar_logging` (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `lastUpdated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (id)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=latin1;

