CREATE TABLE IF NOT EXISTS `AbsentTeachers` (
  `GUILDID` bigint(20) NOT NULL,
  `TEACHERNAME` tinytext NOT NULL,
  `ABSENTLESSONS` smallint(6) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

CREATE TABLE IF NOT EXISTS `Guilds` (
  `GUILDID` bigint(20) NOT NULL,
  `LANGUAGE` tinytext DEFAULT NULL,
  `USERNAME` tinytext DEFAULT NULL,
  `PASSWORD` text DEFAULT NULL,
  `SERVER` tinytext DEFAULT NULL,
  `SCHOOL` tinytext DEFAULT NULL,
  `KLASSEID` smallint(6),
  `CHANNELID` bigint(20) DEFAULT NULL,
  `PREFIX` varchar(7) NOT NULL DEFAULT '!untis ',
  `SLEEPTIME` bigint(20) NOT NULL DEFAULT 3600000,
  `ISCHECKACTIVE` tinyint(1) NOT NULL DEFAULT 0,
  `LASTCHECKED` date DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

CREATE TABLE IF NOT EXISTS `Stats` (
  `GUILDID` bigint(20) NOT NULL,
  `TOTALREQUESTS` int(11) NOT NULL DEFAULT 0,
  `TOTALDAYS` smallint(6) NOT NULL DEFAULT 0,
  `TOTALLESSONS` int(11) NOT NULL DEFAULT 0,
  `TOTALCANCELLEDLESSONS` smallint(6) NOT NULL DEFAULT 0,
  `TOTALMOVEDLESSONS` smallint(6) NOT NULL DEFAULT 0,
  `AVERAGECANCELLEDLESSONS` float NOT NULL DEFAULT 0,
  `AVERAGEMOVEDLESSONS` float NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
