CREATE TABLE `StudentConnections` (
  `SCID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `SYID` int(11) NOT NULL,
  `StudentID` int(11) NOT NULL,
  `UserID` int(11) NOT NULL,
  `SCRID` varchar(16) NOT NULL,
  `CxnMedium` varchar(16) NOT NULL,
  `Date` datetime NOT NULL,
  `SCLID` int(11) NOT NULL,
  `Outcome` varchar(8) NOT NULL,
  `SCIID` int(11) NOT NULL,
  `SCRspID` int(11) NOT NULL,
  `Note` text NOT NULL,
  `Pending` tinyint(4) NOT NULL,
  PRIMARY KEY (`SCID`),
  KEY `StudentID` (`StudentID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `UserID` (`UserID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `StudentContacts`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentContacts` (
  `SCID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `StudentID` int(11) NOT NULL DEFAULT '0',
  `ContactID` int(11) NOT NULL DEFAULT '0',
  `CreateDate` date NOT NULL DEFAULT '0000-00-00',
  PRIMARY KEY (`SCID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `StudentCountry`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentCountry` (
  `SCID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `StudentID` int(11) NOT NULL,
  `SCOID` int(11) NOT NULL,
  PRIMARY KEY (`SCID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `StudentID` (`StudentID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `StudentCountryOrigin`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentCountryOrigin` (
  `SCOID` int(11) NOT NULL AUTO_INCREMENT,
  `Name` varchar(32) NOT NULL,
  `Code1` varchar(12) NOT NULL COMMENT 'Indiana',
  PRIMARY KEY (`SCOID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Student Country of Origin ';
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `StudentDetails`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentDetails` (
  `SDID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `StudentID` int(11) NOT NULL DEFAULT '0',
  `Updated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `AuthorID` int(11) NOT NULL DEFAULT '0',
  `ForeignExchange` int(11) NOT NULL DEFAULT '0',
  `Honors` int(11) NOT NULL DEFAULT '0',
  `Gifted` int(11) NOT NULL DEFAULT '0',
  `GiftedParticipation` int(11) NOT NULL DEFAULT '0',
  `WardOfState` int(11) NOT NULL DEFAULT '0',
  `SpecialEducation` int(11) NOT NULL DEFAULT '0',
  `Challange` int(11) NOT NULL DEFAULT '0',
  `Immigrant` int(11) NOT NULL DEFAULT '0',
  `Migrant` int(11) NOT NULL DEFAULT '0',
  `ImmigrantStatus` int(11) NOT NULL DEFAULT '0',
  `EnteredUS` date DEFAULT NULL,
  `BirthCity` varchar(30) DEFAULT NULL,
  `BirthStateID` bigint(20) DEFAULT NULL,
  `BirthCountryID` bigint(20) DEFAULT NULL,
  `Plan504` int(11) NOT NULL DEFAULT '0',
  `SingleParent` int(11) NOT NULL DEFAULT '0',
  `NonPublic` int(11) NOT NULL DEFAULT '2',
  `FoodProgram` int(11) NOT NULL DEFAULT '0',
  `EconomicDisadvantaged` int(11) DEFAULT NULL,
  `EnglishProficiency` int(11) NOT NULL DEFAULT '0',
  `LEPEligible` int(11) NOT NULL DEFAULT '0',
  `LEPParticipation` int(11) NOT NULL DEFAULT '0',
  `LEPDuration` int(11) NOT NULL DEFAULT '6',
  `ResidenceStatus` int(11) NOT NULL DEFAULT '0',
  `NCEARace` int(11) NOT NULL DEFAULT '0',
  `Catholic` int(11) NOT NULL DEFAULT '0',
  `NCEARaceAutoupd` int(11) NOT NULL DEFAULT '0',
  `EdFiID` varchar(32) DEFAULT NULL COMMENT 'Resource ID for Ed-Fi API',
  `EdFiDiplomaID` varchar(32) DEFAULT NULL,
  `MultiBirthStatus` tinyint(1) NOT NULL DEFAULT '0',
  `StudentAddressOpt` tinyint(1) DEFAULT NULL,
  `InitSchoolEntryUS` datetime DEFAULT NULL,
  `ELLInstrumentUsed` int(11) DEFAULT NULL,
  PRIMARY KEY (`SDID`),
  UNIQUE KEY `StudentID` (`StudentID`),
  KEY `Search` (`SchoolID`,`StudentID`),
  KEY `fk_rails_e7096a1032` (`BirthStateID`),
  KEY `fk_rails_d69ec050f1` (`BirthCountryID`),
  CONSTRAINT `fk_rails_d69ec050f1` FOREIGN KEY (`BirthCountryID`) REFERENCES `iso_countries` (`id`),
  CONSTRAINT `fk_rails_e7096a1032` FOREIGN KEY (`BirthStateID`) REFERENCES `us_states` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `StudentDisciplineLogs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentDisciplineLogs` (
  `SDLID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `StudentID` int(11) NOT NULL DEFAULT '0',
  `ClassID` int(11) NOT NULL DEFAULT '0',
  `VictimID` int(11) NOT NULL,
  `LogDateTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Quarter` int(11) NOT NULL DEFAULT '0',
  `AuthorID` int(11) NOT NULL DEFAULT '0',
  `DVID` int(11) NOT NULL DEFAULT '0',
  `Points` float NOT NULL DEFAULT '0',
  `Description` text NOT NULL,
  `Resolution` text NOT NULL,
  `ManagerNotified` int(11) NOT NULL DEFAULT '0',
  `FamilyNotified` int(11) NOT NULL DEFAULT '0',
  `StudentNotified` int(11) NOT NULL DEFAULT '0',
  `Created` int(11) NOT NULL,
  `DDID` int(11) NOT NULL,
  PRIMARY KEY (`SDLID`),
  KEY `SDID` (`SDLID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `StudentID` (`StudentID`),
  KEY `DateTime` (`LogDateTime`),
  KEY `AuthorID` (`AuthorID`),
  KEY `ClassID` (`ClassID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `StudentDocuments`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentDocuments` (
  `StudentDocID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `SchoolYearID` int(11) NOT NULL DEFAULT '0',
  `StudentID` int(11) NOT NULL DEFAULT '0',
  `Name` varchar(64) NOT NULL DEFAULT '',
  `Date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Code` varchar(12) NOT NULL DEFAULT '',
  `Type` varchar(32) NOT NULL DEFAULT '',
  `FileName` varchar(64) NOT NULL DEFAULT '',
  `Size` int(11) NOT NULL DEFAULT '0',
  `SigRequired` int(11) NOT NULL DEFAULT '0',
  `DSIGID` int(11) NOT NULL DEFAULT '0',
  `Uploaded` tinyint(1) NOT NULL,
  PRIMARY KEY (`StudentDocID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `StudentID` (`StudentID`),
  KEY `Date` (`Date`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `StudentEnroll`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentEnroll` (
  `StudentEnrollID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `FamilyID` int(11) NOT NULL DEFAULT '0',
  `StudentID` int(11) NOT NULL DEFAULT '0',
  `Tscripts` int(11) NOT NULL DEFAULT '0',
  `TscriptsDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `TscriptsID` int(11) NOT NULL DEFAULT '0',
  `TscriptsTxt` varchar(32) NOT NULL DEFAULT '',
  `Shots` int(11) NOT NULL DEFAULT '0',
  `ShotsDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `ShotsID` int(11) NOT NULL DEFAULT '0',
  `ShotsTxt` varchar(32) NOT NULL DEFAULT '',
  `Salvation` int(11) NOT NULL DEFAULT '0',
  `SalvationDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `SalvationID` int(11) NOT NULL DEFAULT '0',
  `SalvationTxt` varchar(32) NOT NULL DEFAULT '',
  `Tylenol` int(11) NOT NULL DEFAULT '0',
  `TylenolDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `TylenolID` int(11) NOT NULL DEFAULT '0',
  `TylenolTxt` varchar(32) NOT NULL DEFAULT '',
  `Standard` int(11) NOT NULL DEFAULT '0',
  `StandardDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `StandardID` int(11) NOT NULL DEFAULT '0',
  `StandardTxt` varchar(32) NOT NULL DEFAULT '',
  PRIMARY KEY (`StudentEnrollID`),
  UNIQUE KEY `StudentEnrollID` (`StudentEnrollID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `FamilyID` (`FamilyID`),
  KEY `StudentID` (`StudentID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `StudentEnrollmentHistory`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentEnrollmentHistory` (
  `SEHID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `StudentID` int(11) NOT NULL DEFAULT '0',
  `SchoolYearID` int(11) NOT NULL DEFAULT '0',
  `Grade` int(11) NOT NULL DEFAULT '99',
  `Date` date NOT NULL DEFAULT '0000-00-00',
  `Code` int(11) NOT NULL DEFAULT '0',
  `Notes` varchar(64) NOT NULL DEFAULT '',
  `AuthorID` int(11) NOT NULL DEFAULT '0',
  `Updated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `EdFiID` varchar(32) NOT NULL DEFAULT '',
  `EdFiExtID` varchar(32) NOT NULL COMMENT 'Extension ID',
  PRIMARY KEY (`SEHID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `StudentID` (`StudentID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `StudentGoals`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentGoals` (
  `SGID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `ClassID` int(11) NOT NULL,
  `AuthorID` int(11) NOT NULL,
  `StudentID` int(11) NOT NULL,
  `GoalType` tinyint(3) unsigned NOT NULL,
  `GoalDate` date NOT NULL,
  `Complete` tinyint(3) unsigned NOT NULL DEFAULT '0',
  `CompleteDate` date NOT NULL,
  `Note` varchar(256) NOT NULL,
  PRIMARY KEY (`SGID`),
  KEY `SchoolID` (`SchoolID`,`AuthorID`,`StudentID`),
  KEY `ClassID` (`ClassID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `StudentGrades`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentGrades` (
  `GradeID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `SchoolYearID` int(11) NOT NULL DEFAULT '0',
  `ClassID` int(11) NOT NULL DEFAULT '0',
  `SubjectID` int(11) NOT NULL DEFAULT '0',
  `StudentID` int(11) NOT NULL DEFAULT '0',
  `Quarter` int(11) NOT NULL DEFAULT '0',
  `Number` char(3) NOT NULL DEFAULT '0',
  `Comments` text NOT NULL,
  `AuthorID` int(11) NOT NULL DEFAULT '0',
  `Updated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  PRIMARY KEY (`GradeID`),
  UNIQUE KEY `ElemGradeID` (`GradeID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `SchoolYearID` (`SchoolYearID`),
  KEY `ClassID` (`ClassID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `StudentHabitGroups`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentHabitGroups` (
  `SHGID` int(11) NOT NULL AUTO_INCREMENT,
  `Name` varchar(64) NOT NULL,
  `Description` varchar(64) NOT NULL DEFAULT '',
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `DepartmentID` int(11) NOT NULL,
  `Sequence` int(11) NOT NULL DEFAULT '0',
  `Page` int(11) NOT NULL DEFAULT '1',
  `Side` int(11) NOT NULL DEFAULT '0',
  `ReportCardBlock` tinyint(2) NOT NULL DEFAULT '0',
  PRIMARY KEY (`SHGID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `Page` (`Page`),
  KEY `Side` (`Side`),
  KEY `Sequence` (`Sequence`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `StudentHabitScores`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentHabitScores` (
  `SHSID` int(11) NOT NULL AUTO_INCREMENT,
  `KeyID` int(11) NOT NULL,
  `Name` varchar(128) NOT NULL DEFAULT '',
  `Value` varchar(7) NOT NULL DEFAULT '',
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `Sequence` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`SHSID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `StudentHabitValues`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentHabitValues` (
  `SHVID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `StudentID` int(11) NOT NULL DEFAULT '0',
  `SHID` int(11) NOT NULL DEFAULT '0',
  `Q1` varchar(6) NOT NULL,
  `Q2` varchar(6) NOT NULL,
  `Q3` varchar(6) NOT NULL,
  `Q4` varchar(6) NOT NULL,
  `Q5` varchar(6) NOT NULL,
  `Q6` varchar(6) NOT NULL,
  `Q7` varchar(6) NOT NULL,
  `Q8` varchar(6) NOT NULL,
  `Q9` varchar(6) NOT NULL,
  `Q10` varchar(6) NOT NULL,
  `Q11` varchar(6) NOT NULL,
  `Q12` varchar(6) NOT NULL,
  `Final` varchar(6) NOT NULL,
  PRIMARY KEY (`SHVID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `FamilyID` (`StudentID`),
  KEY `SHID` (`SHID`),
  KEY `Q2` (`Q2`),
  KEY `Q1` (`Q1`),
  KEY `Q3` (`Q3`),
  KEY `Q4` (`Q4`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `StudentHabits`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentHabits` (
  `SHID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `DepartmentID` int(11) NOT NULL,
  `Name` varchar(128) NOT NULL DEFAULT '',
  `Grade` int(11) NOT NULL DEFAULT '0',
  `SHGID` int(11) NOT NULL DEFAULT '0',
  `Sequence` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`SHID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `CCGID` (`SHGID`),
  KEY `Sequence` (`Sequence`),
  KEY `Grade` (`Grade`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `StudentIEP`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentIEP` (
  `SIEPID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `StudentID` int(11) NOT NULL,
  `AdvisorID` int(11) NOT NULL,
  `StartDate` date NOT NULL,
  `StopDate` date NOT NULL,
  `Label` varchar(48) NOT NULL,
  `Comments` varchar(254) NOT NULL,
  `Current` int(11) NOT NULL,
  `AuthorID` int(11) NOT NULL,
  `UpdateDT` datetime NOT NULL,
  PRIMARY KEY (`SIEPID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `StudentID` (`StudentID`),
  KEY `Current` (`Current`),
  KEY `StaffID` (`AdvisorID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `StudentIEPAdvisors`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentIEPAdvisors` (
  `SIEPAID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `UserID` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`SIEPAID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `StudentIEPConfig`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentIEPConfig` (
  `SIEPCID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `Header` varchar(255) NOT NULL,
  `Footer` varchar(255) NOT NULL,
  PRIMARY KEY (`SIEPCID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `StudentIEPEvals`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentIEPEvals` (
  `SIEPTID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `StudentID` int(11) NOT NULL,
  `SIEPID` int(11) NOT NULL,
  `SIEPGID` int(11) NOT NULL,
  `SIEPOID` int(11) NOT NULL,
  `Quarter` int(11) NOT NULL,
  `Comments` text NOT NULL,
  `NumberGrade` decimal(10,2) NOT NULL,
  `LetterGrade` varchar(6) NOT NULL,
  `AuthorID` int(11) NOT NULL,
  `EnteredDT` datetime NOT NULL,
  PRIMARY KEY (`SIEPTID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `StudentID` (`StudentID`),
  KEY `SIEPID` (`SIEPID`),
  KEY `SIEPGID` (`SIEPGID`),
  KEY `SIEPOID` (`SIEPOID`),
  KEY `Quarter` (`Quarter`),
  KEY `Quarter_2` (`Quarter`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `StudentIEPGoals`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentIEPGoals` (
  `SIEPGID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `StudentID` int(11) NOT NULL,
  `SIEPID` int(11) NOT NULL,
  `Sequence` varchar(8) NOT NULL,
  `Label` varchar(128) NOT NULL,
  `Goal` text NOT NULL,
  `AuthorID` int(11) NOT NULL,
  `UpdateDT` datetime NOT NULL,
  PRIMARY KEY (`SIEPGID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `StudentIEPObjectives`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentIEPObjectives` (
  `SIEPOID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `StudentID` int(11) NOT NULL,
  `SIEPID` int(11) NOT NULL,
  `SIEPGID` int(11) NOT NULL,
  `Sequence` int(11) NOT NULL,
  `Label` varchar(128) NOT NULL,
  `Objective` text NOT NULL,
  `AuthorID` int(11) NOT NULL,
  `UpdateDT` datetime NOT NULL,
  PRIMARY KEY (`SIEPOID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `StudentIEPStudents`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentIEPStudents` (
  `SIEPID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `StudentID` int(11) NOT NULL,
  `AuthorID` int(11) NOT NULL,
  `UpdateDT` datetime NOT NULL,
  PRIMARY KEY (`SIEPID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `StudentID` (`StudentID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `StudentIEPTrials`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentIEPTrials` (
  `SIEPTID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `StudentID` int(11) NOT NULL,
  `SIEPID` int(11) NOT NULL,
  `SIEPGID` int(11) NOT NULL,
  `SIEPOID` int(11) NOT NULL,
  `Quarter` int(11) NOT NULL,
  `TrialDT` datetime NOT NULL,
  `Points` int(11) NOT NULL,
  `OutOf` int(11) NOT NULL,
  `Comments` varchar(64) NOT NULL,
  `AuthorID` int(11) NOT NULL,
  `EnteredDT` datetime NOT NULL,
  PRIMARY KEY (`SIEPTID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `StudentID` (`StudentID`),
  KEY `SIEPID` (`SIEPID`),
  KEY `SIEPGID` (`SIEPGID`),
  KEY `SIEPOID` (`SIEPOID`),
  KEY `Quarter` (`Quarter`),
  KEY `Quarter_2` (`Quarter`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `StudentLanguages`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentLanguages` (
  `SLID` int(11) NOT NULL AUTO_INCREMENT,
  `Name` varchar(32) NOT NULL,
  `Code0` varchar(12) NOT NULL COMMENT 'Default',
  `Code1` varchar(12) NOT NULL COMMENT 'Indiana',
  `Code2` varchar(12) NOT NULL COMMENT 'Nebraska',
  `Code3` varchar(12) NOT NULL COMMENT 'New Jersey',
  `Code4` varchar(12) NOT NULL COMMENT 'California',
  `Code5` varchar(12) NOT NULL COMMENT 'Iowa',
  `Code6` varchar(12) NOT NULL COMMENT 'Michigan',
  `Code7` varchar(12) NOT NULL COMMENT 'New York',
  `Code8` varchar(12) NOT NULL COMMENT 'Pennsylvania',
  `Code9` varchar(12) NOT NULL COMMENT 'Colorado',
  `Code10` varchar(12) NOT NULL COMMENT 'Kansas',
  `Code11` varchar(12) NOT NULL COMMENT 'Illinois',
  `Code12` varchar(12) NOT NULL COMMENT 'Florida',
  `Code14` varchar(12) NOT NULL COMMENT 'New Mexico',
  PRIMARY KEY (`SLID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Student Country of Origin ';
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `StudentMed`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentMed` (
  `StudentMedID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `StudentID` int(11) NOT NULL DEFAULT '0',
  `UpdateDT` datetime NOT NULL,
  `Asthma` int(11) NOT NULL DEFAULT '0',
  `Diabetes` int(11) NOT NULL DEFAULT '0',
  `Seizures` int(11) NOT NULL DEFAULT '0',
  `Hearing` int(11) NOT NULL DEFAULT '0',
  `Sight` int(11) NOT NULL DEFAULT '0',
  `Allergies` varchar(256) NOT NULL DEFAULT '',
  `Others` text NOT NULL,
  `Tylenol` int(11) NOT NULL DEFAULT '0',
  `Ibuprofen` int(11) NOT NULL DEFAULT '0',
  `Comments` text NOT NULL,
  `AlertComments` text NOT NULL,
  `Medication` varchar(64) NOT NULL DEFAULT '',
  `Heart` int(11) NOT NULL DEFAULT '0',
  `AddAdhd` int(11) NOT NULL DEFAULT '0',
  `Bladder` int(11) NOT NULL DEFAULT '0',
  `Sicklecell` int(11) NOT NULL DEFAULT '0',
  `Hemophiliac` int(11) NOT NULL DEFAULT '0',
  `Exempt` int(11) NOT NULL DEFAULT '0',
  `Healthy` int(11) NOT NULL,
  PRIMARY KEY (`StudentMedID`),
  UNIQUE KEY `StudentID` (`StudentID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `StudentMedicalComplaints`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentMedicalComplaints` (
  `SMCID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `Sequence` int(11) NOT NULL DEFAULT '0',
  `Code` varchar(5) NOT NULL DEFAULT '',
  `Name` varchar(64) NOT NULL DEFAULT '',
  PRIMARY KEY (`SMCID`),
  KEY `CompanyID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `StudentMedicalLogs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentMedicalLogs` (
  `SMLID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `StudentID` int(11) NOT NULL DEFAULT '0',
  `LogDateTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `AuthorID` int(11) NOT NULL DEFAULT '0',
  `SMCID` int(11) DEFAULT NULL,
  `Complaint` text,
  `Treatment` text NOT NULL,
  `FamilyNotified` int(11) NOT NULL DEFAULT '0',
  `entry_date` datetime DEFAULT NULL,
  PRIMARY KEY (`SMLID`),
  KEY `SDID` (`SMLID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `StudentID` (`StudentID`),
  KEY `DateTime` (`LogDateTime`),
  KEY `AuthorID` (`AuthorID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `StudentMedicalScreening`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentMedicalScreening` (
  `SMSID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) DEFAULT NULL,
  `SchoolYearID` int(11) DEFAULT NULL,
  `StudentID` int(11) NOT NULL,
  `Updated` date NOT NULL,
  `Height` decimal(10,2) DEFAULT NULL,
  `Weight` int(11) DEFAULT NULL,
  `Hearing` date DEFAULT NULL,
  `HearingPass` tinyint(1) DEFAULT NULL,
  `Sight` date DEFAULT NULL,
  `SightPass` tinyint(1) DEFAULT NULL,
  `Age` int(11) DEFAULT NULL,
  `Grade` int(11) NOT NULL,
  `created_at` datetime(6) DEFAULT NULL,
  `updated_at` datetime(6) DEFAULT NULL,
  PRIMARY KEY (`SMSID`),
  KEY `SchoolID` (`SchoolID`,`StudentID`),
  KEY `Age` (`Age`),
  KEY `Grade` (`Grade`),
  KEY `StudentID` (`StudentID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `StudentMedicationData`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentMedicationData` (
  `StudentMedID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `StudentID` int(11) NOT NULL DEFAULT '0',
  `Notes` text NOT NULL,
  `MEDID` int(11) NOT NULL,
  PRIMARY KEY (`StudentMedID`),
  KEY `StudentMedID` (`StudentMedID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `StudentID` (`StudentID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `StudentMedicationGiven`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentMedicationGiven` (
  `GivenID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `StudentID` int(11) NOT NULL DEFAULT '0',
  `SMSCHID` int(11) NOT NULL,
  `DateGiven` date NOT NULL,
  `TimeGiven` time DEFAULT NULL,
  `time` time DEFAULT NULL,
  `DateUpdated` datetime NOT NULL,
  PRIMARY KEY (`GivenID`),
  KEY `StudentMedID` (`GivenID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `StudentID` (`StudentID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `StudentMedicationSched`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentMedicationSched` (
  `SMSCHID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `StudentID` int(11) NOT NULL DEFAULT '0',
  `Medication` varchar(64) NOT NULL,
  `Notes` text NOT NULL,
  `Dose` varchar(32) NOT NULL,
  `Route` varchar(64) NOT NULL,
  `SelfAdm` int(11) NOT NULL DEFAULT '0',
  `StartDate` date DEFAULT '0000-00-00',
  `StopDate` date DEFAULT '0000-00-00',
  `DailySchedule` varchar(128) NOT NULL,
  PRIMARY KEY (`SMSCHID`),
  KEY `StudentMedID` (`SMSCHID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `StudentID` (`StudentID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `StudentMedications`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentMedications` (
  `MEDID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `Sequence` int(11) NOT NULL DEFAULT '0',
  `Name` varchar(64) NOT NULL DEFAULT '',
  `Description` varchar(128) NOT NULL,
  PRIMARY KEY (`MEDID`),
  KEY `CompanyID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `StudentNarratives`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentNarratives` (
  `SNID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `ClassID` int(11) NOT NULL,
  `Quarter` int(11) NOT NULL,
  `StudentID` int(11) NOT NULL,
  `Comments` text NOT NULL,
  PRIMARY KEY (`SNID`),
  UNIQUE KEY `SchoolID_2` (`SchoolID`,`ClassID`,`StudentID`,`Quarter`),
  KEY `ClassID` (`ClassID`),
  KEY `StudentID` (`StudentID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `StudentNotes`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentNotes` (
  `StudentNotesID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `FamilyID` int(11) NOT NULL DEFAULT '0',
  `StudentID` int(11) NOT NULL DEFAULT '0',
  `Date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `UpdateDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `AuthorID` int(11) NOT NULL DEFAULT '0',
  `Private` int(11) NOT NULL DEFAULT '0',
  `UpdateAuthorID` int(11) NOT NULL DEFAULT '0',
  `Comments` text NOT NULL,
  `Subject` varchar(32) NOT NULL DEFAULT '',
  `Exposure` int(11) NOT NULL DEFAULT '0',
  `Flagged` int(11) NOT NULL DEFAULT '0',
  `Expire` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  PRIMARY KEY (`StudentNotesID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `FamilyID` (`FamilyID`),
  KEY `StudentID` (`StudentID`),
  KEY `Date` (`Date`),
  KEY `Flagged` (`Flagged`),
  KEY `Expire` (`Expire`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `StudentRace`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentRace` (
  `SRID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `StudentID` int(11) NOT NULL,
  `RaceID` int(11) NOT NULL,
  PRIMARY KEY (`SRID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `StudentID` (`StudentID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `StudentRaces`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentRaces` (
  `SRID` int(11) NOT NULL AUTO_INCREMENT,
  `Name` varchar(32) NOT NULL,
  `USA` int(11) NOT NULL,
  `Code0` varchar(12) NOT NULL,
  `Code1` varchar(12) NOT NULL COMMENT 'Indiana',
  `Code2` varchar(12) NOT NULL COMMENT 'Nebraska',
  `Code3` varchar(12) NOT NULL COMMENT 'New Jersey',
  `Code4` varchar(12) NOT NULL COMMENT 'California',
  `Code5` varchar(12) NOT NULL COMMENT 'Iowa',
  `Code6` varchar(12) NOT NULL COMMENT 'Michigan',
  `Code7` varchar(12) NOT NULL COMMENT 'New York',
  `Code8` varchar(12) NOT NULL COMMENT 'Pennslyvania',
  `Code9` varchar(12) NOT NULL COMMENT 'Colorado',
  `Code10` varchar(12) NOT NULL COMMENT 'Kansas',
  `Code11` varchar(12) NOT NULL COMMENT 'Illinois',
  `Code12` varchar(12) NOT NULL COMMENT 'Florida',
  `Code13` varchar(12) NOT NULL COMMENT 'Wisconsin',
  `Code14` varchar(12) NOT NULL COMMENT 'New Mexico',
  PRIMARY KEY (`SRID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Student Country of Origin ';
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `StudentRanking`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentRanking` (
  `SRID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `StudentID` int(11) NOT NULL DEFAULT '0',
  `Ranking` varchar(10) NOT NULL DEFAULT '',
  `Date` date NOT NULL DEFAULT '0000-00-00',
  PRIMARY KEY (`SRID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `StudentRawAvgs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentRawAvgs` (
  `SRAID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `StudentID` int(11) NOT NULL,
  `Updated` date NOT NULL,
  `RawAvg` int(11) NOT NULL,
  PRIMARY KEY (`SRAID`),
  KEY `StudentID` (`StudentID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `StudentRequirements`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentRequirements` (
  `SRID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `StudentID` int(11) NOT NULL,
  `RLID` int(11) NOT NULL,
  PRIMARY KEY (`SRID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `StudentID` (`StudentID`),
  KEY `RLID` (`RLID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Student Requirement Label ID mapping';
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `StudentSchedule`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentSchedule` (
  `SSID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `StudentID` int(11) NOT NULL,
  `Day1` int(11) NOT NULL,
  `Day1Start` time NOT NULL,
  `Day1Stop` time NOT NULL,
  `Day2` int(11) NOT NULL,
  `Day2Start` time NOT NULL,
  `Day2Stop` time NOT NULL,
  `Day3` int(11) NOT NULL,
  `Day3Start` time NOT NULL,
  `Day3Stop` time NOT NULL,
  `Day4` int(11) NOT NULL,
  `Day4Start` time NOT NULL,
  `Day4Stop` time NOT NULL,
  `Day5` int(11) NOT NULL,
  `Day5Start` time NOT NULL,
  `Day5Stop` time NOT NULL,
  `Day6` int(11) NOT NULL,
  `Day6Start` time NOT NULL,
  `Day6Stop` time NOT NULL,
  `Day7` int(11) NOT NULL,
  `Day7Start` time NOT NULL,
  `Day7Stop` time NOT NULL,
  PRIMARY KEY (`SSID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `StudentID` (`StudentID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `StudentStatisticChoices`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentStatisticChoices` (
  `SSCID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `SSID` int(11) NOT NULL,
  `Sequence` int(11) NOT NULL,
  `Value` varchar(16) NOT NULL,
  `Label` varchar(72) NOT NULL,
  PRIMARY KEY (`SSCID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `SSID` (`SSID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `StudentStatisticGroups`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentStatisticGroups` (
  `SSGID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `Name` varchar(16) NOT NULL DEFAULT '',
  `Description` varchar(64) NOT NULL DEFAULT '',
  `Sequence` int(11) NOT NULL DEFAULT '0',
  `RPBlock` tinyint(2) NOT NULL DEFAULT '0',
  PRIMARY KEY (`SSGID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `StudentStatisticValues`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentStatisticValues` (
  `SSVID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `StudentID` int(11) NOT NULL DEFAULT '0',
  `SSID` int(11) NOT NULL DEFAULT '0',
  `RPID` int(11) NOT NULL DEFAULT '0',
  `Value` varchar(255) NOT NULL DEFAULT '',
  `ValueDate` date DEFAULT '0000-00-00',
  PRIMARY KEY (`SSVID`),
  UNIQUE KEY `index_StudentStatisticValues_on_StudentID_and_SSID` (`StudentID`,`SSID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `StudentID` (`StudentID`),
  KEY `SSID` (`SSID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `StudentStatistics`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentStatistics` (
  `SSID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `SSGID` int(11) NOT NULL,
  `Sequence` int(11) NOT NULL DEFAULT '0',
  `Type` int(11) NOT NULL DEFAULT '1',
  `Name` varchar(32) NOT NULL DEFAULT '',
  `Description` varchar(255) NOT NULL DEFAULT '',
  `Public` int(11) NOT NULL DEFAULT '0',
  `Admissions` int(11) NOT NULL DEFAULT '0',
  `RPID` int(11) NOT NULL DEFAULT '0',
  `ValidationType` int(11) NOT NULL DEFAULT '0' COMMENT ' 0=None, 1=Number, 2=Email, 3=Min Length, 4=Max Length, 5=Custom Regex',
  `ValidationPattern` varchar(64) NOT NULL,
  `Required` int(11) NOT NULL DEFAULT '0' COMMENT '0=Not Required, 1=Required',
  PRIMARY KEY (`SSID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `Sequence` (`Sequence`),
  KEY `RPID` (`RPID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `StudentTranscriptACT`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentTranscriptACT` (
  `STTID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `StudentID` int(11) NOT NULL DEFAULT '0',
  `English` int(11) DEFAULT NULL,
  `Math` int(11) DEFAULT NULL,
  `Reading` int(11) DEFAULT NULL,
  `Science` int(11) DEFAULT NULL,
  `Writing` int(11) DEFAULT NULL,
  `Composite` int(11) DEFAULT NULL,
  `National` int(11) DEFAULT NULL,
  `TestMonth` int(11) NOT NULL DEFAULT '0',
  `TestYear` int(11) NOT NULL DEFAULT '0',
  `PreTest` int(11) NOT NULL DEFAULT '0',
  `STEM` int(11) DEFAULT NULL,
  PRIMARY KEY (`STTID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `StudentID` (`StudentID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `StudentTranscriptCustom`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentTranscriptCustom` (
  `STTID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `StudentID` int(11) NOT NULL DEFAULT '0',
  `TestMonth` int(11) NOT NULL DEFAULT '0',
  `TestYear` int(11) NOT NULL DEFAULT '0',
  `Score` int(11) DEFAULT NULL,
  `Location` varchar(64) NOT NULL,
  `Name` varchar(64) NOT NULL,
  `PreTest` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`STTID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `StudentID` (`StudentID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `StudentTranscriptNotes`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentTranscriptNotes` (
  `STNID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `StudentID` int(11) NOT NULL DEFAULT '0',
  `Level` int(11) NOT NULL DEFAULT '0',
  `Comments` text NOT NULL,
  PRIMARY KEY (`STNID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `StudentID` (`StudentID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `StudentTranscriptPostings`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentTranscriptPostings` (
  `STPID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `Grade` int(11) NOT NULL DEFAULT '0',
  `Semester` int(11) NOT NULL DEFAULT '0',
  `Posted` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  PRIMARY KEY (`STPID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Date / Time Transcript info was posted';
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `StudentTranscriptSAT`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentTranscriptSAT` (
  `STTID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `StudentID` int(11) NOT NULL DEFAULT '0',
  `Reading` float DEFAULT NULL,
  `Math` float DEFAULT NULL,
  `Writing` float DEFAULT NULL,
  `Essay` int(11) DEFAULT NULL,
  `Verbal` int(11) DEFAULT NULL,
  `MultipleChoice` int(11) DEFAULT NULL,
  `National` int(11) DEFAULT NULL,
  `TestMonth` int(11) NOT NULL DEFAULT '0',
  `TestYear` int(11) NOT NULL DEFAULT '0',
  `PreTest` int(11) NOT NULL DEFAULT '0',
  `Total` float DEFAULT NULL,
  `ReadWriteSec` float DEFAULT NULL,
  `MathSec` float DEFAULT NULL,
  `Post2015` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`STTID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `StudentID` (`StudentID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `StudentTranscripts`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentTranscripts` (
  `STID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `ClassID` int(11) NOT NULL DEFAULT '0',
  `SubjectID` int(11) NOT NULL DEFAULT '0',
  `StudentID` int(11) NOT NULL DEFAULT '0',
  `Local` int(11) NOT NULL DEFAULT '0',
  `SchoolYearID` int(11) NOT NULL,
  `SchoolName` varchar(32) NOT NULL DEFAULT '',
  `CourseTitle` varchar(48) NOT NULL DEFAULT '',
  `CourseCode` varchar(10) NOT NULL,
  `RequireID` int(11) NOT NULL DEFAULT '0',
  `Grade` int(11) NOT NULL DEFAULT '0',
  `Quarter` int(11) NOT NULL DEFAULT '0',
  `Semester` int(11) NOT NULL DEFAULT '0',
  `LetterGrade` char(2) NOT NULL DEFAULT '0',
  `PointGrade` float NOT NULL DEFAULT '0',
  `CreditsAttempted` float NOT NULL DEFAULT '0',
  `CreditsEarned` float NOT NULL DEFAULT '0',
  `Weight` float NOT NULL DEFAULT '0',
  `Honor` int(11) NOT NULL DEFAULT '0' COMMENT 'Depreciated (now using GPAScale)',
  `Honors` float NOT NULL DEFAULT '0',
  `HrsPossible` int(11) NOT NULL DEFAULT '0',
  `HrsReceived` int(11) NOT NULL DEFAULT '0',
  `Scale` float NOT NULL DEFAULT '0',
  `Points` float NOT NULL DEFAULT '0',
  `AuthorID` int(11) NOT NULL DEFAULT '0',
  `Updated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Imported` int(11) NOT NULL DEFAULT '0',
  `Colleges` float NOT NULL DEFAULT '0',
  `College` int(11) NOT NULL DEFAULT '0' COMMENT 'Depreciated (now using GPAScale)',
  `CollegeCredit` int(11) NOT NULL DEFAULT '0',
  `ClassDCID` int(11) NOT NULL COMMENT 'Class District Category ID',
  `SGSID` int(11) NOT NULL COMMENT 'Student Grade Scale ID',
  `AcademicLevel` tinyint(4) NOT NULL DEFAULT '0',
  `HSCredit` tinyint(4) NOT NULL DEFAULT '0',
  `GPAScale` int(11) NOT NULL DEFAULT '0',
  `credit_descriptor_id` varchar(255) DEFAULT NULL,
  `credit_descriptor_short` varchar(255) DEFAULT NULL,
  `credit_descriptor_namespace` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`STID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `StudentID` (`StudentID`),
  KEY `Grade` (`Grade`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `StudentTuition`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentTuition` (
  `STID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `StudentID` int(11) NOT NULL DEFAULT '0',
  `TuitionID` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`STID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `StudentID` (`StudentID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `StudentTypes`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentTypes` (
  `STID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `Name` char(32) NOT NULL DEFAULT '',
  `Description` char(128) NOT NULL DEFAULT '',
  `Sequence` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`STID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `StudentVaccineConfig`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentVaccineConfig` (
  `SVCID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `SVID` int(11) NOT NULL DEFAULT '0',
  `Grade` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`SVCID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `SVID` (`SVID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `StudentVaccineRecords`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentVaccineRecords` (
  `SVRID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `StudentID` int(11) NOT NULL DEFAULT '0',
  `SVID` int(11) NOT NULL DEFAULT '0',
  `VaccineDate` date NOT NULL DEFAULT '0000-00-00',
  `RecordedDate` date NOT NULL DEFAULT '0000-00-00',
  `Notes` varchar(64) NOT NULL DEFAULT '',
  `Exempt` int(11) NOT NULL DEFAULT '0',
  `Imported` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`SVRID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `StudentID` (`StudentID`),
  KEY `SVID` (`SVID`),
  KEY `VaccineDate` (`VaccineDate`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `StudentVaccines`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentVaccines` (
  `SVID` int(11) NOT NULL AUTO_INCREMENT,
  `Vaccine` varchar(64) NOT NULL DEFAULT '',
  `Description` varchar(64) NOT NULL DEFAULT '',
  PRIMARY KEY (`SVID`),
  KEY `Vaccine` (`Vaccine`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `Students`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Students` (
  `StudentID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `FamilyID` int(11) NOT NULL DEFAULT '0',
  `Family2ID` int(11) NOT NULL DEFAULT '0',
  `UserID` int(11) NOT NULL DEFAULT '0',
  `FirstName` varchar(36) NOT NULL DEFAULT '',
  `LastName` varchar(36) NOT NULL DEFAULT '',
  `MiddleName` varchar(24) NOT NULL DEFAULT '',
  `Suffix` varchar(8) NOT NULL DEFAULT '',
  `DOB` date DEFAULT '0000-00-00',
  `Grade` int(11) NOT NULL DEFAULT '99',
  `Type` int(11) DEFAULT NULL,
  `FTN` int(11) NOT NULL DEFAULT '100',
  `GradYear` int(11) NOT NULL DEFAULT '0',
  `GradMonth` int(11) NOT NULL DEFAULT '5',
  `GradDay` int(11) NOT NULL DEFAULT '0',
  `Graduated` tinyint(1) NOT NULL DEFAULT '0',
  `District` varchar(16) NOT NULL DEFAULT '',
  `SchoolCode` varchar(16) NOT NULL DEFAULT '',
  `TeacherID` int(11) DEFAULT NULL,
  `CounselorID` int(11) NOT NULL DEFAULT '0',
  `NickName` varchar(36) DEFAULT NULL,
  `Gender` char(1) DEFAULT NULL,
  `MedInfo` text,
  `Tylenol` int(11) NOT NULL DEFAULT '0',
  `Ethnicity` int(11) NOT NULL DEFAULT '0',
  `RaceID` int(11) NOT NULL DEFAULT '0',
  `LanguageID` int(11) NOT NULL DEFAULT '0',
  `LEP_Eligible` int(11) NOT NULL DEFAULT '0',
  `LEP_Enrolled` int(11) NOT NULL DEFAULT '0',
  `FamilyCode` varchar(8) NOT NULL DEFAULT '',
  `SSN` varchar(9) NOT NULL DEFAULT '',
  `Current` int(11) NOT NULL DEFAULT '0' COMMENT 'Not Used - See SchoolYearStudents',
  `StudentCode` varchar(10) NOT NULL DEFAULT '',
  `PictureFile` varchar(64) DEFAULT NULL,
  `Email` varchar(128) NOT NULL DEFAULT '',
  `URL` varchar(128) DEFAULT NULL,
  `Cell` varchar(16) NOT NULL DEFAULT '',
  `Work` varchar(16) DEFAULT NULL,
  `SMS` varchar(128) NOT NULL DEFAULT '',
  `ExtID` varchar(32) DEFAULT NULL,
  `StateID` varchar(32) DEFAULT NULL,
  `StuLink` int(11) NOT NULL DEFAULT '0',
  `New` int(11) NOT NULL DEFAULT '0',
  `Deleted` int(11) NOT NULL DEFAULT '0',
  `DCPPID` int(11) NOT NULL DEFAULT '0',
  `LPPID` int(11) DEFAULT NULL,
  `BPPID` int(11) DEFAULT NULL,
  `LunchPeriod` int(11) DEFAULT '1',
  `LocationID` int(11) DEFAULT NULL,
  `LockerNum` varchar(8) NOT NULL DEFAULT '',
  `ComboNum` varchar(12) NOT NULL DEFAULT '',
  `GPA` float NOT NULL DEFAULT '0',
  `NumericAvg` float NOT NULL DEFAULT '0',
  `Ranked` int(11) NOT NULL DEFAULT '1',
  `Ranking` int(11) NOT NULL DEFAULT '0',
  `OutOf` int(11) NOT NULL DEFAULT '0',
  `AlertComments` text,
  `edfi_id` varchar(255) DEFAULT NULL,
  `diploma_level` varchar(255) DEFAULT NULL,
  `employablilty_skills` varchar(255) DEFAULT NULL,
  `employablilty_skills_pathway` varchar(255) DEFAULT NULL,
  `post_secondary_competencies` varchar(255) DEFAULT NULL,
  `post_secondary_competencies_pathway` varchar(255) DEFAULT NULL,
  `created_at` datetime(6) NOT NULL,
  `updated_at` datetime(6) NOT NULL,
  PRIMARY KEY (`StudentID`),
  KEY `Grade` (`Grade`),
  KEY `DOB` (`DOB`),
  KEY `LastName` (`LastName`),
  KEY `Ranking` (`Ranking`),
  KEY `GPA` (`GPA`),
  KEY `FamilyID` (`FamilyID`),
  KEY `Family2ID` (`Family2ID`),
  KEY `TeacherID` (`TeacherID`),
  KEY `CounselorID` (`CounselorID`),
  KEY `FindStudent` (`SchoolID`,`StudentID`,`Grade`),
  KEY `LPPID` (`LPPID`),
  KEY `BPPID` (`BPPID`),
  CONSTRAINT `Students_ibfk_1` FOREIGN KEY (`LPPID`) REFERENCES `LunchPricePlans` (`LPPID`) ON DELETE SET NULL,
  CONSTRAINT `Students_ibfk_2` FOREIGN KEY (`BPPID`) REFERENCES `LunchPricePlans` (`LPPID`) ON DELETE SET NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `SupportGroups`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `SupportGroups` (
  `SGID` int(11) NOT NULL AUTO_INCREMENT,
  `Name` varchar(32) NOT NULL,
  `Code` varchar(5) NOT NULL,
  `LeaderID` int(11) NOT NULL,
  PRIMARY KEY (`SGID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `SupportTicketComments`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `SupportTicketComments` (
  `STCID` int(11) NOT NULL AUTO_INCREMENT,
  `STID` int(11) NOT NULL DEFAULT '0',
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `UserID` int(11) NOT NULL DEFAULT '0',
  `Comments` text NOT NULL,
  `CreatedDT` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `WorkTime` int(11) NOT NULL,
  `Private` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`STCID`),
  KEY `STID` (`STID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `UserID` (`UserID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `SupportTickets`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `SupportTickets` (
  `STID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `Summary` varchar(64) NOT NULL DEFAULT '',
  `StatusID` int(11) NOT NULL DEFAULT '0',
  `Level` int(11) NOT NULL DEFAULT '1',
  `Closed` int(11) NOT NULL DEFAULT '0',
  `Enhancement` int(11) NOT NULL DEFAULT '0',
  `UserID` int(11) NOT NULL DEFAULT '0',
  `TicketCode` varchar(16) NOT NULL DEFAULT '',
  `CreatedDT` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `UpdatedDT` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `OwnerID` int(11) NOT NULL DEFAULT '0',
  `Severity` int(11) NOT NULL DEFAULT '0',
  `Flagged` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`STID`),
  KEY `AuthorID` (`UserID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `TicketCode` (`TicketCode`),
  KEY `CreatedDT` (`CreatedDT`),
  KEY `OwnerID` (`OwnerID`),
  KEY `Closed` (`Closed`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `SystemAlertUsers`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `SystemAlertUsers` (
  `SAUID` int(11) NOT NULL AUTO_INCREMENT,
  `SAID` int(11) NOT NULL DEFAULT '0',
  `UserID` int(11) NOT NULL DEFAULT '0',
  `DateTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  PRIMARY KEY (`SAUID`),
  KEY `UserID` (`UserID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `SystemAlerts`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `SystemAlerts` (
  `SAID` int(11) NOT NULL AUTO_INCREMENT,
  `Title` varchar(64) NOT NULL DEFAULT '',
  `Content` text NOT NULL,
  `ExpireDate` date NOT NULL DEFAULT '0000-00-00',
  `Level` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`SAID`),
  KEY `ExpireDate` (`ExpireDate`),
  KEY `Level` (`Level`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `SystemBookChapters`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `SystemBookChapters` (
  `SBCID` int(11) NOT NULL AUTO_INCREMENT,
  `SBID` int(11) NOT NULL,
  `Title` varchar(32) NOT NULL,
  `Description` varchar(128) NOT NULL,
  `ChapterNumber` int(11) NOT NULL,
  `Published` int(11) NOT NULL,
  `Content` text NOT NULL,
  `VideoURL` varchar(255) NOT NULL,
  PRIMARY KEY (`SBCID`),
  KEY `SBID` (`SBID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `SystemBooks`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `SystemBooks` (
  `SBID` int(11) NOT NULL AUTO_INCREMENT,
  `BookIndex` int(11) NOT NULL,
  `Title` varchar(32) NOT NULL,
  `Description` varchar(128) NOT NULL,
  `Content` text NOT NULL,
  `Published` int(11) NOT NULL,
  `Level` int(11) NOT NULL DEFAULT '1',
  `SectionID` int(11) NOT NULL,
  PRIMARY KEY (`SBID`),
  KEY `BookIndex` (`BookIndex`),
  KEY `Published` (`Published`),
  KEY `Title` (`Title`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `SystemLeafNoteSchools`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `SystemLeafNoteSchools` (
  `SLNSID` int(11) NOT NULL AUTO_INCREMENT,
  `SLNID` int(11) NOT NULL,
  `SchoolID` int(11) NOT NULL,
  PRIMARY KEY (`SLNSID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `SystemLeafNoteUsers`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `SystemLeafNoteUsers` (
  `SLNUID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `DateTime` datetime NOT NULL,
  `UserID` int(11) NOT NULL,
  `SLNID` int(11) NOT NULL,
  PRIMARY KEY (`SLNUID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `UserID` (`UserID`),
  KEY `SLNID` (`SLNID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `SystemLeafNotes`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `SystemLeafNotes` (
  `SLNID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `Date` date NOT NULL,
  `Title` varchar(128) NOT NULL,
  `Color` varchar(8) NOT NULL,
  `Content` text NOT NULL,
  `ExpireDate` date NOT NULL,
  `Limited` int(1) NOT NULL DEFAULT '0',
  `Viewable` int(11) NOT NULL DEFAULT '1',
  PRIMARY KEY (`SLNID`),
  KEY `Date` (`Date`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `SystemLog`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `SystemLog` (
  `SLID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `UserID` int(11) NOT NULL DEFAULT '0',
  `DateTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Message` varchar(128) NOT NULL DEFAULT '',
  PRIMARY KEY (`SLID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `SystemMessageUsers`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `SystemMessageUsers` (
  `SAUID` int(11) NOT NULL AUTO_INCREMENT,
  `SAID` int(11) NOT NULL DEFAULT '0',
  `UserID` int(11) NOT NULL DEFAULT '0',
  `DateTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  PRIMARY KEY (`SAUID`),
  KEY `SAID` (`SAID`),
  KEY `UserID` (`UserID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `SystemMessages`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `SystemMessages` (
  `SAID` int(11) NOT NULL AUTO_INCREMENT,
  `Title` varchar(64) NOT NULL DEFAULT '',
  `Content` text NOT NULL,
  `ExpireDate` date NOT NULL DEFAULT '0000-00-00',
  `Level` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`SAID`),
  KEY `Level` (`Level`),
  KEY `ExpireDate` (`ExpireDate`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `SystemVideos`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `SystemVideos` (
  `SVID` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `URL` varchar(255) NOT NULL DEFAULT '',
  `Name` varchar(32) NOT NULL DEFAULT '',
  `Source` varchar(32) NOT NULL,
  `Comments` text NOT NULL,
  `AuthorID` int(11) NOT NULL DEFAULT '0',
  `Updated` datetime NOT NULL,
  `Embed` text NOT NULL,
  `Parent` int(11) NOT NULL,
  `Student` int(11) NOT NULL,
  PRIMARY KEY (`SVID`),
  KEY `MediaID` (`SVID`),
  KEY `Parent` (`Parent`),
  KEY `Student` (`Student`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `SystemVideosRead`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `SystemVideosRead` (
  `SVRID` int(11) NOT NULL AUTO_INCREMENT,
  `SVID` int(11) NOT NULL DEFAULT '0',
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `UserID` int(11) NOT NULL DEFAULT '0',
  `DateTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  PRIMARY KEY (`SVRID`),
  KEY `MID` (`SVID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `UserID` (`UserID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `TM_BusRoute`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `TM_BusRoute` (
  `BRID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `Time` int(11) NOT NULL,
  `Days` int(11) NOT NULL,
  `Title` varchar(128) NOT NULL,
  `Description` varchar(128) NOT NULL,
  PRIMARY KEY (`BRID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `TM_BusRouteStudents`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `TM_BusRouteStudents` (
  `BRSID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `StudentID` int(11) NOT NULL,
  `BRID` int(11) NOT NULL,
  `Days` int(11) NOT NULL DEFAULT '0',
  `Notes` varchar(128) NOT NULL,
  PRIMARY KEY (`BRSID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `TM_Carpool`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `TM_Carpool` (
  `CPID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `FamilyID` int(11) NOT NULL,
  `Notes` varchar(128) NOT NULL,
  `AMPM` tinyint(1) NOT NULL,
  `Days` tinyint(2) NOT NULL,
  `Seats` tinyint(1) NOT NULL,
  `Status` tinyint(1) NOT NULL COMMENT '1=need 2=give',
  PRIMARY KEY (`CPID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `TM_FieldTrip`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `TM_FieldTrip` (
  `FTID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `ClassID` int(11) NOT NULL,
  `Teacher` varchar(128) NOT NULL,
  `Destination` varchar(128) NOT NULL,
  `Departure` time NOT NULL,
  `ArriveDest` time NOT NULL,
  `DepartDest` time NOT NULL,
  `Arrival` time NOT NULL,
  `Date` date NOT NULL,
  `Description` varchar(128) NOT NULL,
  PRIMARY KEY (`FTID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ClassID` (`ClassID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `TM_FieldTripDriver`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `TM_FieldTripDriver` (
  `FTDID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `FTID` int(11) NOT NULL,
  `UserID` int(11) NOT NULL,
  `ContactID` int(11) NOT NULL,
  PRIMARY KEY (`FTDID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `TM_FieldTripStudents`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `TM_FieldTripStudents` (
  `FTSID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `FTID` int(11) NOT NULL,
  `StudentID` int(11) NOT NULL,
  `FTDID` int(11) NOT NULL,
  PRIMARY KEY (`FTSID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `TM_ParkingPass`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `TM_ParkingPass` (
  `PPID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `StudentID` int(11) NOT NULL,
  `Make` varchar(64) NOT NULL,
  `Model` varchar(64) NOT NULL,
  `License` varchar(32) NOT NULL,
  `PassID` varchar(64) NOT NULL,
  PRIMARY KEY (`PPID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `TadsIntegration`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `TadsIntegration` (
  `TIID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  PRIMARY KEY (`TIID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `TadsSyncStudents`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `TadsSyncStudents` (
  `TSSID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `StudentID` int(11) NOT NULL,
  `SchoolYearID` int(11) NOT NULL,
  PRIMARY KEY (`TSSID`),
  UNIQUE KEY `SchoolID` (`SchoolID`,`StudentID`,`SchoolYearID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `TicketAlarms`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `TicketAlarms` (
  `TAlarmID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `UserID` int(11) NOT NULL DEFAULT '0',
  `TicketID` int(11) NOT NULL DEFAULT '0',
  KEY `TicketAlarmID` (`TAlarmID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `UserID` (`UserID`),
  KEY `EventID` (`TicketID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `TicketCatagories`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `TicketCatagories` (
  `CatagoryID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `Description` varchar(128) NOT NULL DEFAULT '',
  `Name` varchar(32) NOT NULL DEFAULT '',
  PRIMARY KEY (`CatagoryID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `TicketContacts`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `TicketContacts` (
  `TicketContactID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `TicketID` int(11) NOT NULL DEFAULT '0',
  `ContactID` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`TicketContactID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `TicketLogs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `TicketLogs` (
  `TicketLogID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `TicketID` int(11) NOT NULL DEFAULT '0',
  `Date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Subject` varchar(128) NOT NULL DEFAULT '',
  `Description` longtext NOT NULL,
  `UserID` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`TicketLogID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `TicketID` (`TicketID`),
  KEY `UserID` (`UserID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `TicketNotifications`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `TicketNotifications` (
  `TNID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `UserID` int(11) NOT NULL DEFAULT '0',
  `TicketID` int(11) NOT NULL DEFAULT '0',
  KEY `EventAlarmID` (`TNID`),
  KEY `CompanyID` (`SchoolID`),
  KEY `UserID` (`UserID`),
  KEY `TicketID` (`TicketID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `Tickets`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Tickets` (
  `TicketID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `Date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `DueDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `ClosedDate` datetime NOT NULL,
  `ClassID` int(11) NOT NULL DEFAULT '0',
  `Summary` varchar(64) NOT NULL DEFAULT '',
  `Attachment` varchar(64) NOT NULL DEFAULT '',
  `Description` longtext NOT NULL,
  `Resolution` longtext NOT NULL,
  `StatusID` int(11) NOT NULL DEFAULT '0',
  `AssignID` int(11) NOT NULL DEFAULT '0',
  `PriorityID` int(11) NOT NULL DEFAULT '0',
  `AuthorID` int(11) NOT NULL DEFAULT '0',
  `ClosedID` int(11) NOT NULL,
  `TicketCode` varchar(16) NOT NULL DEFAULT '',
  `Type` int(11) NOT NULL DEFAULT '0',
  `CatagoryID` int(11) NOT NULL DEFAULT '0',
  `ChangeOfStatus` datetime DEFAULT NULL,
  PRIMARY KEY (`TicketID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `StatusID` (`StatusID`),
  KEY `AssignID` (`AssignID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `TimeCard`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `TimeCard` (
  `TCID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `ClassID` int(11) NOT NULL DEFAULT '0',
  `TCTID` int(11) NOT NULL DEFAULT '0',
  `UserID` int(11) NOT NULL DEFAULT '0',
  `Date` date NOT NULL DEFAULT '0000-00-00',
  `Start` bigint(20) NOT NULL DEFAULT '0',
  `Stop` bigint(20) NOT NULL DEFAULT '0',
  `Hours` int(11) NOT NULL DEFAULT '0',
  `Minutes` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`TCID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ClassID` (`ClassID`),
  KEY `Date` (`Date`),
  KEY `UserID` (`UserID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `TimeCardConfig`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `TimeCardConfig` (
  `TCCID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `TimePeriods` int(11) NOT NULL DEFAULT '1' COMMENT '1=Week, 2=Cycles',
  `Label` varchar(16) NOT NULL,
  `AllowEmpAdjust` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`TCCID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `TimeCardCycles`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `TimeCardCycles` (
  `TCCID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `Name` varchar(64) NOT NULL DEFAULT '',
  `StartDate` date NOT NULL DEFAULT '0000-00-00',
  `EndDate` date NOT NULL DEFAULT '0000-00-00',
  `Open` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`TCCID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `StartDate` (`StartDate`),
  KEY `EndDate` (`EndDate`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `TimeCardSubmissions`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `TimeCardSubmissions` (
  `TCSID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `UserID` int(11) NOT NULL,
  `Year` int(11) NOT NULL,
  `Week` int(11) NOT NULL,
  `CycleID` int(11) NOT NULL,
  `SubmittedDT` datetime NOT NULL,
  `ApprovedDT` datetime NOT NULL,
  `ApprovedUID` int(11) NOT NULL,
  PRIMARY KEY (`TCSID`),
  KEY `CompanyID` (`SchoolID`),
  KEY `UserID` (`UserID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Timecard Weekly submissions';
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `TimeCardTask`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `TimeCardTask` (
  `TCTID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `Code` varchar(5) NOT NULL,
  `Name` varchar(64) NOT NULL DEFAULT '',
  `Description` text NOT NULL,
  `TimeOff` int(11) NOT NULL,
  PRIMARY KEY (`TCTID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `TimeOffRequest`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `TimeOffRequest` (
  `TORID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `UserID` int(11) NOT NULL,
  `Date` date NOT NULL,
  `Days` int(11) NOT NULL,
  `Hours` decimal(10,2) NOT NULL,
  `TCTID` int(11) DEFAULT NULL,
  `Comments` varchar(128) NOT NULL,
  `Status` int(11) NOT NULL DEFAULT '1' COMMENT '1=Pending, 2=Approved, 3=Denied',
  `AuthorID` int(11) DEFAULT NULL,
  `CreateDate` datetime NOT NULL,
  PRIMARY KEY (`TORID`),
  KEY `CompanyID` (`SchoolID`),
  KEY `UserID` (`UserID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `TimeTracker`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `TimeTracker` (
  `TimeTrackerID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolId` int(11) NOT NULL DEFAULT '0',
  `UserID` int(11) NOT NULL DEFAULT '0',
  `ClassID` int(11) NOT NULL DEFAULT '0',
  `TaskID` int(11) NOT NULL DEFAULT '0',
  `StartTime` bigint(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`TimeTrackerID`),
  KEY `SchoolId` (`SchoolId`),
  KEY `UserID` (`UserID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `Titles`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Titles` (
  `TitleID` int(11) NOT NULL AUTO_INCREMENT,
  `TitleName` varchar(15) NOT NULL,
  PRIMARY KEY (`TitleID`),
  UNIQUE KEY `TitleID` (`TitleID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `TranscriptConfig`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `TranscriptConfig` (
  `TCID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `TCTID` int(11) NOT NULL COMMENT 'TranscriptConfigTemplateID',
  `Template` int(11) NOT NULL DEFAULT '1',
  `Legend` int(11) NOT NULL DEFAULT '0',
  `FontSize` int(11) NOT NULL DEFAULT '0',
  `FontFamily` varchar(32) NOT NULL,
  `Notes` varchar(255) NOT NULL DEFAULT '',
  `Weighted` int(11) NOT NULL DEFAULT '1',
  `GPA` int(11) NOT NULL DEFAULT '1',
  `GradeYears` int(11) NOT NULL DEFAULT '1',
  `NumAvg` int(11) NOT NULL DEFAULT '1',
  `WorkInProgress` int(11) NOT NULL DEFAULT '0',
  `IncludeSAT` int(11) NOT NULL DEFAULT '1',
  `IncludeACT` int(11) NOT NULL DEFAULT '1',
  `IncludeCustom` int(11) NOT NULL,
  `IncludeRanking` int(11) NOT NULL DEFAULT '1',
  `FullYearLines` int(11) NOT NULL DEFAULT '1',
  `Rounding` int(11) NOT NULL DEFAULT '2',
  `GPARounding` int(11) NOT NULL DEFAULT '4',
  `TransferGrade` int(11) NOT NULL DEFAULT '2',
  `IncludeSigAll` int(11) NOT NULL DEFAULT '0',
  `RequireOfficial` int(11) NOT NULL DEFAULT '1',
  `IncludeCourseCode` int(11) NOT NULL DEFAULT '0',
  `DisplayGrade` int(11) NOT NULL DEFAULT '0',
  `IncludeAttendance` tinyint(1) NOT NULL DEFAULT '0',
  `FooterText` text,
  PRIMARY KEY (`TCID`),
  UNIQUE KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `TranscriptConfigTemplates`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `TranscriptConfigTemplates` (
  `TCTID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `Name` varchar(36) NOT NULL,
  `Description` varchar(128) NOT NULL,
  PRIMARY KEY (`TCTID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `TranscriptTemplates`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `TranscriptTemplates` (
  `TTID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `Name` varchar(32) NOT NULL,
  `Description` varchar(255) NOT NULL,
  `HelpURL` varchar(255) NOT NULL,
  `Content` text NOT NULL,
  `Filename` varchar(32) NOT NULL,
  `Count` int(11) NOT NULL DEFAULT '0',
  `Format` int(11) NOT NULL COMMENT '1=Landscape 2=Portrait',
  `Margins` varchar(16) NOT NULL DEFAULT '15,15,16,16' COMMENT 'L,R,T,B',
  `PSize` varchar(20) NOT NULL,
  `Seq` int(11) NOT NULL,
  `Config` varchar(255) NOT NULL,
  PRIMARY KEY (`TTID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `TranscriptText`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `TranscriptText` (
  `TRTXTID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `SDID` int(11) NOT NULL,
  `TokenNum` int(11) NOT NULL,
  `Label` varchar(32) NOT NULL,
  `Content` text NOT NULL,
  `Locked` tinyint(4) NOT NULL DEFAULT '0',
  PRIMARY KEY (`TRTXTID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `SDID` (`SDID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `Transcripts`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Transcripts` (
  `TranscriptID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `StudentID` int(11) NOT NULL DEFAULT '0',
  `Year` int(11) NOT NULL DEFAULT '0',
  `Semester` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`TranscriptID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `StudentID` (`StudentID`),
  KEY `Year` (`Year`),
  KEY `Semester` (`Semester`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `Tuition`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Tuition` (
  `TuitionID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `Code` varchar(8) NOT NULL DEFAULT '',
  `Description` varchar(48) NOT NULL DEFAULT '',
  `Amount` float(10,2) NOT NULL DEFAULT '0.00',
  PRIMARY KEY (`TuitionID`),
  UNIQUE KEY `TuitionID` (`TuitionID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `UpdateFamilyLog`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `UpdateFamilyLog` (
  `UFLID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `FamilyID` int(11) NOT NULL,
  `AuthorID` int(11) NOT NULL,
  `DateTime` datetime NOT NULL,
  `Comments` varchar(255) NOT NULL,
  PRIMARY KEY (`UFLID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `FamilyID` (`FamilyID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Family Update Log Table';
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `UpdateSchoolLog`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `UpdateSchoolLog` (
  `USLID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `AuthorID` int(11) NOT NULL,
  `DateTime` datetime NOT NULL,
  `Comments` varchar(255) NOT NULL,
  PRIMARY KEY (`USLID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Student Update Log Table';
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `UpdateSiteAdminLog`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `UpdateSiteAdminLog` (
  `USALID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `AuthorID` int(11) NOT NULL,
  `DateTime` datetime NOT NULL,
  `Comments` varchar(255) NOT NULL,
  `UserID` int(11) NOT NULL,
  PRIMARY KEY (`USALID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Student Update Log Table';
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `UpdateStudentLog`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `UpdateStudentLog` (
  `USLID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `StudentID` int(11) NOT NULL,
  `AuthorID` int(11) NOT NULL,
  `DateTime` datetime NOT NULL,
  `Event` int(11) NOT NULL,
  `Comments` varchar(255) NOT NULL,
  `Notes` varchar(255) NOT NULL,
  PRIMARY KEY (`USLID`),
  KEY `SchoolID` (`SchoolID`,`StudentID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Student Update Log Table';
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `UserCategories`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `UserCategories` (
  `CategoryID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `UCGID` int(11) DEFAULT NULL,
  `Sequence` int(11) NOT NULL DEFAULT '0',
  `Description` varchar(128) NOT NULL DEFAULT '',
  `Name` varchar(32) NOT NULL DEFAULT '',
  PRIMARY KEY (`CategoryID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `Name` (`Name`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `UserCategoryGroups`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `UserCategoryGroups` (
  `UCGID` int(11) NOT NULL AUTO_INCREMENT,
  `Name` varchar(16) NOT NULL DEFAULT '',
  `Description` varchar(64) NOT NULL DEFAULT '',
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `Sequence` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`UCGID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `UserCategoryUsers`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `UserCategoryUsers` (
  `UCUID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `UserID` int(11) NOT NULL DEFAULT '0',
  `CategoryID` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`UCUID`),
  KEY `UserID` (`UserID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `UserConfig`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `UserConfig` (
  `UserConfigID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `UserID` int(11) NOT NULL DEFAULT '0',
  `FreshchatID` varchar(255) NOT NULL,
  `Updated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `WorkDayStart` int(11) NOT NULL DEFAULT '0',
  `WorkDayStop` int(11) NOT NULL DEFAULT '0',
  `WeekEndColor` varchar(8) NOT NULL DEFAULT '',
  `WeekDayColor` varchar(8) NOT NULL DEFAULT '',
  `DisplayToDo` int(11) NOT NULL DEFAULT '0',
  `DisplayWorkflow` int(11) NOT NULL DEFAULT '0',
  `DisplayCallNotes` int(11) NOT NULL DEFAULT '0',
  `DisplayEmailLogs` int(11) NOT NULL DEFAULT '0',
  `DisplayCheckListItems` int(11) NOT NULL DEFAULT '0',
  `MyDesk` varchar(8) NOT NULL DEFAULT '11111111',
  `MyDeskHide` varchar(8) NOT NULL DEFAULT '00000000',
  `MyDeskView` varchar(12) NOT NULL DEFAULT 'events',
  `Associates` int(11) NOT NULL DEFAULT '0',
  `Weather` int(11) NOT NULL DEFAULT '0',
  `Email` int(11) NOT NULL DEFAULT '1',
  `PAN` int(11) NOT NULL DEFAULT '1',
  `Workflow` int(11) NOT NULL DEFAULT '0',
  `Reminders` int(11) NOT NULL DEFAULT '0',
  `Memo` int(11) NOT NULL DEFAULT '0',
  `Links` int(11) NOT NULL DEFAULT '0',
  `EventNotification` int(11) NOT NULL DEFAULT '0',
  `EventNotificationTime` int(11) NOT NULL DEFAULT '0',
  `EventEmail` varchar(128) NOT NULL DEFAULT '',
  `ICSExport` int(11) NOT NULL DEFAULT '0',
  `ICSImport` int(11) NOT NULL DEFAULT '0',
  `ICSImportURL` varchar(128) NOT NULL,
  `Google` int(11) NOT NULL,
  PRIMARY KEY (`UserConfigID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `UserID` (`UserID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `UserDenied`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `UserDenied` (
  `DeniedID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `UserID` int(11) NOT NULL,
  `LoginID` varchar(16) NOT NULL DEFAULT '0',
  `DateTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Comments` text NOT NULL,
  `Accepted` tinyint(4) NOT NULL DEFAULT '0',
  PRIMARY KEY (`DeniedID`),
  KEY `DeniedID` (`DeniedID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `UserDeposits`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `UserDeposits` (
  `UDID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `UserID` int(11) NOT NULL DEFAULT '0',
  `Date` date NOT NULL DEFAULT '0000-00-00',
  `AcctCCID` int(11) NOT NULL,
  `Amount` float(10,2) NOT NULL DEFAULT '0.00',
  `Comments` varchar(255) NOT NULL DEFAULT '',
  `PaymentMethod` int(11) NOT NULL,
  `CheckNum` varchar(10) NOT NULL,
  `AuthorID` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`UDID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `UserID` (`UserID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `UserDevelopers`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `UserDevelopers` (
  `UDID` int(11) NOT NULL AUTO_INCREMENT,
  `DeveloperID` int(11) NOT NULL COMMENT 'UserID from SchoolID -1',
  `UserID` int(11) NOT NULL COMMENT 'UserID from SchoolID 1337',
  `Created` datetime NOT NULL,
  PRIMARY KEY (`UDID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Connection between developers and users in the Sandbox School';
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `UserDocuments`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `UserDocuments` (
  `UDID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `UserID` int(11) NOT NULL DEFAULT '0',
  `Name` varchar(64) NOT NULL DEFAULT '',
  `Date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Code` varchar(7) NOT NULL,
  `Type` varchar(32) NOT NULL DEFAULT '',
  `FileName` varchar(64) NOT NULL,
  `Size` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`UDID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `StudentID` (`UserID`),
  KEY `Date` (`Date`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `UserLevel`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `UserLevel` (
  `UserLevel` int(11) NOT NULL AUTO_INCREMENT,
  `Description` varchar(32) NOT NULL DEFAULT '',
  PRIMARY KEY (`UserLevel`),
  UNIQUE KEY `UserLevel_2` (`UserLevel`),
  KEY `UserLevel` (`UserLevel`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `UserLoggedIn`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `UserLoggedIn` (
  `ULIID` int(11) NOT NULL AUTO_INCREMENT,
  `EntityID` int(11) NOT NULL DEFAULT '0',
  `UserID` int(11) NOT NULL DEFAULT '0',
  `UserName` varchar(32) NOT NULL DEFAULT '',
  `Level` int(11) NOT NULL DEFAULT '0',
  `DateTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Working` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `SessionID` varchar(32) NOT NULL DEFAULT '',
  `Invisible` int(11) NOT NULL DEFAULT '0',
  `Status` varchar(16) NOT NULL DEFAULT '',
  `URL` varchar(32) NOT NULL,
  PRIMARY KEY (`ULIID`),
  KEY `UserID` (`UserID`),
  KEY `EntityID` (`EntityID`),
  KEY `Level` (`Level`),
  KEY `DateTime` (`DateTime`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `UserLoginFailures`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `UserLoginFailures` (
  `ULFID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `UserID` int(11) NOT NULL,
  `DateTime` datetime NOT NULL,
  `IPAddress` varchar(16) NOT NULL,
  `HostName` varchar(64) NOT NULL,
  `Notes` varchar(255) NOT NULL,
  PRIMARY KEY (`ULFID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `DateTime` (`DateTime`),
  KEY `UserID` (`UserID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `UserLunchPeriods`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `UserLunchPeriods` (
  `ULPPID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `UserID` int(11) NOT NULL,
  `LunchPeriod` int(11) DEFAULT NULL,
  PRIMARY KEY (`ULPPID`),
  KEY `SchoolID` (`SchoolID`,`UserID`,`LunchPeriod`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `UserNotes`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `UserNotes` (
  `UserNoteID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `UserID` int(11) NOT NULL DEFAULT '0',
  `AuthorID` int(11) NOT NULL DEFAULT '0',
  `DateTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Subject` varchar(64) NOT NULL DEFAULT '',
  `Message` text NOT NULL,
  PRIMARY KEY (`UserNoteID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `UserID` (`UserID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `UserOAuth`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `UserOAuth` (
  `UOAID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `UserID` int(11) NOT NULL,
  `VendorID` varchar(126) NOT NULL,
  `Vendor` varchar(16) NOT NULL,
  `Type` varchar(32) NOT NULL,
  `Token` varchar(255) NOT NULL,
  `RefreshToken` varchar(512) NOT NULL,
  `AccessToken` text NOT NULL,
  `Scope` int(11) NOT NULL DEFAULT '0',
  `Created` int(11) NOT NULL,
  `Expires` int(11) NOT NULL,
  PRIMARY KEY (`UOAID`),
  KEY `CompanyID` (`SchoolID`),
  KEY `UserID` (`UserID`),
  KEY `Vendor` (`Vendor`),
  KEY `GoogleID` (`VendorID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `UserOAuthLogin`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `UserOAuthLogin` (
  `UOALID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `UserID` int(11) NOT NULL,
  `Username` varchar(16) NOT NULL,
  `Vendor` varchar(16) NOT NULL,
  `LoginDateTime` datetime NOT NULL,
  `Success` smallint(6) NOT NULL,
  PRIMARY KEY (`UOALID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `UserID` (`UserID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `UserPasswordRequest`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `UserPasswordRequest` (
  `UPRID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `UserID` int(11) NOT NULL,
  `PWKey` varchar(16) NOT NULL,
  `Email` varchar(254) NOT NULL,
  PRIMARY KEY (`UPRID`),
  KEY `SchoolID` (`SchoolID`,`UserID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `UserPermissions`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `UserPermissions` (
  `PermissionID` int(11) NOT NULL AUTO_INCREMENT,
  `GroupID` int(11) NOT NULL,
  `Seq` int(11) NOT NULL DEFAULT '0',
  `ColumnName` varchar(32) NOT NULL DEFAULT '',
  `Description` varchar(32) NOT NULL DEFAULT '',
  `Explaination` varchar(255) NOT NULL,
  `HelpID` varchar(6) NOT NULL,
  PRIMARY KEY (`PermissionID`),
  KEY `Seq` (`Seq`),
  KEY `GroupID` (`GroupID`),
  KEY `ColumnName` (`ColumnName`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `UserPositions`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `UserPositions` (
  `UPID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `Code` varchar(10) NOT NULL DEFAULT '',
  `Name` varchar(32) NOT NULL DEFAULT '',
  `Description` varchar(128) NOT NULL DEFAULT '',
  `High` float NOT NULL DEFAULT '0',
  `Low` float NOT NULL DEFAULT '0',
  `Management` int(11) NOT NULL DEFAULT '0',
  `edfi_id` varchar(255) DEFAULT NULL,
  `created_at` datetime(6) DEFAULT NULL,
  `updated_at` datetime(6) DEFAULT NULL,
  PRIMARY KEY (`UPID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `UserPreferences`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `UserPreferences` (
  `UPID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `StaffID` int(11) NOT NULL DEFAULT '0',
  `UserName` varchar(16) NOT NULL DEFAULT '',
  `PassWord` varchar(16) NOT NULL DEFAULT '',
  `CompWidth` int(11) NOT NULL DEFAULT '0',
  `MsgWidth` int(11) NOT NULL DEFAULT '0',
  `MsgFontSize` int(11) NOT NULL DEFAULT '0',
  `MsgHeaders` int(11) NOT NULL DEFAULT '0',
  `MsgCount` int(11) NOT NULL DEFAULT '0',
  `MsgOrder` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`UPID`),
  UNIQUE KEY `UPID_2` (`UPID`),
  KEY `UPID` (`UPID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `UserResolutions`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `UserResolutions` (
  `URID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `UserID` int(11) NOT NULL,
  `ScreenRes` varchar(11) NOT NULL DEFAULT '0',
  `WindowRes` varchar(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`URID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `UserID` (`UserID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Window and Screen resolution of users';
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `UserSecurity`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `UserSecurity` (
  `USID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `UserID` int(11) NOT NULL DEFAULT '0',
  `PermissionID` int(11) NOT NULL DEFAULT '0',
  `Permission` varchar(32) NOT NULL DEFAULT '',
  PRIMARY KEY (`USID`),
  KEY `UserID` (`UserID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `UserSessions`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `UserSessions` (
  `USID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `UserID` int(11) NOT NULL DEFAULT '0',
  `SessionID` varchar(32) NOT NULL DEFAULT '',
  PRIMARY KEY (`USID`),
  KEY `SchoolIID` (`SchoolID`),
  KEY `UserID` (`UserID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `UserShortcuts`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `UserShortcuts` (
  `USID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `UserID` int(11) NOT NULL,
  `URL` varchar(128) NOT NULL,
  `Icon` varchar(32) NOT NULL,
  `Title` varchar(32) NOT NULL,
  `Sequence` int(11) NOT NULL,
  PRIMARY KEY (`USID`),
  KEY `UserID` (`UserID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `UserSignature`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `UserSignature` (
  `USIGID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `UserID` int(11) NOT NULL,
  `Signature` text NOT NULL,
  PRIMARY KEY (`USIGID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `UserID` (`UserID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `UserStatisticChoices`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `UserStatisticChoices` (
  `USCID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `USID` int(11) NOT NULL,
  `Sequence` int(11) NOT NULL,
  `Value` varchar(16) NOT NULL,
  `Label` varchar(48) NOT NULL,
  PRIMARY KEY (`USCID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `USID` (`USID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `UserStatisticGroups`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `UserStatisticGroups` (
  `USGID` int(11) NOT NULL AUTO_INCREMENT,
  `Name` varchar(16) NOT NULL DEFAULT '',
  `Description` varchar(64) NOT NULL DEFAULT '',
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `Sequence` int(11) NOT NULL DEFAULT '0',
  `created_at` datetime(6) NOT NULL,
  `updated_at` datetime(6) NOT NULL,
  PRIMARY KEY (`USGID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `UserStatisticValues`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `UserStatisticValues` (
  `USVID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `UserID` int(11) NOT NULL DEFAULT '0',
  `USID` int(11) NOT NULL DEFAULT '0',
  `Value` varchar(255) NOT NULL DEFAULT '',
  `ValueDate` date NOT NULL,
  PRIMARY KEY (`USVID`),
  KEY `CompanyID` (`SchoolID`),
  KEY `UserID` (`UserID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `UserStatistics`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `UserStatistics` (
  `USID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `USGID` int(11) DEFAULT NULL,
  `Sequence` int(11) NOT NULL DEFAULT '0',
  `Type` int(11) NOT NULL DEFAULT '1',
  `Name` varchar(32) NOT NULL DEFAULT '',
  `Description` varchar(255) NOT NULL DEFAULT '',
  `Public` int(11) NOT NULL DEFAULT '0',
  `ValidationType` int(11) NOT NULL DEFAULT '0' COMMENT ' 0=None, 1=Number, 2=Email, 3=Min Length, 4=Max Length, 5=Custom Regex',
  `ValidationPattern` varchar(64) NOT NULL,
  `Required` int(11) NOT NULL DEFAULT '0' COMMENT '0=Not Required, 1=Required',
  `created_at` datetime(6) NOT NULL,
  `updated_at` datetime(6) NOT NULL,
  PRIMARY KEY (`USID`),
  KEY `CompanyID` (`SchoolID`),
  KEY `USGID` (`USGID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `UserSupport`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `UserSupport` (
  `USID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `USUID` int(11) NOT NULL,
  `UserID` int(11) NOT NULL,
  `DateTime` datetime NOT NULL,
  `IPAddress` varchar(64) NOT NULL,
  PRIMARY KEY (`USID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Track usage of Support ';
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `UserSupportUsers`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `UserSupportUsers` (
  `USUID` int(11) NOT NULL AUTO_INCREMENT,
  `Token` varchar(32) NOT NULL,
  `Username` varchar(128) NOT NULL,
  UNIQUE KEY `USIPID` (`USUID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `UserTextMsg`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `UserTextMsg` (
  `UTMID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `UserID` int(11) NOT NULL DEFAULT '0',
  `Email` varchar(64) NOT NULL DEFAULT '',
  `Email2` varchar(64) NOT NULL,
  `Pan2Text` int(11) NOT NULL DEFAULT '0',
  `Pan2Email` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`UTMID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `UserID` (`UserID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `UserTypes`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `UserTypes` (
  `UTID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `Name` char(32) NOT NULL DEFAULT '',
  `Description` char(128) NOT NULL DEFAULT '',
  `Sequence` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`UTID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `UserUpdateLogs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `UserUpdateLogs` (
  `UULID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `UserID` int(11) NOT NULL,
  `DateTime` datetime NOT NULL,
  `AuthorID` int(11) NOT NULL,
  `Notes` varchar(255) NOT NULL,
  PRIMARY KEY (`UULID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `UserID` (`UserID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `Users`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Users` (
  `UserID` int(11) NOT NULL AUTO_INCREMENT,
  `PeopleID` int(11) NOT NULL DEFAULT '0',
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `UserTypeID` int(11) DEFAULT NULL,
  `SupportID` bigint(20) NOT NULL,
  `Title` varchar(32) NOT NULL DEFAULT '',
  `Directory` int(11) NOT NULL DEFAULT '1',
  `TitleID` int(11) DEFAULT NULL,
  `PayStatus` int(11) NOT NULL COMMENT '1=salary, 2=hourly',
  `PositionID` int(11) DEFAULT NULL,
  `ManagerID` int(11) DEFAULT NULL,
  `BuildingID` int(11) DEFAULT NULL,
  `LocationID` int(11) DEFAULT NULL,
  `FirstName` varchar(32) NOT NULL,
  `MiddleName` varchar(32) DEFAULT '',
  `LastName` varchar(32) NOT NULL DEFAULT '',
  `Suffix` varchar(5) DEFAULT NULL,
  `NickName` varchar(36) DEFAULT NULL,
  `Address1` varchar(64) DEFAULT '',
  `Address2` varchar(64) DEFAULT '',
  `City` varchar(32) DEFAULT '',
  `State` varchar(32) DEFAULT '',
  `Zip` varchar(10) DEFAULT '',
  `HomeAddress1` varchar(64) DEFAULT '',
  `HomeAddress2` varchar(64) DEFAULT '',
  `HomeCity` varchar(32) DEFAULT '',
  `HomeState` varchar(32) DEFAULT '',
  `HomeZip` varchar(10) DEFAULT '',
  `Spouse` varchar(32) NOT NULL DEFAULT '',
  `Dependants` varchar(255) NOT NULL DEFAULT '',
  `Country` varchar(24) NOT NULL DEFAULT '',
  `HomePhone` varchar(255) NOT NULL DEFAULT '',
  `WorkPhone1` varchar(255) NOT NULL DEFAULT '',
  `WorkExt1` varchar(5) NOT NULL DEFAULT '',
  `WorkPhone2` varchar(255) NOT NULL DEFAULT '',
  `WorkExt2` varchar(5) NOT NULL DEFAULT '',
  `TextPhone` varchar(16) NOT NULL DEFAULT '',
  `CellPhone` varchar(255) NOT NULL DEFAULT '',
  `FaxPhone` varchar(255) NOT NULL DEFAULT '',
  `Pager` varchar(16) NOT NULL DEFAULT '',
  `EMail1` varchar(64) NOT NULL DEFAULT '',
  `EMail1Verified` tinyint(1) NOT NULL,
  `EMail2` varchar(64) NOT NULL DEFAULT '',
  `EMail3` varchar(64) NOT NULL DEFAULT '',
  `EMail4` varchar(64) NOT NULL DEFAULT '',
  `EMail5` varchar(64) NOT NULL DEFAULT '',
  `Updated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Password` varchar(16) NOT NULL DEFAULT '',
  `EPassword` varchar(64) NOT NULL,
  `PWScheme` tinyint(4) NOT NULL DEFAULT '0' COMMENT '0=DES, 1=bcrypt',
  `PWChanged` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `PWAlert` int(11) NOT NULL DEFAULT '0',
  `PWRecoveryTime` datetime DEFAULT NULL,
  `XPassWord` varchar(32) NOT NULL DEFAULT '',
  `UserName` varchar(32) NOT NULL DEFAULT '',
  `LastLogin` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `LastURL` varchar(32) NOT NULL DEFAULT '',
  `Working` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Logout` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `UserLevel` int(11) NOT NULL DEFAULT '0',
  `MiddleInitial` char(1) NOT NULL DEFAULT '',
  `SuperUser` int(11) NOT NULL DEFAULT '0',
  `Current` int(11) NOT NULL DEFAULT '1',
  `Active` tinyint(1) NOT NULL DEFAULT '0',
  `StaffCode` varchar(8) NOT NULL DEFAULT '',
  `Biography` text NOT NULL,
  `Subject` varchar(26) NOT NULL DEFAULT '',
  `PictureFile` varchar(64) NOT NULL DEFAULT '',
  `LoginCount` int(11) NOT NULL DEFAULT '0',
  `EMailLimit` int(11) NOT NULL DEFAULT '10000000',
  `Gender` int(11) NOT NULL,
  `DOB` date DEFAULT '0000-00-00',
  `Height` float NOT NULL DEFAULT '0',
  `Weight` int(11) NOT NULL DEFAULT '0',
  `RaceID` int(11) DEFAULT NULL,
  `ReligionID` int(11) NOT NULL DEFAULT '0',
  `TZ` varchar(5) NOT NULL DEFAULT '',
  `TimeZone` varchar(64) NOT NULL,
  `UserStatus` varchar(16) NOT NULL DEFAULT '',
  `Expression` int(11) NOT NULL DEFAULT '0',
  `Staff` int(11) NOT NULL DEFAULT '0',
  `FamilyID` int(11) NOT NULL DEFAULT '0',
  `StudentID` int(11) NOT NULL DEFAULT '0',
  `EmployeeID` varchar(32) DEFAULT '0',
  `PIN` smallint(4) NOT NULL DEFAULT '1234',
  `StateID` varchar(32) DEFAULT NULL,
  `ContactID` int(11) NOT NULL DEFAULT '0',
  `Level` int(11) NOT NULL DEFAULT '0',
  `ClassColumns` varchar(255) NOT NULL DEFAULT '',
  `Tchnum` int(11) NOT NULL DEFAULT '0',
  `Invisible` int(11) NOT NULL DEFAULT '0',
  `SSN` varchar(4) DEFAULT NULL,
  `LPPID` int(11) DEFAULT NULL,
  `ParentUserID` int(11) NOT NULL,
  `ParentSchoolID` int(11) NOT NULL,
  `ToSDate` date NOT NULL DEFAULT '0000-00-00',
  `online` tinyint(1) NOT NULL DEFAULT '0',
  `service_years` int(11) DEFAULT '0',
  `edfi_state_employment` varchar(255) DEFAULT NULL,
  `google_id` varchar(255) DEFAULT NULL,
  `created_at` datetime(6) DEFAULT NULL,
  `updated_at` datetime(6) DEFAULT NULL,
  PRIMARY KEY (`UserID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `FamilyID` (`FamilyID`),
  KEY `StudentID` (`StudentID`),
  KEY `LastName` (`LastName`),
  KEY `Active` (`Active`),
  KEY `TZ` (`TZ`),
  KEY `Password` (`Password`),
  KEY `UserName` (`UserName`),
  KEY `ManagerID` (`ManagerID`),
  KEY `SupportID` (`SupportID`),
  KEY `EMail1` (`EMail1`),
  KEY `LPPID` (`LPPID`),
  CONSTRAINT `Users_ibfk_1` FOREIGN KEY (`LPPID`) REFERENCES `LunchPricePlans` (`LPPID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `VendorTypes`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `VendorTypes` (
  `VenType` int(11) NOT NULL AUTO_INCREMENT,
  `VenTypeCode` varchar(16) NOT NULL DEFAULT '',
  `Description` varchar(32) NOT NULL DEFAULT '',
  PRIMARY KEY (`VenType`),
  UNIQUE KEY `VenType_2` (`VenType`),
  KEY `VenType` (`VenType`,`VenTypeCode`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `Visitors`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Visitors` (
  `VisitorID` int(11) NOT NULL AUTO_INCREMENT,
  `Date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `LastSite` varchar(64) NOT NULL DEFAULT '',
  `SessionID` varchar(32) NOT NULL DEFAULT '0',
  `IPAddress` varchar(15) NOT NULL DEFAULT '',
  `HostName` varchar(50) NOT NULL DEFAULT '',
  PRIMARY KEY (`VisitorID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `WebhookLogs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `WebhookLogs` (
  `WLID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `WHID` int(11) NOT NULL,
  `RequestHeaders` text NOT NULL,
  `RequestPayload` text NOT NULL,
  `ResponseHeaders` text NOT NULL,
  `ResponseBody` text NOT NULL,
  `Created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`WLID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `WHID` (`WHID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `Webhooks`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Webhooks` (
  `WHID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `UserID` int(11) NOT NULL,
  `FamilyID` int(11) NOT NULL,
  `StudentID` int(11) NOT NULL,
  `Title` varchar(48) NOT NULL,
  `URL` varchar(256) NOT NULL,
  `Event` varchar(36) NOT NULL,
  `Secret` varchar(36) NOT NULL,
  `Logging` tinyint(1) NOT NULL DEFAULT '0',
  `Type` varchar(10) NOT NULL,
  `Enabled` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`WHID`),
  KEY `Event` (`Event`),
  KEY `SchoolID` (`SchoolID`),
  KEY `UserID` (`UserID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `accounting_allocations`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `accounting_allocations` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `increase_id` int(11) DEFAULT NULL,
  `decrease_id` int(11) DEFAULT NULL,
  `amount` decimal(20,2) DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `index_accounting_allocations_on_increase_id_and_decrease_id` (`increase_id`,`decrease_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `accounting_cafeteria_configs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `accounting_cafeteria_configs` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `school_id` int(11) NOT NULL,
  `subcategory_id` bigint(20) NOT NULL,
  `enabled` tinyint(1) NOT NULL DEFAULT '0',
  `start_date` date NOT NULL,
  `created_at` datetime(6) NOT NULL,
  `updated_at` datetime(6) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `index_accounting_cafeteria_configs_on_school_id` (`school_id`),
  KEY `index_accounting_cafeteria_configs_on_subcategory_id` (`subcategory_id`),
  CONSTRAINT `fk_rails_2e85ee2230` FOREIGN KEY (`school_id`) REFERENCES `Schools` (`SchoolID`),
  CONSTRAINT `fk_rails_5d72173d04` FOREIGN KEY (`subcategory_id`) REFERENCES `accounting_subcategories` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `accounting_cafeteria_transactions`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `accounting_cafeteria_transactions` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `transaction_id` bigint(20) NOT NULL,
  `cafeteria_transaction_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `cafeteria_transactions_index` (`transaction_id`,`cafeteria_transaction_id`),
  KEY `fk_rails_5215f8d26d` (`cafeteria_transaction_id`),
  CONSTRAINT `fk_rails_5215f8d26d` FOREIGN KEY (`cafeteria_transaction_id`) REFERENCES `LunchTransactionsStudents` (`LTID`),
  CONSTRAINT `fk_rails_6e7441a516` FOREIGN KEY (`transaction_id`) REFERENCES `accounting_transactions` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `accounting_categories`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `accounting_categories` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `school_id` int(11) NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index_accounting_categories_on_school_id` (`school_id`),
  CONSTRAINT `fk_rails_668d628a02` FOREIGN KEY (`school_id`) REFERENCES `Schools` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `accounting_invoice_charges`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `accounting_invoice_charges` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `invoice_id` bigint(20) NOT NULL,
  `transaction_id` bigint(20) NOT NULL,
  `created_at` datetime(6) NOT NULL,
  `updated_at` datetime(6) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `index_accounting_invoice_charges_on_transaction_id` (`transaction_id`),
  KEY `index_accounting_invoice_charges_on_invoice_id` (`invoice_id`),
  CONSTRAINT `fk_rails_5ccc8a85ae` FOREIGN KEY (`transaction_id`) REFERENCES `accounting_transactions` (`id`),
  CONSTRAINT `fk_rails_faaa929ef8` FOREIGN KEY (`invoice_id`) REFERENCES `accounting_invoices` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `accounting_invoice_configs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `accounting_invoice_configs` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `school_id` int(11) NOT NULL,
  `enabled` tinyint(1) NOT NULL DEFAULT '1',
  `include_allocations` tinyint(1) NOT NULL DEFAULT '0',
  `created_at` datetime(6) NOT NULL,
  `updated_at` datetime(6) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index_accounting_invoice_configs_on_school_id` (`school_id`),
  CONSTRAINT `fk_rails_78c81bf4e8` FOREIGN KEY (`school_id`) REFERENCES `Schools` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `accounting_invoices`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `accounting_invoices` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `school_id` int(11) NOT NULL,
  `family_id` int(11) NOT NULL,
  `status` int(11) NOT NULL DEFAULT '0',
  `tracking_number` int(11) NOT NULL,
  `views` int(11) NOT NULL DEFAULT '0',
  `posted_on` date NOT NULL,
  `due_date` date NOT NULL,
  `paid` tinyint(1) NOT NULL DEFAULT '0',
  `created_at` datetime(6) NOT NULL,
  `updated_at` datetime(6) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `index_accounting_invoices_on_school_id_and_tracking_number` (`school_id`,`tracking_number`),
  KEY `invoice_family_scoped_index` (`school_id`,`family_id`,`status`,`paid`,`due_date`),
  KEY `invoice_school_scoped_index` (`school_id`,`status`,`due_date`),
  KEY `fk_rails_87714daee6` (`family_id`),
  CONSTRAINT `fk_rails_87714daee6` FOREIGN KEY (`family_id`) REFERENCES `Families` (`FamilyID`),
  CONSTRAINT `fk_rails_e86dfb68f2` FOREIGN KEY (`school_id`) REFERENCES `Schools` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `accounting_payment_details`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `accounting_payment_details` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `transaction_id` bigint(20) NOT NULL,
  `payment` int(11) NOT NULL,
  `details` text,
  PRIMARY KEY (`id`),
  KEY `index_accounting_payment_details_on_transaction_id` (`transaction_id`),
  CONSTRAINT `fk_rails_f2adc937ba` FOREIGN KEY (`transaction_id`) REFERENCES `accounting_transactions` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `accounting_predefined_charges`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `accounting_predefined_charges` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `school_id` int(11) NOT NULL,
  `subcategory_id` bigint(20) NOT NULL,
  `name` varchar(16) NOT NULL,
  `memo` varchar(64) NOT NULL,
  `amount` decimal(20,2) NOT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index_accounting_predefined_charges_on_school_id` (`school_id`),
  KEY `index_accounting_predefined_charges_on_subcategory_id` (`subcategory_id`),
  CONSTRAINT `fk_rails_45ad6da4c4` FOREIGN KEY (`school_id`) REFERENCES `Schools` (`SchoolID`),
  CONSTRAINT `fk_rails_ab4444ff01` FOREIGN KEY (`subcategory_id`) REFERENCES `accounting_subcategories` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `accounting_predefined_credits`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `accounting_predefined_credits` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `school_id` int(11) NOT NULL,
  `subcategory_id` bigint(20) NOT NULL,
  `name` varchar(16) NOT NULL,
  `memo` varchar(64) NOT NULL,
  `type` varchar(255) NOT NULL,
  `amount` decimal(20,2) NOT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index_accounting_predefined_credits_on_school_id` (`school_id`),
  KEY `index_accounting_predefined_credits_on_subcategory_id` (`subcategory_id`),
  CONSTRAINT `fk_rails_1b6f1160e3` FOREIGN KEY (`school_id`) REFERENCES `Schools` (`SchoolID`),
  CONSTRAINT `fk_rails_6a9207ebda` FOREIGN KEY (`subcategory_id`) REFERENCES `accounting_subcategories` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `accounting_student_matrices`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `accounting_student_matrices` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `student_id` int(11) NOT NULL,
  `subcategory_id` bigint(20) NOT NULL,
  `primary` decimal(5,2) DEFAULT NULL,
  `viewable` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `index_accounting_student_matrices_on_student_id` (`student_id`),
  KEY `index_accounting_student_matrices_on_subcategory_id` (`subcategory_id`),
  CONSTRAINT `fk_rails_1306d933ed` FOREIGN KEY (`student_id`) REFERENCES `Students` (`StudentID`),
  CONSTRAINT `fk_rails_d162835d46` FOREIGN KEY (`subcategory_id`) REFERENCES `accounting_subcategories` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `accounting_subcategories`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `accounting_subcategories` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `category_id` bigint(20) NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  `viewable` tinyint(1) NOT NULL DEFAULT '1',
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index_accounting_subcategories_on_category_id` (`category_id`),
  CONSTRAINT `fk_rails_aa55efaeaf` FOREIGN KEY (`category_id`) REFERENCES `accounting_categories` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `accounting_subcategory_decreases`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `accounting_subcategory_decreases` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `subcategory_id` bigint(20) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index_accounting_subcategory_decreases_on_subcategory_id` (`subcategory_id`),
  CONSTRAINT `fk_rails_5a77d0d307` FOREIGN KEY (`subcategory_id`) REFERENCES `accounting_subcategories` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `accounting_transaction_details`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `accounting_transaction_details` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `transaction_id` bigint(20) NOT NULL,
  `subcategory_id` bigint(20) NOT NULL,
  `student_id` int(11) DEFAULT NULL,
  `amount` decimal(20,2) DEFAULT NULL,
  `closed` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `index_accounting_transaction_details_on_transaction_id` (`transaction_id`),
  KEY `index_accounting_transaction_details_on_subcategory_id` (`subcategory_id`),
  KEY `index_accounting_transaction_details_on_student_id` (`student_id`),
  CONSTRAINT `fk_rails_02eb3e48b2` FOREIGN KEY (`student_id`) REFERENCES `Students` (`StudentID`),
  CONSTRAINT `fk_rails_0e1a893ed0` FOREIGN KEY (`subcategory_id`) REFERENCES `accounting_subcategories` (`id`),
  CONSTRAINT `fk_rails_53bdb67264` FOREIGN KEY (`transaction_id`) REFERENCES `accounting_transactions` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `accounting_transactions`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `accounting_transactions` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `family_id` int(11) NOT NULL,
  `action` int(11) DEFAULT NULL,
  `posted_on` date DEFAULT NULL,
  `amount` decimal(20,2) DEFAULT NULL,
  `memo` varchar(64) NOT NULL,
  `closed` tinyint(1) NOT NULL DEFAULT '0',
  `type` varchar(255) NOT NULL,
  `void` tinyint(1) NOT NULL DEFAULT '0',
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index_accounting_transactions_on_family_id` (`family_id`),
  KEY `index_accounting_transactions_on_type` (`type`),
  CONSTRAINT `fk_rails_494604f50e` FOREIGN KEY (`family_id`) REFERENCES `Families` (`FamilyID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `active_storage_attachments`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `active_storage_attachments` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `record_type` varchar(255) NOT NULL,
  `record_id` bigint(20) NOT NULL,
  `blob_id` bigint(20) NOT NULL,
  `created_at` datetime NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `index_active_storage_attachments_uniqueness` (`record_type`,`record_id`,`name`,`blob_id`),
  KEY `index_active_storage_attachments_on_blob_id` (`blob_id`),
  CONSTRAINT `fk_rails_c3b3935057` FOREIGN KEY (`blob_id`) REFERENCES `active_storage_blobs` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `active_storage_blobs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `active_storage_blobs` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `key` varchar(255) NOT NULL,
  `filename` varchar(255) NOT NULL,
  `content_type` varchar(255) DEFAULT NULL,
  `metadata` text,
  `byte_size` bigint(20) NOT NULL,
  `checksum` varchar(255) NOT NULL,
  `created_at` datetime NOT NULL,
  `service_name` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `index_active_storage_blobs_on_key` (`key`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `active_storage_variant_records`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `active_storage_variant_records` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `blob_id` bigint(20) NOT NULL,
  `variation_digest` varchar(255) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `index_active_storage_variant_records_uniqueness` (`blob_id`,`variation_digest`),
  CONSTRAINT `fk_rails_993965df05` FOREIGN KEY (`blob_id`) REFERENCES `active_storage_blobs` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `additional_ids`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `additional_ids` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `associated_type` varchar(255) DEFAULT NULL,
  `associated_id` bigint(20) DEFAULT NULL,
  `type` varchar(255) NOT NULL,
  `code` int(11) NOT NULL DEFAULT '0',
  `number` varchar(32) NOT NULL,
  `created_at` datetime(6) NOT NULL,
  `updated_at` datetime(6) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index_additional_ids_on_associated_type_and_associated_id` (`associated_type`,`associated_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `additional_names`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `additional_names` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `associated_type` varchar(255) DEFAULT NULL,
  `associated_id` bigint(20) DEFAULT NULL,
  `type` varchar(255) NOT NULL,
  `code` int(11) NOT NULL DEFAULT '0',
  `first_name` varchar(36) NOT NULL,
  `middle_name` varchar(36) DEFAULT NULL,
  `last_name` varchar(36) DEFAULT NULL,
  `suffix` varchar(10) DEFAULT NULL,
  `created_at` datetime(6) NOT NULL,
  `updated_at` datetime(6) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index_additional_names_on_associated_type_and_associated_id` (`associated_type`,`associated_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `addresses`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `addresses` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `associated_type` varchar(255) DEFAULT NULL,
  `associated_id` bigint(20) DEFAULT NULL,
  `type` varchar(255) NOT NULL,
  `code` int(11) NOT NULL DEFAULT '0',
  `street` varchar(64) DEFAULT NULL,
  `street_ext` varchar(64) DEFAULT NULL,
  `city` varchar(32) DEFAULT NULL,
  `state` varchar(32) DEFAULT NULL,
  `zip` varchar(10) DEFAULT NULL,
  `created_at` datetime(6) NOT NULL,
  `updated_at` datetime(6) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index_addresses_on_associated_type_and_associated_id` (`associated_type`,`associated_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `admin_permissions`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `admin_permissions` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `accounting` int(11) NOT NULL DEFAULT '0',
  `administration` int(11) NOT NULL DEFAULT '0',
  `admissions` int(11) NOT NULL DEFAULT '0',
  `auction` int(11) NOT NULL DEFAULT '0',
  `classroom` int(11) NOT NULL DEFAULT '0',
  `communications` int(11) NOT NULL DEFAULT '0',
  `courses` int(11) NOT NULL DEFAULT '0',
  `discipline` int(11) NOT NULL DEFAULT '0',
  `facility` int(11) NOT NULL DEFAULT '0',
  `human_resources` int(11) NOT NULL DEFAULT '0',
  `library` int(11) NOT NULL DEFAULT '0',
  `nursing` int(11) NOT NULL DEFAULT '0',
  `pt_conference` int(11) NOT NULL DEFAULT '0',
  `service` int(11) NOT NULL DEFAULT '0',
  `state_reporting` int(11) NOT NULL DEFAULT '0',
  `students` int(11) NOT NULL DEFAULT '0',
  `covid` int(11) NOT NULL DEFAULT '0',
  `created_at` datetime(6) NOT NULL,
  `updated_at` datetime(6) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index_admin_permissions_on_user_id` (`user_id`),
  CONSTRAINT `fk_rails_e5af8c4cf9` FOREIGN KEY (`user_id`) REFERENCES `Users` (`UserID`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `admission_additional_fields`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `admission_additional_fields` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `application_id` bigint(20) NOT NULL,
  `student_additional_field_id` int(11) NOT NULL,
  `display` tinyint(1) NOT NULL DEFAULT '0',
  `required` tinyint(1) NOT NULL DEFAULT '0',
  `created_at` datetime(6) DEFAULT NULL,
  `updated_at` datetime(6) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `index_unique_admission_additional_fields` (`application_id`,`student_additional_field_id`),
  KEY `index_admission_additional_fields_on_application_id` (`application_id`),
  KEY `index_admission_additional_fields_on_student_additional_field_id` (`student_additional_field_id`),
  CONSTRAINT `fk_rails_7f8df46f97` FOREIGN KEY (`student_additional_field_id`) REFERENCES `StudentStatistics` (`SSID`),
  CONSTRAINT `fk_rails_a7ebb4e5dc` FOREIGN KEY (`application_id`) REFERENCES `admission_applications` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `admission_additional_values`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `admission_additional_values` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `applicant_id` bigint(20) NOT NULL,
  `student_additional_field_id` int(11) NOT NULL,
  `value` varchar(255) DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `index_unique_admission_additional_values` (`applicant_id`,`student_additional_field_id`),
  KEY `index_admission_additional_values_on_applicant_id` (`applicant_id`),
  KEY `index_admission_additional_values_on_student_additional_field_id` (`student_additional_field_id`),
  CONSTRAINT `fk_rails_667a643c7c` FOREIGN KEY (`applicant_id`) REFERENCES `admission_applicants` (`id`),
  CONSTRAINT `fk_rails_af9c7cd59b` FOREIGN KEY (`student_additional_field_id`) REFERENCES `StudentStatistics` (`SSID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `admission_agreement_versions`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `admission_agreement_versions` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `agreement_id` bigint(20) NOT NULL,
  `body` text,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index_admission_agreement_versions_on_agreement_id` (`agreement_id`),
  CONSTRAINT `fk_rails_2cbabb6c8d` FOREIGN KEY (`agreement_id`) REFERENCES `admission_agreements` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `admission_agreements`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `admission_agreements` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `school_id` int(11) NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  `body` text,
  `archived` tinyint(1) NOT NULL DEFAULT '0',
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index_admission_agreements_on_school_id` (`school_id`),
  CONSTRAINT `fk_rails_e6cf82787d` FOREIGN KEY (`school_id`) REFERENCES `Schools` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `admission_applicant_agreements`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `admission_applicant_agreements` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `applicant_id` bigint(20) NOT NULL,
  `agreement_id` bigint(20) NOT NULL,
  `response` tinyint(1) DEFAULT NULL,
  `created_at` datetime(6) DEFAULT NULL,
  `updated_at` datetime(6) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `index_unique_admission_applicant_agreements` (`applicant_id`,`agreement_id`),
  KEY `index_admission_applicant_agreements_on_applicant_id` (`applicant_id`),
  KEY `index_admission_applicant_agreements_on_agreement_id` (`agreement_id`),
  CONSTRAINT `fk_rails_222c95f4b9` FOREIGN KEY (`applicant_id`) REFERENCES `admission_applicants` (`id`),
  CONSTRAINT `fk_rails_ab34604e32` FOREIGN KEY (`agreement_id`) REFERENCES `admission_agreements` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `admission_applicant_checkboxes`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `admission_applicant_checkboxes` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `applicant_id` bigint(20) NOT NULL,
  `checkbox_id` bigint(20) NOT NULL,
  `user_id` int(11) DEFAULT NULL,
  `checked` tinyint(1) NOT NULL DEFAULT '0',
  `feedback` text,
  `checked_at` date DEFAULT NULL,
  `created_at` datetime(6) DEFAULT NULL,
  `updated_at` datetime(6) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `index_unique_admission_applicant_checkboxes` (`applicant_id`,`checkbox_id`),
  KEY `index_admission_applicant_checkboxes_on_applicant_id` (`applicant_id`),
  KEY `index_admission_applicant_checkboxes_on_checkbox_id` (`checkbox_id`),
  KEY `index_admission_applicant_checkboxes_on_user_id` (`user_id`),
  CONSTRAINT `fk_rails_3de93a72b5` FOREIGN KEY (`checkbox_id`) REFERENCES `admission_checkboxes` (`id`),
  CONSTRAINT `fk_rails_83afd0a77c` FOREIGN KEY (`user_id`) REFERENCES `Users` (`UserID`) ON DELETE SET NULL,
  CONSTRAINT `fk_rails_e342c164be` FOREIGN KEY (`applicant_id`) REFERENCES `admission_applicants` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `admission_applicant_documents`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `admission_applicant_documents` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `applicant_id` bigint(20) NOT NULL,
  `document_id` bigint(20) NOT NULL,
  `filename` varchar(255) DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `index_unique_admission_applicant_documents` (`applicant_id`,`document_id`),
  KEY `index_admission_applicant_documents_on_applicant_id` (`applicant_id`),
  KEY `index_admission_applicant_documents_on_document_id` (`document_id`),
  CONSTRAINT `fk_rails_2d44b3f4bc` FOREIGN KEY (`document_id`) REFERENCES `admission_documents` (`id`),
  CONSTRAINT `fk_rails_5a0da09d81` FOREIGN KEY (`applicant_id`) REFERENCES `admission_applicants` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `admission_applicant_essays`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `admission_applicant_essays` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `applicant_id` bigint(20) NOT NULL,
  `essay_id` bigint(20) NOT NULL,
  `body` text,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `index_unique_admission_applicant_essays` (`applicant_id`,`essay_id`),
  KEY `index_admission_applicant_essays_on_applicant_id` (`applicant_id`),
  KEY `index_admission_applicant_essays_on_essay_id` (`essay_id`),
  CONSTRAINT `fk_rails_5c680315db` FOREIGN KEY (`essay_id`) REFERENCES `admission_essays` (`id`),
  CONSTRAINT `fk_rails_cbe9268650` FOREIGN KEY (`applicant_id`) REFERENCES `admission_applicants` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `admission_applicant_medicals`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `admission_applicant_medicals` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `applicant_id` bigint(20) NOT NULL,
  `allergies` text,
  `alerts` text,
  `comments` text,
  `medication` varchar(64) DEFAULT NULL,
  `healthy` tinyint(1) NOT NULL DEFAULT '0',
  `asthma` tinyint(1) NOT NULL DEFAULT '0',
  `diabetes` tinyint(1) NOT NULL DEFAULT '0',
  `seizures` tinyint(1) NOT NULL DEFAULT '0',
  `deafness` tinyint(1) NOT NULL DEFAULT '0',
  `add` tinyint(1) NOT NULL DEFAULT '0',
  `bladder` tinyint(1) NOT NULL DEFAULT '0',
  `hemophiliac` tinyint(1) NOT NULL DEFAULT '0',
  `sicklecell` tinyint(1) NOT NULL DEFAULT '0',
  `sight_impairment` tinyint(1) NOT NULL DEFAULT '0',
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `index_unique_admission_applicant_medicals` (`applicant_id`),
  KEY `index_admission_applicant_medicals_on_applicant_id` (`applicant_id`),
  CONSTRAINT `fk_rails_50f29d45b8` FOREIGN KEY (`applicant_id`) REFERENCES `admission_applicants` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `admission_applicant_races`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `admission_applicant_races` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `applicant_id` bigint(20) NOT NULL,
  `race_id` int(11) NOT NULL,
  `created_at` datetime(6) DEFAULT NULL,
  `updated_at` datetime(6) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `index_unique_admission_applicant_races` (`applicant_id`,`race_id`),
  KEY `index_admission_applicant_races_on_applicant_id` (`applicant_id`),
  KEY `index_admission_applicant_races_on_race_id` (`race_id`),
  CONSTRAINT `fk_rails_89cc95c3ef` FOREIGN KEY (`applicant_id`) REFERENCES `admission_applicants` (`id`),
  CONSTRAINT `fk_rails_be47c57793` FOREIGN KEY (`race_id`) REFERENCES `StudentRaces` (`SRID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `admission_applicants`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `admission_applicants` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `application_id` bigint(20) NOT NULL,
  `family_id` int(11) NOT NULL,
  `student_id` int(11) DEFAULT NULL,
  `first_name` varchar(36) NOT NULL,
  `middle_name` varchar(24) DEFAULT NULL,
  `last_name` varchar(36) NOT NULL,
  `suffix` varchar(8) DEFAULT NULL,
  `date_of_birth` date DEFAULT NULL,
  `grade` int(11) NOT NULL,
  `nickname` varchar(255) DEFAULT NULL,
  `gender` varchar(255) DEFAULT NULL,
  `ethnicity` int(11) NOT NULL DEFAULT '0',
  `email` varchar(128) DEFAULT NULL,
  `cell_phone` varchar(16) DEFAULT NULL,
  `work_phone` varchar(16) DEFAULT NULL,
  `returning` tinyint(1) NOT NULL DEFAULT '0',
  `state` int(11) NOT NULL DEFAULT '0',
  `review` tinyint(1) NOT NULL DEFAULT '0',
  `notes` text,
  `submitted_at` datetime DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  `status_id` bigint(20) DEFAULT NULL,
  `payment_amount` decimal(20,2) DEFAULT NULL,
  `paid_at` date DEFAULT NULL,
  `payment_status` int(11) DEFAULT NULL,
  `payment_description` varchar(64) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `index_unique_admission_applicants` (`application_id`,`family_id`,`student_id`),
  KEY `index_admission_applicants_on_application_id` (`application_id`),
  KEY `index_admission_applicants_on_family_id` (`family_id`),
  KEY `index_admission_applicants_on_student_id` (`student_id`),
  KEY `index_admission_applicants_on_status_id` (`status_id`),
  CONSTRAINT `fk_rails_2d29ad1573` FOREIGN KEY (`family_id`) REFERENCES `Families` (`FamilyID`),
  CONSTRAINT `fk_rails_484850a0c8` FOREIGN KEY (`application_id`) REFERENCES `admission_applications` (`id`),
  CONSTRAINT `fk_rails_6a5003d576` FOREIGN KEY (`status_id`) REFERENCES `admission_statuses` (`id`),
  CONSTRAINT `fk_rails_6ecea045fb` FOREIGN KEY (`student_id`) REFERENCES `Students` (`StudentID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `admission_application_agreements`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `admission_application_agreements` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `application_id` bigint(20) NOT NULL,
  `agreement_id` bigint(20) NOT NULL,
  `required` tinyint(1) NOT NULL DEFAULT '0',
  `position` int(11) DEFAULT NULL,
  `created_at` datetime(6) DEFAULT NULL,
  `updated_at` datetime(6) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `index_unique_admission_application_agreements` (`application_id`,`agreement_id`),
  KEY `index_admission_application_agreements_on_application_id` (`application_id`),
  KEY `index_admission_application_agreements_on_agreement_id` (`agreement_id`),
  CONSTRAINT `fk_rails_3b8045da7b` FOREIGN KEY (`application_id`) REFERENCES `admission_applications` (`id`),
  CONSTRAINT `fk_rails_becc9df04a` FOREIGN KEY (`agreement_id`) REFERENCES `admission_agreements` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `admission_application_attachments`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `admission_application_attachments` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `application_id` bigint(20) NOT NULL,
  `attachment_id` bigint(20) NOT NULL,
  `position` int(11) DEFAULT NULL,
  `created_at` datetime(6) DEFAULT NULL,
  `updated_at` datetime(6) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `index_unique_admission_application_attachments` (`application_id`,`attachment_id`),
  KEY `index_admission_application_attachments_on_application_id` (`application_id`),
  KEY `index_admission_application_attachments_on_attachment_id` (`attachment_id`),
  CONSTRAINT `fk_rails_26c1386137` FOREIGN KEY (`application_id`) REFERENCES `admission_applications` (`id`),
  CONSTRAINT `fk_rails_7a462e3581` FOREIGN KEY (`attachment_id`) REFERENCES `admission_attachments` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `admission_application_checkboxes`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `admission_application_checkboxes` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `application_id` bigint(20) NOT NULL,
  `checkbox_id` bigint(20) NOT NULL,
  `internal` tinyint(1) NOT NULL DEFAULT '0',
  `position` int(11) DEFAULT NULL,
  `created_at` datetime(6) DEFAULT NULL,
  `updated_at` datetime(6) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `index_unique_admission_application_checkboxes` (`application_id`,`checkbox_id`),
  KEY `index_admission_application_checkboxes_on_application_id` (`application_id`),
  KEY `index_admission_application_checkboxes_on_checkbox_id` (`checkbox_id`),
  CONSTRAINT `fk_rails_5df2ba6553` FOREIGN KEY (`application_id`) REFERENCES `admission_applications` (`id`),
  CONSTRAINT `fk_rails_cc2a4ca1e7` FOREIGN KEY (`checkbox_id`) REFERENCES `admission_checkboxes` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `admission_application_documents`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `admission_application_documents` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `application_id` bigint(20) NOT NULL,
  `document_id` bigint(20) NOT NULL,
  `required` tinyint(1) NOT NULL DEFAULT '0',
  `position` int(11) DEFAULT NULL,
  `created_at` datetime(6) DEFAULT NULL,
  `updated_at` datetime(6) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `index_unique_admission_application_documents` (`application_id`,`document_id`),
  KEY `index_admission_application_documents_on_application_id` (`application_id`),
  KEY `index_admission_application_documents_on_document_id` (`document_id`),
  CONSTRAINT `fk_rails_9c3140de98` FOREIGN KEY (`document_id`) REFERENCES `admission_documents` (`id`),
  CONSTRAINT `fk_rails_c531e4733a` FOREIGN KEY (`application_id`) REFERENCES `admission_applications` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `admission_application_emails`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `admission_application_emails` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `application_id` bigint(20) NOT NULL,
  `email` varchar(255) NOT NULL,
  `created_at` datetime(6) DEFAULT NULL,
  `updated_at` datetime(6) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `index_admission_application_emails_on_application_id` (`application_id`),
  CONSTRAINT `fk_rails_86f665b291` FOREIGN KEY (`application_id`) REFERENCES `admission_applications` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `admission_application_essays`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `admission_application_essays` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `application_id` bigint(20) NOT NULL,
  `essay_id` bigint(20) NOT NULL,
  `required` tinyint(1) NOT NULL DEFAULT '0',
  `position` int(11) DEFAULT NULL,
  `created_at` datetime(6) DEFAULT NULL,
  `updated_at` datetime(6) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `index_unique_admission_application_essays` (`application_id`,`essay_id`),
  KEY `index_admission_application_essays_on_application_id` (`application_id`),
  KEY `index_admission_application_essays_on_essay_id` (`essay_id`),
  CONSTRAINT `fk_rails_18075ba59a` FOREIGN KEY (`essay_id`) REFERENCES `admission_essays` (`id`),
  CONSTRAINT `fk_rails_9378b9971b` FOREIGN KEY (`application_id`) REFERENCES `admission_applications` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `admission_application_grades`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `admission_application_grades` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `application_id` bigint(20) NOT NULL,
  `grade` int(11) NOT NULL,
  `available` tinyint(1) NOT NULL DEFAULT '0',
  `created_at` datetime(6) DEFAULT NULL,
  `updated_at` datetime(6) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `index_unique_admission_application_grades` (`application_id`,`grade`),
  KEY `index_admission_application_grades_on_application_id` (`application_id`),
  CONSTRAINT `fk_rails_6757aad271` FOREIGN KEY (`application_id`) REFERENCES `admission_applications` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `admission_applications`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `admission_applications` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `school_id` int(11) NOT NULL,
  `school_year_id` int(11) NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  `enrollment` tinyint(1) NOT NULL DEFAULT '0',
  `open` tinyint(1) NOT NULL DEFAULT '0',
  `new_students` tinyint(1) NOT NULL DEFAULT '0',
  `returning_students` tinyint(1) NOT NULL DEFAULT '0',
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  `welcome_message` text,
  `completion_message` text,
  `require_medical` tinyint(1) NOT NULL DEFAULT '0',
  `payment` tinyint(1) NOT NULL DEFAULT '0',
  `payment_description` varchar(64) DEFAULT NULL,
  `payment_amount` decimal(20,2) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `index_admission_applications_on_school_id` (`school_id`),
  KEY `index_admission_applications_on_school_year_id` (`school_year_id`),
  CONSTRAINT `fk_rails_2a40973a23` FOREIGN KEY (`school_id`) REFERENCES `Schools` (`SchoolID`),
  CONSTRAINT `fk_rails_692a52f0bf` FOREIGN KEY (`school_year_id`) REFERENCES `SchoolYears` (`SchoolYearID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `admission_attachments`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `admission_attachments` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `school_id` int(11) NOT NULL,
  `filename` varchar(255) DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `description` varchar(255) DEFAULT NULL,
  `archived` tinyint(1) NOT NULL DEFAULT '0',
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`id`),
  KEY `fk_rails_71a870b58f` (`school_id`),
  CONSTRAINT `fk_rails_71a870b58f` FOREIGN KEY (`school_id`) REFERENCES `Schools` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `admission_checkboxes`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `admission_checkboxes` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `school_id` int(11) NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  `description` varchar(255) DEFAULT NULL,
  `archived` tinyint(1) NOT NULL DEFAULT '0',
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index_admission_checkboxes_on_school_id` (`school_id`),
  CONSTRAINT `fk_rails_af273e4d61` FOREIGN KEY (`school_id`) REFERENCES `Schools` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `admission_configs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `admission_configs` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `school_id` int(11) NOT NULL,
  `school_year_id` int(11) DEFAULT NULL,
  `welcome_message` text,
  `registration` tinyint(1) NOT NULL DEFAULT '0',
  `portal` tinyint(1) NOT NULL DEFAULT '0',
  `payment` tinyint(1) NOT NULL DEFAULT '0',
  `online_payment` tinyint(1) NOT NULL DEFAULT '0',
  `in_person_payment` tinyint(1) NOT NULL DEFAULT '0',
  `family_payment` tinyint(1) NOT NULL DEFAULT '0',
  `payment_description` varchar(64) DEFAULT NULL,
  `payment_amount` decimal(20,2) DEFAULT NULL,
  `applicant_payment` tinyint(1) NOT NULL DEFAULT '0',
  `created_at` datetime(6) DEFAULT NULL,
  `updated_at` datetime(6) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `index_admission_configs_on_school_id` (`school_id`),
  KEY `index_admission_configs_on_school_year_id` (`school_year_id`),
  CONSTRAINT `fk_rails_0205643132` FOREIGN KEY (`school_year_id`) REFERENCES `SchoolYears` (`SchoolYearID`),
  CONSTRAINT `fk_rails_9234b9e78d` FOREIGN KEY (`school_id`) REFERENCES `Schools` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `admission_contact_revision_fields`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `admission_contact_revision_fields` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `school_id` int(11) NOT NULL,
  `field` int(11) NOT NULL,
  `display` tinyint(1) NOT NULL DEFAULT '0',
  `required` tinyint(1) NOT NULL DEFAULT '0',
  `created_at` datetime(6) DEFAULT NULL,
  `updated_at` datetime(6) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `index_admission_contact_revision_fields_on_school_id` (`school_id`),
  CONSTRAINT `fk_rails_73c2f8b546` FOREIGN KEY (`school_id`) REFERENCES `Schools` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `admission_contact_revisions`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `admission_contact_revisions` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `school_year_id` int(11) NOT NULL,
  `family_id` int(11) NOT NULL,
  `contact_family_id` int(11) DEFAULT NULL,
  `title_id` int(11) DEFAULT NULL,
  `relationship_id` int(11) DEFAULT NULL,
  `first_name` varchar(24) NOT NULL DEFAULT '',
  `last_name` varchar(32) NOT NULL DEFAULT '',
  `address` varchar(64) NOT NULL DEFAULT '',
  `address_ext` varchar(64) NOT NULL DEFAULT '',
  `city` varchar(32) NOT NULL DEFAULT '',
  `state` varchar(32) NOT NULL DEFAULT '',
  `zip` varchar(10) NOT NULL DEFAULT '',
  `country_id` bigint(20) DEFAULT NULL,
  `work_phone` varchar(24) NOT NULL DEFAULT '',
  `home_phone` varchar(24) NOT NULL DEFAULT '',
  `cell_phone` varchar(24) NOT NULL DEFAULT '',
  `email` varchar(128) NOT NULL DEFAULT '',
  `primary` tinyint(1) NOT NULL DEFAULT '0',
  `emergency` tinyint(1) NOT NULL DEFAULT '0',
  `pickup` tinyint(1) NOT NULL DEFAULT '0',
  `applied` tinyint(1) NOT NULL DEFAULT '0',
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `index_unique_admission_contact_revisions` (`school_year_id`,`family_id`,`contact_family_id`),
  KEY `index_admission_contact_revisions_on_school_year_id` (`school_year_id`),
  KEY `index_admission_contact_revisions_on_family_id` (`family_id`),
  KEY `index_admission_contact_revisions_on_contact_family_id` (`contact_family_id`),
  KEY `index_admission_contact_revisions_on_title_id` (`title_id`),
  KEY `index_admission_contact_revisions_on_relationship_id` (`relationship_id`),
  KEY `index_admission_contact_revisions_on_country_id` (`country_id`),
  CONSTRAINT `fk_rails_0a3e5a3a15` FOREIGN KEY (`title_id`) REFERENCES `Titles` (`TitleID`),
  CONSTRAINT `fk_rails_1a67874053` FOREIGN KEY (`contact_family_id`) REFERENCES `FamilyParents` (`FamilyParentID`),
  CONSTRAINT `fk_rails_1ba7455650` FOREIGN KEY (`country_id`) REFERENCES `iso_countries` (`id`),
  CONSTRAINT `fk_rails_599f5a4ac7` FOREIGN KEY (`school_year_id`) REFERENCES `SchoolYears` (`SchoolYearID`),
  CONSTRAINT `fk_rails_695338c125` FOREIGN KEY (`family_id`) REFERENCES `Families` (`FamilyID`) ON DELETE CASCADE,
  CONSTRAINT `fk_rails_696bb3f6ab` FOREIGN KEY (`relationship_id`) REFERENCES `Relationships` (`RelationshipID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `admission_documents`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `admission_documents` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `school_id` int(11) NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  `display_name` varchar(255) DEFAULT NULL,
  `description` varchar(255) DEFAULT NULL,
  `archived` tinyint(1) NOT NULL DEFAULT '0',
  `profile` tinyint(1) DEFAULT '0',
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index_admission_documents_on_school_id` (`school_id`),
  CONSTRAINT `fk_rails_674978eb6e` FOREIGN KEY (`school_id`) REFERENCES `Schools` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `admission_essay_versions`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `admission_essay_versions` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `essay_id` bigint(20) NOT NULL,
  `body` text,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index_admission_essay_versions_on_essay_id` (`essay_id`),
  CONSTRAINT `fk_rails_85074d154c` FOREIGN KEY (`essay_id`) REFERENCES `admission_essays` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `admission_essays`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `admission_essays` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `school_id` int(11) NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  `body` text,
  `archived` tinyint(1) NOT NULL DEFAULT '0',
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index_admission_essays_on_school_id` (`school_id`),
  CONSTRAINT `fk_rails_c92f25ac7b` FOREIGN KEY (`school_id`) REFERENCES `Schools` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `admission_families`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `admission_families` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `family_id` int(11) NOT NULL,
  `school_year_id` int(11) NOT NULL,
  `payment_amount` decimal(20,2) DEFAULT NULL,
  `paid_at` date DEFAULT NULL,
  `payment_status` int(11) DEFAULT NULL,
  `payment_description` varchar(64) DEFAULT NULL,
  `created_at` datetime(6) DEFAULT NULL,
  `updated_at` datetime(6) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `index_admission_families_on_family_id_and_school_year_id` (`family_id`,`school_year_id`),
  KEY `index_admission_families_on_family_id` (`family_id`),
  KEY `index_admission_families_on_school_year_id` (`school_year_id`),
  CONSTRAINT `fk_rails_19f3c50c20` FOREIGN KEY (`school_year_id`) REFERENCES `SchoolYears` (`SchoolYearID`),
  CONSTRAINT `fk_rails_84d86c8217` FOREIGN KEY (`family_id`) REFERENCES `Families` (`FamilyID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `admission_family_additional_fields`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `admission_family_additional_fields` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `school_id` int(11) NOT NULL,
  `family_additional_field_id` int(11) NOT NULL,
  `display` tinyint(1) NOT NULL DEFAULT '0',
  `required` tinyint(1) NOT NULL DEFAULT '0',
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index_admission_family_additional_fields_on_school_id` (`school_id`),
  KEY `index_admission_family_additional_fields_on_additional_field_id` (`family_additional_field_id`),
  CONSTRAINT `fk_rails_53d29cca2c` FOREIGN KEY (`family_additional_field_id`) REFERENCES `FamilyStatistics` (`FSID`) ON DELETE CASCADE,
  CONSTRAINT `fk_rails_be2364d847` FOREIGN KEY (`school_id`) REFERENCES `Schools` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `admission_family_additional_values`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `admission_family_additional_values` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `family_id` int(11) NOT NULL,
  `family_additional_field_id` int(11) NOT NULL,
  `school_year_id` int(11) NOT NULL,
  `value` varchar(255) DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index_admission_family_additional_values_on_family_id` (`family_id`),
  KEY `index_admission_family_additional_values_on_additional_field_id` (`family_additional_field_id`),
  KEY `index_admission_family_additional_values_on_school_year_id` (`school_year_id`),
  CONSTRAINT `fk_rails_4242c0f3a1` FOREIGN KEY (`school_year_id`) REFERENCES `SchoolYears` (`SchoolYearID`),
  CONSTRAINT `fk_rails_ca487aa945` FOREIGN KEY (`family_additional_field_id`) REFERENCES `FamilyStatistics` (`FSID`),
  CONSTRAINT `fk_rails_d6c7f1d51b` FOREIGN KEY (`family_id`) REFERENCES `Families` (`FamilyID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `admission_family_revision_fields`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `admission_family_revision_fields` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `school_id` int(11) NOT NULL,
  `field` int(11) NOT NULL,
  `display` tinyint(1) NOT NULL DEFAULT '0',
  `required` tinyint(1) NOT NULL DEFAULT '0',
  `created_at` datetime(6) DEFAULT NULL,
  `updated_at` datetime(6) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `index_admission_family_revision_fields_on_school_id` (`school_id`),
  CONSTRAINT `fk_rails_13f8593dd0` FOREIGN KEY (`school_id`) REFERENCES `Schools` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `admission_family_revisions`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `admission_family_revisions` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `school_year_id` int(11) NOT NULL,
  `family_id` int(11) NOT NULL,
  `address` varchar(64) NOT NULL DEFAULT '',
  `address_ext` varchar(64) NOT NULL DEFAULT '',
  `city` varchar(32) NOT NULL DEFAULT '',
  `county` varchar(255) DEFAULT NULL,
  `state` varchar(32) NOT NULL DEFAULT '',
  `zip` varchar(10) NOT NULL DEFAULT '',
  `country_id` bigint(20) DEFAULT NULL,
  `address_2` varchar(64) NOT NULL DEFAULT '',
  `address_ext_2` varchar(64) NOT NULL DEFAULT '',
  `city_2` varchar(32) NOT NULL DEFAULT '',
  `state_2` varchar(32) NOT NULL DEFAULT '',
  `zip_2` varchar(10) NOT NULL DEFAULT '',
  `country_2_id` bigint(20) DEFAULT NULL,
  `directory` tinyint(1) NOT NULL DEFAULT '0',
  `directory_address` tinyint(1) NOT NULL DEFAULT '0',
  `directory_phone` tinyint(1) NOT NULL DEFAULT '0',
  `directory_email` tinyint(1) NOT NULL DEFAULT '0',
  `directory_cell` tinyint(1) NOT NULL DEFAULT '0',
  `applied` tinyint(1) NOT NULL DEFAULT '0',
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index_admission_family_revisions_on_school_year_id` (`school_year_id`),
  KEY `index_admission_family_revisions_on_family_id` (`family_id`),
  KEY `index_admission_family_revisions_on_country_id` (`country_id`),
  KEY `index_admission_family_revisions_on_country_2_id` (`country_2_id`),
  CONSTRAINT `fk_rails_37ad98a2a7` FOREIGN KEY (`country_id`) REFERENCES `iso_countries` (`id`),
  CONSTRAINT `fk_rails_6f1d8419fc` FOREIGN KEY (`school_year_id`) REFERENCES `SchoolYears` (`SchoolYearID`),
  CONSTRAINT `fk_rails_9eac8937c1` FOREIGN KEY (`family_id`) REFERENCES `Families` (`FamilyID`),
  CONSTRAINT `fk_rails_d3ee87bb78` FOREIGN KEY (`country_2_id`) REFERENCES `iso_countries` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `admission_medical_revision_fields`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `admission_medical_revision_fields` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `school_id` int(11) NOT NULL,
  `field` int(11) NOT NULL,
  `display` tinyint(1) NOT NULL DEFAULT '0',
  `required` tinyint(1) NOT NULL DEFAULT '0',
  `created_at` datetime(6) DEFAULT NULL,
  `updated_at` datetime(6) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `index_admission_medical_revision_fields_on_school_id` (`school_id`),
  CONSTRAINT `fk_rails_f6483b561c` FOREIGN KEY (`school_id`) REFERENCES `Schools` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `admission_medical_revisions`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `admission_medical_revisions` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `school_year_id` int(11) NOT NULL,
  `family_id` int(11) NOT NULL,
  `physician` varchar(64) NOT NULL DEFAULT '',
  `physician_phone` varchar(16) NOT NULL DEFAULT '',
  `physician_address` varchar(128) NOT NULL DEFAULT '',
  `physician_address_ext` varchar(128) NOT NULL DEFAULT '',
  `physician_city` varchar(32) NOT NULL DEFAULT '',
  `physician_state` varchar(32) NOT NULL DEFAULT '',
  `physician_zip` varchar(10) NOT NULL DEFAULT '',
  `physician_country_id` bigint(20) DEFAULT NULL,
  `dentist` varchar(64) NOT NULL DEFAULT '',
  `dentist_phone` varchar(16) NOT NULL DEFAULT '',
  `dentist_address` varchar(128) NOT NULL DEFAULT '',
  `dentist_address_ext` varchar(128) NOT NULL DEFAULT '',
  `dentist_city` varchar(32) NOT NULL DEFAULT '',
  `dentist_state` varchar(32) NOT NULL DEFAULT '',
  `dentist_zip` varchar(10) NOT NULL DEFAULT '',
  `dentist_country_id` bigint(20) DEFAULT NULL,
  `insurance_company` varchar(32) NOT NULL DEFAULT '',
  `insurance_plan` varchar(128) NOT NULL DEFAULT '',
  `insurance_group` varchar(24) NOT NULL DEFAULT '',
  `hospital` varchar(64) NOT NULL DEFAULT '',
  `comments` text,
  `applied` tinyint(1) NOT NULL DEFAULT '0',
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index_admission_medical_revisions_on_school_year_id` (`school_year_id`),
  KEY `index_admission_medical_revisions_on_family_id` (`family_id`),
  KEY `index_admission_medical_revisions_on_physician_country_id` (`physician_country_id`),
  KEY `index_admission_medical_revisions_on_dentist_country_id` (`dentist_country_id`),
  CONSTRAINT `fk_rails_12ff6c8658` FOREIGN KEY (`dentist_country_id`) REFERENCES `iso_countries` (`id`),
  CONSTRAINT `fk_rails_74c7c57625` FOREIGN KEY (`family_id`) REFERENCES `Families` (`FamilyID`),
  CONSTRAINT `fk_rails_8399d59351` FOREIGN KEY (`physician_country_id`) REFERENCES `iso_countries` (`id`),
  CONSTRAINT `fk_rails_fbb70cfe8a` FOREIGN KEY (`school_year_id`) REFERENCES `SchoolYears` (`SchoolYearID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `admission_profile_fields`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `admission_profile_fields` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `application_id` bigint(20) NOT NULL,
  `field` int(11) NOT NULL,
  `display` tinyint(1) NOT NULL DEFAULT '0',
  `required` tinyint(1) NOT NULL DEFAULT '0',
  `created_at` datetime(6) DEFAULT NULL,
  `updated_at` datetime(6) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `index_unique_admission_profile_fields` (`application_id`,`field`),
  KEY `index_admission_profile_fields_on_application_id` (`application_id`),
  CONSTRAINT `fk_rails_b9bb440bdf` FOREIGN KEY (`application_id`) REFERENCES `admission_applications` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `admission_registration_fields`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `admission_registration_fields` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `school_id` int(11) NOT NULL,
  `field` int(11) NOT NULL,
  `display` tinyint(1) NOT NULL DEFAULT '0',
  `required` tinyint(1) NOT NULL DEFAULT '0',
  `created_at` datetime(6) DEFAULT NULL,
  `updated_at` datetime(6) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `index_unique_admission_registration_fields` (`school_id`,`field`),
  KEY `index_admission_registration_fields_on_school_id` (`school_id`),
  CONSTRAINT `fk_rails_afe3dea354` FOREIGN KEY (`school_id`) REFERENCES `Schools` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `admission_registrations`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `admission_registrations` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `school_id` int(11) NOT NULL,
  `first_name` varchar(24) NOT NULL,
  `last_name` varchar(24) NOT NULL,
  `email` varchar(128) NOT NULL,
  `created_at` datetime(6) NOT NULL,
  `updated_at` datetime(6) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index_admission_registrations_on_school_id` (`school_id`),
  CONSTRAINT `fk_rails_18affb07a3` FOREIGN KEY (`school_id`) REFERENCES `Schools` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `admission_statuses`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `admission_statuses` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `school_id` int(11) NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  `state` int(11) DEFAULT NULL,
  `archived` tinyint(1) NOT NULL DEFAULT '0',
  `position` int(11) DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index_admission_statuses_on_school_id` (`school_id`),
  CONSTRAINT `fk_rails_e7a05350a2` FOREIGN KEY (`school_id`) REFERENCES `Schools` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `apple_manager_configs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `apple_manager_configs` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `school_id` int(11) NOT NULL,
  `location_id` int(11) DEFAULT NULL,
  `student_identifier` int(11) NOT NULL DEFAULT '0',
  `staff_identifier` int(11) NOT NULL DEFAULT '0',
  `created_at` datetime(6) NOT NULL,
  `updated_at` datetime(6) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index_apple_manager_configs_on_school_id` (`school_id`),
  KEY `index_apple_manager_configs_on_location_id` (`location_id`),
  CONSTRAINT `fk_rails_baaaa1e1ef` FOREIGN KEY (`school_id`) REFERENCES `Schools` (`SchoolID`),
  CONSTRAINT `fk_rails_fa6b4287db` FOREIGN KEY (`location_id`) REFERENCES `FacilityLocations` (`LocationID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `ar_internal_metadata`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ar_internal_metadata` (
  `key` varchar(255) NOT NULL,
  `value` varchar(255) DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`key`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `attached_tags`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `attached_tags` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `tag_id` bigint(20) NOT NULL,
  `associated_id` int(11) NOT NULL,
  `associated_type` varchar(255) NOT NULL,
  `created_at` datetime(6) NOT NULL,
  `updated_at` datetime(6) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `unique_index_attached_tags` (`tag_id`,`associated_id`,`associated_type`),
  CONSTRAINT `fk_rails_e5f7d9b842` FOREIGN KEY (`tag_id`) REFERENCES `tags` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `audits`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `audits` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `auditable_id` int(11) DEFAULT NULL,
  `auditable_type` varchar(255) DEFAULT NULL,
  `associated_id` int(11) DEFAULT NULL,
  `associated_type` varchar(255) DEFAULT NULL,
  `user_id` int(11) DEFAULT NULL,
  `user_type` varchar(255) DEFAULT NULL,
  `username` varchar(255) DEFAULT NULL,
  `action` varchar(255) DEFAULT NULL,
  `audited_changes` mediumtext,
  `version` int(11) DEFAULT '0',
  `comment` varchar(255) DEFAULT NULL,
  `remote_address` varchar(255) DEFAULT NULL,
  `request_uuid` varchar(255) DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `auditable_index` (`auditable_type`,`auditable_id`,`version`),
  KEY `associated_index` (`associated_type`,`associated_id`),
  KEY `user_index` (`user_id`,`user_type`),
  KEY `index_audits_on_request_uuid` (`request_uuid`),
  KEY `index_audits_on_created_at` (`created_at`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `billing_plan_transactions`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `billing_plan_transactions` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `plan_id` bigint(20) NOT NULL,
  `detail_id` bigint(20) NOT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index_billing_plan_transactions_on_plan_id` (`plan_id`),
  KEY `index_billing_plan_transactions_on_detail_id` (`detail_id`),
  CONSTRAINT `fk_rails_1832dc0760` FOREIGN KEY (`detail_id`) REFERENCES `billing_transaction_details` (`id`),
  CONSTRAINT `fk_rails_ed92a061b9` FOREIGN KEY (`plan_id`) REFERENCES `billing_plans` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `billing_plans`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `billing_plans` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `student_id` int(11) NOT NULL,
  `school_year_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index_billing_plans_on_student_id` (`student_id`),
  KEY `index_billing_plans_on_school_year_id` (`school_year_id`),
  CONSTRAINT `fk_rails_208048548d` FOREIGN KEY (`school_year_id`) REFERENCES `SchoolYears` (`SchoolYearID`),
  CONSTRAINT `fk_rails_85cdf57981` FOREIGN KEY (`student_id`) REFERENCES `Students` (`StudentID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `billing_processed_transactions`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `billing_processed_transactions` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `plan_transaction_id` bigint(20) NOT NULL,
  `transaction_day_id` bigint(20) NOT NULL,
  `transaction_id` bigint(20) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `index_processed_transactions_on_transaction_plan_and_day` (`plan_transaction_id`,`transaction_day_id`),
  KEY `index_billing_processed_transactions_on_plan_transaction_id` (`plan_transaction_id`),
  KEY `index_billing_processed_transactions_on_transaction_day_id` (`transaction_day_id`),
  KEY `index_billing_processed_transactions_on_transaction_id` (`transaction_id`),
  CONSTRAINT `fk_rails_2d834112e3` FOREIGN KEY (`transaction_id`) REFERENCES `accounting_transactions` (`id`),
  CONSTRAINT `fk_rails_7e0f98ff3a` FOREIGN KEY (`plan_transaction_id`) REFERENCES `billing_plan_transactions` (`id`),
  CONSTRAINT `fk_rails_cf6c9a156d` FOREIGN KEY (`transaction_day_id`) REFERENCES `billing_transaction_days` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `billing_template_transactions`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `billing_template_transactions` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `template_id` bigint(20) NOT NULL,
  `detail_id` bigint(20) NOT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index_billing_template_transactions_on_template_id` (`template_id`),
  KEY `index_billing_template_transactions_on_detail_id` (`detail_id`),
  CONSTRAINT `fk_rails_d3aca76af8` FOREIGN KEY (`template_id`) REFERENCES `billing_templates` (`id`),
  CONSTRAINT `fk_rails_e77e7c6c29` FOREIGN KEY (`detail_id`) REFERENCES `billing_transaction_details` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `billing_templates`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `billing_templates` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `school_id` int(11) NOT NULL,
  `school_year_id` int(11) DEFAULT NULL,
  `name` varchar(255) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index_billing_templates_on_school_id` (`school_id`),
  KEY `fk_rails_95c6000984` (`school_year_id`),
  KEY `index_billing_templates_on_school_id_and_school_year_id` (`school_id`,`school_year_id`),
  CONSTRAINT `fk_rails_60aeff9646` FOREIGN KEY (`school_id`) REFERENCES `Schools` (`SchoolID`),
  CONSTRAINT `fk_rails_95c6000984` FOREIGN KEY (`school_year_id`) REFERENCES `SchoolYears` (`SchoolYearID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `billing_transaction_days`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `billing_transaction_days` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `detail_id` bigint(20) NOT NULL,
  `date` date NOT NULL,
  `processed` tinyint(1) NOT NULL DEFAULT '0',
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index_billing_transaction_days_on_detail_id` (`detail_id`),
  CONSTRAINT `fk_rails_302e6ebcca` FOREIGN KEY (`detail_id`) REFERENCES `billing_transaction_details` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `billing_transaction_details`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `billing_transaction_details` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `subcategory_id` bigint(20) NOT NULL,
  `amount` decimal(20,2) NOT NULL,
  `memo` varchar(255) NOT NULL,
  `charge` tinyint(1) NOT NULL DEFAULT '1',
  `active` tinyint(1) NOT NULL DEFAULT '1',
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index_billing_transaction_details_on_subcategory_id` (`subcategory_id`),
  CONSTRAINT `fk_rails_8ff5333ae8` FOREIGN KEY (`subcategory_id`) REFERENCES `accounting_subcategories` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `communication_batch_email_recipients`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `communication_batch_email_recipients` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `batch_email_id` bigint(20) NOT NULL,
  `associated_type` varchar(255) DEFAULT NULL,
  `associated_id` bigint(20) DEFAULT NULL,
  `created_at` datetime(6) NOT NULL,
  `updated_at` datetime(6) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index_batch_email_recipients_on_batch_email_id` (`batch_email_id`),
  KEY `index_batch_email_recipients_on_associated_type_and_id` (`associated_type`,`associated_id`),
  CONSTRAINT `fk_rails_c318ea09b8` FOREIGN KEY (`batch_email_id`) REFERENCES `communication_batch_emails` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `communication_batch_emails`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `communication_batch_emails` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `school_id` int(11) NOT NULL,
  `author_id` int(11) NOT NULL,
  `status` int(11) NOT NULL DEFAULT '0',
  `subject` varchar(64) NOT NULL,
  `description` varchar(255) DEFAULT NULL,
  `editor_type` int(11) NOT NULL DEFAULT '0',
  `html` text,
  `design` text,
  `created_at` datetime(6) NOT NULL,
  `updated_at` datetime(6) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index_communication_batch_emails_on_school_id` (`school_id`),
  KEY `index_communication_batch_emails_on_author_id` (`author_id`),
  CONSTRAINT `fk_rails_10e4046c3d` FOREIGN KEY (`school_id`) REFERENCES `Schools` (`SchoolID`),
  CONSTRAINT `fk_rails_c390149e57` FOREIGN KEY (`author_id`) REFERENCES `Users` (`UserID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `communication_recipient_events`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `communication_recipient_events` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `recipient_id` bigint(20) NOT NULL,
  `event` varchar(255) DEFAULT NULL,
  `timestamp` datetime NOT NULL,
  `created_at` datetime(6) NOT NULL,
  `updated_at` datetime(6) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index_communication_recipient_events_on_recipient_id` (`recipient_id`),
  CONSTRAINT `fk_rails_485ec38d3f` FOREIGN KEY (`recipient_id`) REFERENCES `communication_batch_email_recipients` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `communication_smtp_configs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `communication_smtp_configs` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `school_id` int(11) NOT NULL,
  `username` varchar(255) NOT NULL,
  `password` varchar(255) NOT NULL,
  `server_address` varchar(255) NOT NULL,
  `status` tinyint(1) NOT NULL DEFAULT '0',
  `accepted` tinyint(1) NOT NULL DEFAULT '0',
  `service` int(11) NOT NULL,
  `port` int(11) NOT NULL,
  `security_certificate` int(11) NOT NULL,
  `email` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `index_communication_smtp_configs_on_school_id` (`school_id`),
  CONSTRAINT `fk_rails_d1b6b8705e` FOREIGN KEY (`school_id`) REFERENCES `Schools` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `communication_sparkpost_configs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `communication_sparkpost_configs` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `school_id` int(11) NOT NULL,
  `event` int(11) NOT NULL,
  `domain` varchar(128) NOT NULL,
  `verified` tinyint(1) NOT NULL DEFAULT '0',
  `created_at` datetime(6) NOT NULL,
  `updated_at` datetime(6) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index_communication_sparkpost_configs_on_school_id_and_event` (`school_id`,`event`),
  CONSTRAINT `fk_rails_e4b4c9a7b4` FOREIGN KEY (`school_id`) REFERENCES `Schools` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `connection_logs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `connection_logs` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `school_id` int(11) NOT NULL,
  `associated_type` varchar(255) NOT NULL,
  `associated_id` bigint(20) NOT NULL,
  `area` varchar(64) NOT NULL,
  `service` int(11) NOT NULL,
  `http_method` int(11) NOT NULL,
  `status_code` int(11) NOT NULL,
  `endpoint` varchar(100) NOT NULL,
  `response` text,
  `payload` text,
  `created_at` datetime(6) NOT NULL,
  `updated_at` datetime(6) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index_connection_logs_on_school_id` (`school_id`),
  KEY `index_connection_logs_on_associated_type_and_associated_id` (`associated_type`,`associated_id`),
  CONSTRAINT `fk_rails_fc55814b56` FOREIGN KEY (`school_id`) REFERENCES `Schools` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `contact_messaging`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `contact_messaging` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `school_id` int(11) NOT NULL,
  `contact_id` int(11) NOT NULL,
  `sms_number_type` int(11) NOT NULL DEFAULT '0',
  `voice_number_type` int(11) NOT NULL DEFAULT '0',
  `created_at` datetime(6) NOT NULL,
  `updated_at` datetime(6) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index_contact_messaging_on_school_id` (`school_id`),
  KEY `index_contact_messaging_on_contact_id` (`contact_id`),
  CONSTRAINT `fk_rails_9d8ad8b645` FOREIGN KEY (`school_id`) REFERENCES `Schools` (`SchoolID`) ON DELETE CASCADE,
  CONSTRAINT `fk_rails_dec7201b22` FOREIGN KEY (`contact_id`) REFERENCES `Contact` (`ContactID`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `course_classrooms`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `course_classrooms` (
  `course_id` bigint(20) NOT NULL,
  `classroom_id` int(11) NOT NULL,
  UNIQUE KEY `index_course_classrooms_on_course_id_and_classroom_id` (`course_id`,`classroom_id`),
  KEY `index_course_classrooms_on_course_id` (`course_id`),
  KEY `index_course_classrooms_on_classroom_id` (`classroom_id`),
  CONSTRAINT `fk_rails_64feadff46` FOREIGN KEY (`classroom_id`) REFERENCES `Classes` (`ClassID`),
  CONSTRAINT `fk_rails_e1179cbdd1` FOREIGN KEY (`course_id`) REFERENCES `courses` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `course_grades`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `course_grades` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `course_id` bigint(20) NOT NULL,
  `grade` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `index_course_grades_on_course_id_and_grade` (`course_id`,`grade`),
  KEY `index_course_grades_on_course_id` (`course_id`),
  CONSTRAINT `fk_rails_9e72296fc9` FOREIGN KEY (`course_id`) REFERENCES `courses` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `courses`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `courses` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `school_id` int(11) NOT NULL,
  `department_id` int(11) DEFAULT NULL,
  `name` varchar(56) NOT NULL,
  `code` varchar(32) DEFAULT NULL,
  `core` tinyint(1) NOT NULL,
  `credits` decimal(10,2) DEFAULT NULL,
  `length` int(11) NOT NULL DEFAULT '0',
  `archived` tinyint(1) NOT NULL DEFAULT '0',
  `state_descriptor` varchar(255) DEFAULT NULL,
  `created_at` datetime(6) NOT NULL,
  `updated_at` datetime(6) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index_courses_on_school_id` (`school_id`),
  KEY `index_courses_on_department_id` (`department_id`),
  CONSTRAINT `fk_rails_4e7d7b190d` FOREIGN KEY (`department_id`) REFERENCES `Departments` (`DepartmentID`),
  CONSTRAINT `fk_rails_adf7d91583` FOREIGN KEY (`school_id`) REFERENCES `Schools` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `covid_answer_options`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `covid_answer_options` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `option_id` bigint(20) NOT NULL,
  `answer_id` bigint(20) NOT NULL,
  `created_at` datetime(6) NOT NULL,
  `updated_at` datetime(6) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index_covid_answer_options_on_option_id` (`option_id`),
  KEY `index_covid_answer_options_on_answer_id` (`answer_id`),
  CONSTRAINT `fk_rails_6b4205e1cb` FOREIGN KEY (`option_id`) REFERENCES `covid_form_options` (`id`),
  CONSTRAINT `fk_rails_c2ee572c78` FOREIGN KEY (`answer_id`) REFERENCES `covid_answers` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `covid_answers`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `covid_answers` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `screening_id` bigint(20) NOT NULL,
  `question_id` bigint(20) NOT NULL,
  `value` text,
  `created_at` datetime(6) NOT NULL,
  `updated_at` datetime(6) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `index_covid_answers_on_screening_id_and_question_id` (`screening_id`,`question_id`),
  KEY `index_covid_answers_on_question_id` (`question_id`),
  CONSTRAINT `fk_rails_0e4eb89035` FOREIGN KEY (`screening_id`) REFERENCES `covid_screenings` (`id`),
  CONSTRAINT `fk_rails_1f8209348f` FOREIGN KEY (`question_id`) REFERENCES `covid_form_fields` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `covid_configs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `covid_configs` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `school_id` int(11) NOT NULL,
  `screen` tinyint(1) NOT NULL DEFAULT '0',
  `parent_access` tinyint(1) NOT NULL DEFAULT '0',
  `employee_access` tinyint(1) NOT NULL DEFAULT '0',
  `created_at` datetime(6) NOT NULL,
  `updated_at` datetime(6) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `index_covid_configs_on_school_id` (`school_id`),
  CONSTRAINT `fk_rails_97706a7b97` FOREIGN KEY (`school_id`) REFERENCES `Schools` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `covid_employee_answer_options`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `covid_employee_answer_options` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `option_id` bigint(20) NOT NULL,
  `answer_id` bigint(20) NOT NULL,
  `created_at` datetime(6) NOT NULL,
  `updated_at` datetime(6) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index_covid_employee_answer_options_on_option_id` (`option_id`),
  KEY `index_covid_employee_answer_options_on_answer_id` (`answer_id`),
  CONSTRAINT `fk_rails_4cdfc2b175` FOREIGN KEY (`answer_id`) REFERENCES `covid_employee_answers` (`id`),
  CONSTRAINT `fk_rails_852aadf9a1` FOREIGN KEY (`option_id`) REFERENCES `covid_form_options` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `covid_employee_answers`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `covid_employee_answers` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `screening_id` bigint(20) NOT NULL,
  `question_id` bigint(20) NOT NULL,
  `value` text,
  `created_at` datetime(6) NOT NULL,
  `updated_at` datetime(6) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `index_covid_employee_answers_on_screening_id_and_question_id` (`screening_id`,`question_id`),
  KEY `index_covid_employee_answers_on_question_id` (`question_id`),
  CONSTRAINT `fk_rails_89840fd184` FOREIGN KEY (`question_id`) REFERENCES `covid_form_fields` (`id`),
  CONSTRAINT `fk_rails_e8b377ccef` FOREIGN KEY (`screening_id`) REFERENCES `covid_employee_screenings` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `covid_employee_screenings`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `covid_employee_screenings` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `employee_id` int(11) NOT NULL,
  `date` date NOT NULL,
  `created_at` datetime(6) NOT NULL,
  `updated_at` datetime(6) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `index_covid_employee_screenings_on_employee_id_and_date` (`employee_id`,`date`),
  KEY `index_covid_employee_screenings_on_employee_id` (`employee_id`),
  CONSTRAINT `fk_rails_ed39ca9660` FOREIGN KEY (`employee_id`) REFERENCES `Users` (`UserID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `covid_employee_temperatures`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `covid_employee_temperatures` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `employee_id` int(11) NOT NULL,
  `recorded_at` datetime NOT NULL,
  `recorded_by` varchar(255) NOT NULL,
  `temperature` decimal(4,1) NOT NULL,
  `created_at` datetime(6) NOT NULL,
  `updated_at` datetime(6) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index_covid_employee_temperatures_on_employee_id` (`employee_id`),
  KEY `index_covid_employee_temperatures_on_employee_id_and_recorded_at` (`employee_id`,`recorded_at`),
  CONSTRAINT `fk_rails_4692596dc9` FOREIGN KEY (`employee_id`) REFERENCES `Users` (`UserID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `covid_form_fields`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `covid_form_fields` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `section_id` bigint(20) NOT NULL,
  `type` varchar(255) NOT NULL,
  `field` int(11) NOT NULL,
  `title` varchar(256) NOT NULL,
  `description` text,
  `sequence` int(11) NOT NULL,
  `required` tinyint(1) NOT NULL DEFAULT '0',
  `created_at` datetime(6) NOT NULL,
  `updated_at` datetime(6) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index_covid_form_fields_on_section_id_and_type_and_sequence` (`section_id`,`type`,`sequence`),
  CONSTRAINT `fk_rails_a6e7512b4d` FOREIGN KEY (`section_id`) REFERENCES `covid_form_sections` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `covid_form_options`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `covid_form_options` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `field_id` bigint(20) NOT NULL,
  `value` varchar(128) NOT NULL,
  `sequence` int(11) NOT NULL,
  `created_at` datetime(6) NOT NULL,
  `updated_at` datetime(6) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index_covid_form_options_on_field_id_and_sequence` (`field_id`,`sequence`),
  CONSTRAINT `fk_rails_5ec5639f33` FOREIGN KEY (`field_id`) REFERENCES `covid_form_fields` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `covid_form_sections`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `covid_form_sections` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `school_id` int(11) NOT NULL,
  `title` varchar(128) NOT NULL,
  `description` text,
  `sequence` int(11) NOT NULL,
  `employee_field` tinyint(1) NOT NULL DEFAULT '0',
  `created_at` datetime(6) NOT NULL,
  `updated_at` datetime(6) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index_covid_form_sections_on_school_id_and_sequence` (`school_id`,`sequence`),
  CONSTRAINT `fk_rails_8f0dcbbb0d` FOREIGN KEY (`school_id`) REFERENCES `Schools` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `covid_screenings`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `covid_screenings` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `student_id` int(11) NOT NULL,
  `date` date NOT NULL,
  `created_at` datetime(6) NOT NULL,
  `updated_at` datetime(6) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `index_covid_screenings_on_student_id_and_date` (`student_id`,`date`),
  CONSTRAINT `fk_rails_e711c83955` FOREIGN KEY (`student_id`) REFERENCES `Students` (`StudentID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `covid_temperatures`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `covid_temperatures` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `student_id` int(11) NOT NULL,
  `recorded_at` datetime NOT NULL,
  `recorded_by` varchar(255) NOT NULL,
  `temperature` decimal(4,1) NOT NULL,
  `created_at` datetime(6) NOT NULL,
  `updated_at` datetime(6) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index_covid_temperatures_on_student_id` (`student_id`),
  KEY `index_covid_temperatures_on_student_id_and_recorded_at` (`student_id`,`recorded_at`),
  CONSTRAINT `fk_rails_c8f606401b` FOREIGN KEY (`student_id`) REFERENCES `Students` (`StudentID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `ed_fi_accommodations`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ed_fi_accommodations` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `student_id` int(11) NOT NULL,
  `school_year_id` int(11) NOT NULL,
  `assessment` int(11) NOT NULL DEFAULT '0',
  `accommodation_descriptor` varchar(255) NOT NULL,
  `academic_subject_descriptor` varchar(255) NOT NULL,
  `created_at` datetime(6) NOT NULL,
  `updated_at` datetime(6) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index_ed_fi_accommodations_on_student_id` (`student_id`),
  KEY `index_ed_fi_accommodations_on_school_year_id` (`school_year_id`),
  CONSTRAINT `fk_rails_9eae1d4fc7` FOREIGN KEY (`school_year_id`) REFERENCES `SchoolYears` (`SchoolYearID`),
  CONSTRAINT `fk_rails_cb02b93aca` FOREIGN KEY (`student_id`) REFERENCES `Students` (`StudentID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `ed_fi_digital_equities`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ed_fi_digital_equities` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `student_id` int(11) NOT NULL,
  `internet_access_descriptor` tinyint(1) DEFAULT NULL,
  `barrier_internet_access_descriptor` varchar(255) DEFAULT NULL,
  `internet_access_type_descriptor` varchar(255) DEFAULT NULL,
  `internet_performance_descriptor` varchar(255) DEFAULT NULL,
  `device_away_descriptor` varchar(255) DEFAULT NULL,
  `device_provider_descriptor` varchar(255) DEFAULT NULL,
  `device_access_descriptor` varchar(255) DEFAULT NULL,
  `created_at` datetime(6) NOT NULL,
  `updated_at` datetime(6) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index_ed_fi_digital_equities_on_student_id` (`student_id`),
  CONSTRAINT `fk_rails_1cae5fefe8` FOREIGN KEY (`student_id`) REFERENCES `Students` (`StudentID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `ed_fi_graduation_plans`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ed_fi_graduation_plans` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `student_id` int(11) NOT NULL,
  `plan_descriptor` varchar(255) NOT NULL,
  `plan_descriptor_name` varchar(255) DEFAULT NULL,
  `alternative_plan_descriptor` varchar(255) DEFAULT NULL,
  `alternative_plan_descriptor_name` varchar(255) DEFAULT NULL,
  `start_date` date NOT NULL,
  `end_date` date DEFAULT NULL,
  `created_at` datetime(6) NOT NULL,
  `updated_at` datetime(6) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index_ed_fi_graduation_plans_on_student_id` (`student_id`),
  CONSTRAINT `fk_rails_77abc51cfb` FOREIGN KEY (`student_id`) REFERENCES `Students` (`StudentID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `ed_fi_identities`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ed_fi_identities` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `school_year_id` int(11) NOT NULL,
  `associated_type` varchar(255) DEFAULT NULL,
  `associated_id` bigint(20) DEFAULT NULL,
  `request_id` int(11) NOT NULL,
  `status` int(11) NOT NULL DEFAULT '0',
  `processed_at` date DEFAULT NULL,
  `created_at` datetime(6) NOT NULL,
  `updated_at` datetime(6) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index_ed_fi_identities_on_school_year_id` (`school_year_id`),
  KEY `index_ed_fi_identities_on_associated_type_and_associated_id` (`associated_type`,`associated_id`),
  CONSTRAINT `fk_rails_b30d1a8175` FOREIGN KEY (`school_year_id`) REFERENCES `SchoolYears` (`SchoolYearID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `ed_fi_ids`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ed_fi_ids` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `school_year_id` int(11) DEFAULT NULL,
  `associated_type` varchar(255) NOT NULL,
  `associated_id` bigint(20) NOT NULL,
  `endpoint` varchar(255) NOT NULL,
  `number` varchar(255) NOT NULL,
  `descriptor` int(11) DEFAULT NULL,
  `created_at` datetime(6) NOT NULL,
  `updated_at` datetime(6) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index_ed_fi_ids_on_associated_type_and_associated_id` (`associated_type`,`associated_id`),
  KEY `index_ed_fi_ids_on_school_year_id` (`school_year_id`),
  CONSTRAINT `fk_rails_98f2a0ce3f` FOREIGN KEY (`school_year_id`) REFERENCES `SchoolYears` (`SchoolYearID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `ed_fi_logs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ed_fi_logs` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `school_year_id` int(11) DEFAULT NULL,
  `associated_type` varchar(255) NOT NULL,
  `associated_id` bigint(20) NOT NULL,
  `endpoint` varchar(255) NOT NULL,
  `json` text NOT NULL,
  `response` text NOT NULL,
  `environment` int(11) NOT NULL DEFAULT '0',
  `status_code` int(11) DEFAULT NULL,
  `created_at` datetime(6) NOT NULL,
  `updated_at` datetime(6) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index_ed_fi_logs_on_associated_type_and_associated_id` (`associated_type`,`associated_id`),
  KEY `environment_scoped_index` (`associated_id`,`associated_type`,`environment`),
  KEY `fk_rails_73efb48d16` (`school_year_id`),
  CONSTRAINT `fk_rails_73efb48d16` FOREIGN KEY (`school_year_id`) REFERENCES `SchoolYears` (`SchoolYearID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `ed_fi_state_programs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ed_fi_state_programs` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `student_id` int(11) NOT NULL,
  `school_year_id` int(11) DEFAULT NULL,
  `start_date` date NOT NULL,
  `end_date` date DEFAULT NULL,
  `exit_descriptor` varchar(255) DEFAULT NULL,
  `created_at` datetime(6) NOT NULL,
  `updated_at` datetime(6) NOT NULL,
  `program` int(11) NOT NULL,
  `program_descriptor` varchar(255) NOT NULL,
  `disability_descriptor` varchar(255) DEFAULT NULL,
  `disability_2_descriptor` varchar(255) DEFAULT NULL,
  `service_descriptor` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `index_ed_fi_state_programs_on_student_id` (`student_id`),
  KEY `index_ed_fi_state_programs_on_school_year_id` (`school_year_id`),
  CONSTRAINT `fk_rails_afbec9cf41` FOREIGN KEY (`student_id`) REFERENCES `Students` (`StudentID`),
  CONSTRAINT `fk_rails_d783c67306` FOREIGN KEY (`school_year_id`) REFERENCES `SchoolYears` (`SchoolYearID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `ed_fi_student_contacts`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ed_fi_student_contacts` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `school_id` int(11) NOT NULL,
  `student_id` int(11) NOT NULL,
  `family_parent_id` int(11) NOT NULL,
  `primary_relation` int(11) NOT NULL DEFAULT '0',
  `relation_code` varchar(4) NOT NULL,
  `legal_guardian` int(11) NOT NULL DEFAULT '0',
  `lives_with` int(11) NOT NULL DEFAULT '0',
  `created_at` datetime(6) NOT NULL,
  `updated_at` datetime(6) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `index_ed_fi_student_contacts_on_student_id_and_family_parent_id` (`student_id`,`family_parent_id`),
  KEY `index_ed_fi_student_contacts_on_school_id` (`school_id`),
  KEY `index_ed_fi_student_contacts_on_student_id` (`student_id`),
  KEY `index_ed_fi_student_contacts_on_family_parent_id` (`family_parent_id`),
  CONSTRAINT `fk_rails_2333f6d654` FOREIGN KEY (`school_id`) REFERENCES `Schools` (`SchoolID`) ON DELETE CASCADE,
  CONSTRAINT `fk_rails_4b5497cac5` FOREIGN KEY (`student_id`) REFERENCES `Students` (`StudentID`) ON DELETE CASCADE,
  CONSTRAINT `fk_rails_9f2e70a55a` FOREIGN KEY (`family_parent_id`) REFERENCES `FamilyParents` (`FamilyParentID`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `email_addresses`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `email_addresses` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `school_id` int(11) NOT NULL,
  `associated_type` varchar(255) DEFAULT NULL,
  `associated_id` bigint(20) DEFAULT NULL,
  `type` varchar(255) NOT NULL,
  `address` varchar(254) NOT NULL,
  `primary` tinyint(1) NOT NULL DEFAULT '0',
  `verified` tinyint(1) NOT NULL DEFAULT '0',
  `created_at` datetime(6) NOT NULL,
  `updated_at` datetime(6) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index_email_addresses_on_associated_type_and_associated_id` (`associated_type`,`associated_id`),
  KEY `index_email_addresses_on_school_id` (`school_id`),
  CONSTRAINT `fk_rails_40f5737d7f` FOREIGN KEY (`school_id`) REFERENCES `Schools` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `employee_notification_configs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `employee_notification_configs` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `service` int(11) NOT NULL DEFAULT '0',
  `created_at` datetime(6) NOT NULL,
  `updated_at` datetime(6) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index_employee_notification_configs_on_user_id` (`user_id`),
  CONSTRAINT `fk_rails_8a2c12a86b` FOREIGN KEY (`user_id`) REFERENCES `Users` (`UserID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `employee_positions`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `employee_positions` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `employee_id` int(11) NOT NULL,
  `position_id` int(11) NOT NULL,
  `start_date` date NOT NULL,
  `end_date` date DEFAULT NULL,
  `employment_descriptor` varchar(255) DEFAULT NULL,
  `created_at` datetime(6) NOT NULL,
  `updated_at` datetime(6) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index_employee_positions_on_employee_id` (`employee_id`),
  KEY `index_employee_positions_on_position_id` (`position_id`),
  CONSTRAINT `fk_rails_90315abf08` FOREIGN KEY (`position_id`) REFERENCES `UserPositions` (`UPID`),
  CONSTRAINT `fk_rails_f794b0a16d` FOREIGN KEY (`employee_id`) REFERENCES `Users` (`UserID`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `family_notification_configs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `family_notification_configs` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `accounting_invoice` int(11) NOT NULL DEFAULT '0',
  `accounting_payment` int(11) NOT NULL DEFAULT '0',
  `service` int(11) NOT NULL DEFAULT '0',
  `created_at` datetime(6) NOT NULL,
  `updated_at` datetime(6) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index_family_notification_configs_on_user_id` (`user_id`),
  CONSTRAINT `fk_rails_ffe6eac350` FOREIGN KEY (`user_id`) REFERENCES `Users` (`UserID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `financial_aid_answers`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `financial_aid_answers` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `application_id` bigint(20) NOT NULL,
  `question_id` bigint(20) NOT NULL,
  `answer` varchar(255) DEFAULT NULL,
  `status` int(11) NOT NULL DEFAULT '0',
  `notes` varchar(255) DEFAULT NULL,
  `created_at` datetime(6) NOT NULL,
  `updated_at` datetime(6) NOT NULL,
  `sycamore_notes` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `index_financial_aid_answers_on_application_id` (`application_id`),
  KEY `index_financial_aid_answers_on_question_id` (`question_id`),
  CONSTRAINT `fk_rails_0574b17e19` FOREIGN KEY (`question_id`) REFERENCES `financial_aid_questions` (`id`),
  CONSTRAINT `fk_rails_29e51fd2b5` FOREIGN KEY (`application_id`) REFERENCES `financial_aid_applications` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `financial_aid_applications`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `financial_aid_applications` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `school_year_id` int(11) NOT NULL,
  `family_id` int(11) NOT NULL,
  `status` int(11) NOT NULL DEFAULT '0',
  `score` decimal(15,2) DEFAULT NULL,
  `scored_at` datetime DEFAULT NULL,
  `submitted_at` datetime DEFAULT NULL,
  `created_at` datetime(6) NOT NULL,
  `updated_at` datetime(6) NOT NULL,
  `stripe_session_id` varchar(255) DEFAULT NULL,
  `paid` tinyint(1) NOT NULL DEFAULT '0',
  `financial_contribution` decimal(15,2) DEFAULT NULL,
  `awarded` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `index_financial_aid_applications_on_school_year_id` (`school_year_id`),
  KEY `fk_rails_04b9d0b434` (`family_id`),
  CONSTRAINT `fk_rails_04b9d0b434` FOREIGN KEY (`family_id`) REFERENCES `Families` (`FamilyID`),
  CONSTRAINT `fk_rails_5589af5a09` FOREIGN KEY (`school_year_id`) REFERENCES `SchoolYears` (`SchoolYearID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `financial_aid_configs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `financial_aid_configs` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `school_id` int(11) NOT NULL,
  `eligible` tinyint(1) NOT NULL DEFAULT '0',
  `max_grant_value` decimal(10,0) NOT NULL,
  `max_cap_income` decimal(10,0) NOT NULL,
  `school_cover_fee` tinyint(1) NOT NULL DEFAULT '0',
  `school_voucher` tinyint(1) NOT NULL DEFAULT '0',
  `school_voucher_code` varchar(255) DEFAULT NULL,
  `active` tinyint(1) NOT NULL DEFAULT '0',
  `created_at` datetime(6) NOT NULL,
  `updated_at` datetime(6) NOT NULL,
  `stripe_payment_id` varchar(255) DEFAULT NULL,
  `available_funds` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `fk_rails_a4532371b8` (`school_id`),
  CONSTRAINT `fk_rails_a4532371b8` FOREIGN KEY (`school_id`) REFERENCES `Schools` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `financial_aid_contacts`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `financial_aid_contacts` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `application_id` bigint(20) NOT NULL,
  `contact_id` int(11) NOT NULL,
  `created_at` datetime(6) NOT NULL,
  `updated_at` datetime(6) NOT NULL,
  `credit_report_key` varchar(255) DEFAULT NULL,
  `reported_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `index_financial_aid_contacts_on_application_id` (`application_id`),
  KEY `index_financial_aid_contacts_on_contact_id` (`contact_id`),
  CONSTRAINT `fk_rails_b37740ea15` FOREIGN KEY (`contact_id`) REFERENCES `Contact` (`ContactID`),
  CONSTRAINT `fk_rails_d429e14259` FOREIGN KEY (`application_id`) REFERENCES `financial_aid_applications` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `financial_aid_questions`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `financial_aid_questions` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `question` varchar(255) NOT NULL,
  `description` varchar(255) DEFAULT NULL,
  `answer_type` int(11) NOT NULL DEFAULT '0',
  `area` int(11) NOT NULL,
  `created_at` datetime(6) NOT NULL,
  `updated_at` datetime(6) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `financial_aid_school_questions`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `financial_aid_school_questions` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `school_id` int(11) NOT NULL,
  `question_id` bigint(20) DEFAULT NULL,
  `created_at` datetime(6) NOT NULL,
  `updated_at` datetime(6) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index_financial_aid_school_questions_on_school_id` (`school_id`),
  KEY `index_financial_aid_school_questions_on_question_id` (`question_id`),
  CONSTRAINT `fk_rails_40e0e43c88` FOREIGN KEY (`question_id`) REFERENCES `financial_aid_questions` (`id`),
  CONSTRAINT `fk_rails_fa7a73fce6` FOREIGN KEY (`school_id`) REFERENCES `Schools` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `financial_aid_waivers`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `financial_aid_waivers` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `school_year_id` int(11) NOT NULL,
  `family_id` int(11) NOT NULL,
  `created_at` datetime(6) NOT NULL,
  `updated_at` datetime(6) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `index_financial_aid_waivers_on_school_year_id_and_family_id` (`school_year_id`,`family_id`),
  KEY `index_financial_aid_waivers_on_school_year_id` (`school_year_id`),
  KEY `index_financial_aid_waivers_on_family_id` (`family_id`),
  CONSTRAINT `fk_rails_26fd119fdd` FOREIGN KEY (`family_id`) REFERENCES `Families` (`FamilyID`),
  CONSTRAINT `fk_rails_9dd46ef19f` FOREIGN KEY (`school_year_id`) REFERENCES `SchoolYears` (`SchoolYearID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `google_classrooms`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `google_classrooms` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `class_id` int(11) NOT NULL,
  `google_id` varchar(255) NOT NULL,
  `link` varchar(255) NOT NULL,
  `created_at` datetime(6) NOT NULL,
  `updated_at` datetime(6) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `index_google_classrooms_on_class_id` (`class_id`),
  UNIQUE KEY `index_google_classrooms_on_google_id` (`google_id`),
  CONSTRAINT `fk_rails_411a415936` FOREIGN KEY (`class_id`) REFERENCES `Classes` (`ClassID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `google_configs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `google_configs` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `school_id` int(11) NOT NULL,
  `email` varchar(255) NOT NULL,
  `customer_id` varchar(255) DEFAULT NULL,
  `active` tinyint(1) NOT NULL DEFAULT '0',
  `student_domain_id` bigint(20) DEFAULT NULL,
  `employee_domain_id` bigint(20) DEFAULT NULL,
  `created_at` datetime(6) NOT NULL,
  `updated_at` datetime(6) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index_google_configs_on_school_id` (`school_id`),
  KEY `index_google_configs_on_student_domain_id` (`student_domain_id`),
  KEY `index_google_configs_on_employee_domain_id` (`employee_domain_id`),
  CONSTRAINT `fk_rails_70f47ef092` FOREIGN KEY (`employee_domain_id`) REFERENCES `google_domains` (`id`),
  CONSTRAINT `fk_rails_b4218fddf9` FOREIGN KEY (`student_domain_id`) REFERENCES `google_domains` (`id`),
  CONSTRAINT `fk_rails_d9cedfa2ab` FOREIGN KEY (`school_id`) REFERENCES `Schools` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `google_domains`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `google_domains` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `school_id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `primary` tinyint(1) NOT NULL DEFAULT '0',
  `created_at` datetime(6) NOT NULL,
  `updated_at` datetime(6) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index_google_domains_on_school_id` (`school_id`),
  CONSTRAINT `fk_rails_aa31225770` FOREIGN KEY (`school_id`) REFERENCES `Schools` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `google_oauth_tokens`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `google_oauth_tokens` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `access_token` text NOT NULL,
  `refresh_token` text NOT NULL,
  `scope` text NOT NULL,
  `expires_at` datetime NOT NULL,
  `created_at` datetime(6) NOT NULL,
  `updated_at` datetime(6) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `index_google_oauth_tokens_on_user_id` (`user_id`),
  CONSTRAINT `fk_rails_a938f3ed9d` FOREIGN KEY (`user_id`) REFERENCES `Users` (`UserID`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `help_cards`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `help_cards` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `title` varchar(255) NOT NULL,
  `body` text NOT NULL,
  `link` varchar(255) DEFAULT NULL,
  `video_url` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `help_dismissed_notifications`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `help_dismissed_notifications` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `notification_id` bigint(20) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index_help_dismissed_notifications_on_user_id` (`user_id`),
  KEY `index_help_dismissed_notifications_on_notification_id` (`notification_id`),
  CONSTRAINT `fk_rails_644dc6b9eb` FOREIGN KEY (`notification_id`) REFERENCES `help_notifications` (`id`),
  CONSTRAINT `fk_rails_8fc049d38f` FOREIGN KEY (`user_id`) REFERENCES `Users` (`UserID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `help_notifications`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `help_notifications` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `body` text NOT NULL,
  `link` varchar(255) NOT NULL,
  `route_name` varchar(255) NOT NULL,
  `active` tinyint(1) NOT NULL DEFAULT '0',
  `expiration` datetime NOT NULL,
  `created_at` datetime(6) NOT NULL,
  `updated_at` datetime(6) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `iso_countries`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `iso_countries` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `alpha2` varchar(2) NOT NULL,
  `alpha3` varchar(3) NOT NULL,
  `code` varchar(4) NOT NULL,
  `created_at` datetime(6) NOT NULL,
  `updated_at` datetime(6) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index_iso_countries_on_name` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `library_bib_contributors`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `library_bib_contributors` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `bib_id` bigint(20) NOT NULL,
  `contributor_id` bigint(20) NOT NULL,
  `role` int(11) NOT NULL,
  `created_at` datetime(6) NOT NULL,
  `updated_at` datetime(6) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `index_library_bib_contributors_on_bib_id_and_contributor_id` (`bib_id`,`contributor_id`),
  KEY `fk_rails_9cef5715b2` (`contributor_id`),
  CONSTRAINT `fk_rails_9cef5715b2` FOREIGN KEY (`contributor_id`) REFERENCES `library_contributors` (`id`),
  CONSTRAINT `fk_rails_b40092e02e` FOREIGN KEY (`bib_id`) REFERENCES `library_bibs` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `library_bibs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `library_bibs` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `school_id` int(11) NOT NULL,
  `item_type_id` bigint(20) NOT NULL,
  `publisher_id` bigint(20) DEFAULT NULL,
  `title` varchar(128) NOT NULL,
  `subtitle` varchar(128) DEFAULT NULL,
  `published_on` int(11) DEFAULT NULL,
  `isbn10` varchar(10) DEFAULT NULL,
  `isbn13` varchar(13) DEFAULT NULL,
  `lccn` varchar(12) DEFAULT NULL,
  `summary` text,
  `page_count` int(11) DEFAULT NULL,
  `created_at` datetime(6) NOT NULL,
  `updated_at` datetime(6) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `index_library_bibs_on_school_id_and_isbn10` (`school_id`,`isbn10`),
  UNIQUE KEY `index_library_bibs_on_school_id_and_isbn13` (`school_id`,`isbn13`),
  UNIQUE KEY `index_library_bibs_on_school_id_and_lccn` (`school_id`,`lccn`),
  KEY `index_library_bibs_on_school_id_and_title_and_subtitle` (`school_id`,`title`,`subtitle`),
  KEY `fk_rails_d4eefa09e0` (`item_type_id`),
  KEY `index_library_bibs_on_publisher_id` (`publisher_id`),
  CONSTRAINT `fk_rails_610dd29d9b` FOREIGN KEY (`publisher_id`) REFERENCES `library_publishers` (`id`),
  CONSTRAINT `fk_rails_818301a8c2` FOREIGN KEY (`school_id`) REFERENCES `Schools` (`SchoolID`),
  CONSTRAINT `fk_rails_d4eefa09e0` FOREIGN KEY (`item_type_id`) REFERENCES `library_item_types` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `library_contributors`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `library_contributors` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `school_id` int(11) NOT NULL,
  `name` varchar(128) NOT NULL,
  `created_at` datetime(6) NOT NULL,
  `updated_at` datetime(6) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `index_library_contributors_on_school_id_and_name` (`school_id`,`name`),
  KEY `index_library_contributors_on_school_id` (`school_id`),
  CONSTRAINT `fk_rails_bbb8bce926` FOREIGN KEY (`school_id`) REFERENCES `Schools` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `library_holdings`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `library_holdings` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `bib_id` bigint(20) NOT NULL,
  `school_id` int(11) NOT NULL,
  `location_id` bigint(20) DEFAULT NULL,
  `item_condition_id` bigint(20) DEFAULT NULL,
  `barcode` varchar(255) DEFAULT NULL,
  `call_number` varchar(30) DEFAULT NULL,
  `cost` decimal(20,2) DEFAULT NULL,
  `created_at` datetime(6) NOT NULL,
  `updated_at` datetime(6) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `index_library_holdings_on_school_id_and_barcode` (`school_id`,`barcode`),
  KEY `index_library_holdings_on_location_id` (`location_id`),
  KEY `index_library_holdings_on_item_condition_id` (`item_condition_id`),
  KEY `index_library_holdings_on_bib_id` (`bib_id`),
  CONSTRAINT `fk_rails_6d32bd9512` FOREIGN KEY (`bib_id`) REFERENCES `library_bibs` (`id`),
  CONSTRAINT `fk_rails_95fdc420d1` FOREIGN KEY (`school_id`) REFERENCES `Schools` (`SchoolID`),
  CONSTRAINT `fk_rails_b3dcc6c2e1` FOREIGN KEY (`location_id`) REFERENCES `library_locations` (`id`),
  CONSTRAINT `fk_rails_ecd63a93c9` FOREIGN KEY (`item_condition_id`) REFERENCES `library_item_conditions` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `library_item_conditions`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `library_item_conditions` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `school_id` int(11) NOT NULL,
  `name` varchar(32) NOT NULL,
  `description` varchar(255) DEFAULT NULL,
  `created_at` datetime(6) NOT NULL,
  `updated_at` datetime(6) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index_library_item_conditions_on_school_id` (`school_id`),
  CONSTRAINT `fk_rails_b1dc681929` FOREIGN KEY (`school_id`) REFERENCES `Schools` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `library_item_types`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `library_item_types` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `school_id` int(11) NOT NULL,
  `name` varchar(32) NOT NULL,
  `description` varchar(255) DEFAULT NULL,
  `created_at` datetime(6) NOT NULL,
  `updated_at` datetime(6) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index_library_item_types_on_school_id` (`school_id`),
  CONSTRAINT `fk_rails_46322f34ac` FOREIGN KEY (`school_id`) REFERENCES `Schools` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `library_locations`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `library_locations` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `school_id` int(11) NOT NULL,
  `name` varchar(64) NOT NULL,
  `created_at` datetime(6) NOT NULL,
  `updated_at` datetime(6) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index_library_locations_on_school_id` (`school_id`),
  CONSTRAINT `fk_rails_db590f185b` FOREIGN KEY (`school_id`) REFERENCES `Schools` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `library_publishers`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `library_publishers` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `school_id` int(11) NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  `created_at` datetime(6) NOT NULL,
  `updated_at` datetime(6) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `index_library_publishers_on_school_id_and_name` (`school_id`,`name`),
  KEY `index_library_publishers_on_school_id` (`school_id`),
  CONSTRAINT `fk_rails_2cb98edf81` FOREIGN KEY (`school_id`) REFERENCES `Schools` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `menus`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `menus` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `option` int(11) NOT NULL,
  `order` int(11) NOT NULL,
  `created_at` datetime(6) NOT NULL,
  `updated_at` datetime(6) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index_menus_on_user_id` (`user_id`),
  CONSTRAINT `fk_rails_c38eb0f938` FOREIGN KEY (`user_id`) REFERENCES `Users` (`UserID`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `metars`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `metars` (
  `metar` varchar(255) NOT NULL DEFAULT '',
  `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `station` varchar(4) NOT NULL DEFAULT '',
  PRIMARY KEY (`station`),
  UNIQUE KEY `station` (`station`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `module_configs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `module_configs` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `school_id` int(11) NOT NULL,
  `type` varchar(255) NOT NULL,
  `accounting` tinyint(1) NOT NULL DEFAULT '0',
  `admissions` tinyint(1) NOT NULL DEFAULT '0',
  `auction` tinyint(1) NOT NULL DEFAULT '0',
  `classroom` tinyint(1) NOT NULL DEFAULT '0',
  `covid` tinyint(1) NOT NULL DEFAULT '0',
  `discipline` tinyint(1) NOT NULL DEFAULT '0',
  `facility` tinyint(1) NOT NULL DEFAULT '0',
  `nursing` tinyint(1) NOT NULL DEFAULT '0',
  `pt_conference` tinyint(1) NOT NULL DEFAULT '0',
  `service` tinyint(1) NOT NULL DEFAULT '0',
  `created_at` datetime(6) NOT NULL,
  `updated_at` datetime(6) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index_module_configs_on_school_id_and_type` (`school_id`,`type`),
  CONSTRAINT `fk_rails_63c03a3872` FOREIGN KEY (`school_id`) REFERENCES `Schools` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `my_batch_configs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `my_batch_configs` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `school_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `gmail_address` varchar(128) NOT NULL,
  `gmail_refresh_token` varchar(512) NOT NULL,
  `created_at` datetime(6) NOT NULL,
  `updated_at` datetime(6) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `index_my_batch_configs_on_school_id_and_user_id` (`school_id`,`user_id`),
  KEY `index_my_batch_configs_on_school_id` (`school_id`),
  KEY `index_my_batch_configs_on_user_id` (`user_id`),
  CONSTRAINT `fk_rails_0feffaa3d5` FOREIGN KEY (`user_id`) REFERENCES `Users` (`UserID`) ON DELETE CASCADE,
  CONSTRAINT `fk_rails_cc9fa1ff0e` FOREIGN KEY (`school_id`) REFERENCES `Schools` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `notification_messages`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `notification_messages` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `associated_type` varchar(255) DEFAULT NULL,
  `associated_id` bigint(20) DEFAULT NULL,
  `title` varchar(255) NOT NULL,
  `body` text NOT NULL,
  `read` tinyint(1) NOT NULL DEFAULT '0',
  `created_at` datetime(6) NOT NULL,
  `updated_at` datetime(6) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index_notification_messages_on_user_id` (`user_id`),
  KEY `index_notification_messages_on_associated_type_and_associated_id` (`associated_type`,`associated_id`),
  CONSTRAINT `fk_rails_f2559ae3cd` FOREIGN KEY (`user_id`) REFERENCES `Users` (`UserID`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `oauth_access_tokens`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `oauth_access_tokens` (
  `token_id` int(11) NOT NULL AUTO_INCREMENT,
  `access_token` varchar(40) NOT NULL,
  `client_id` varchar(80) NOT NULL,
  `school_id` int(11) DEFAULT NULL,
  `user_id` int(11) DEFAULT NULL,
  `family_id` int(11) DEFAULT NULL,
  `student_id` int(11) DEFAULT NULL,
  `expires` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `scope` varchar(100) DEFAULT NULL,
  `description` varchar(128) NOT NULL,
  PRIMARY KEY (`token_id`),
  KEY `user_id` (`user_id`),
  KEY `access_token` (`access_token`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `oauth_applications`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `oauth_applications` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `uid` varchar(255) NOT NULL,
  `secret` varchar(255) NOT NULL,
  `redirect_uri` text,
  `scopes` varchar(255) NOT NULL DEFAULT '',
  `confidential` tinyint(1) NOT NULL DEFAULT '1',
  `created_at` datetime(6) NOT NULL,
  `updated_at` datetime(6) NOT NULL,
  `owner_id` int(11) NOT NULL,
  `owner_type` varchar(255) NOT NULL,
  `class_name_token` varchar(64) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `index_oauth_applications_on_uid` (`uid`),
  KEY `index_oauth_applications_on_owner_id_and_owner_type` (`owner_id`,`owner_type`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `oauth_authorization_codes`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `oauth_authorization_codes` (
  `authorization_code` varchar(40) NOT NULL,
  `client_id` varchar(80) NOT NULL,
  `user_id` int(11) NOT NULL DEFAULT '0',
  `school_id` int(11) NOT NULL DEFAULT '0',
  `family_id` int(11) NOT NULL DEFAULT '0',
  `student_id` int(11) NOT NULL DEFAULT '0',
  `redirect_uri` varchar(2000) DEFAULT NULL,
  `expires` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `scope` varchar(2000) DEFAULT NULL,
  PRIMARY KEY (`authorization_code`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `oauth_clients`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `oauth_clients` (
  `client_id` varchar(80) NOT NULL,
  `client_secret` varchar(80) NOT NULL,
  `redirect_uri` varchar(2000) NOT NULL,
  `grant_types` varchar(80) DEFAULT NULL,
  `user_id` varchar(80) DEFAULT NULL,
  `name` varchar(64) NOT NULL,
  `description` varchar(256) NOT NULL,
  `website` varchar(128) NOT NULL,
  `photo` varchar(256) NOT NULL,
  `public` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`client_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `oauth_refresh_tokens`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `oauth_refresh_tokens` (
  `token_id` int(11) NOT NULL AUTO_INCREMENT,
  `refresh_token` varchar(40) NOT NULL,
  `client_id` varchar(80) NOT NULL,
  `user_id` int(11) NOT NULL DEFAULT '0',
  `school_id` int(11) NOT NULL DEFAULT '0',
  `family_id` int(11) NOT NULL DEFAULT '0',
  `student_id` int(11) NOT NULL DEFAULT '0',
  `expires` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `scope` varchar(2000) DEFAULT NULL,
  PRIMARY KEY (`token_id`),
  KEY `refresh_token` (`refresh_token`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `oauth_tokens`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `oauth_tokens` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `resource_owner_id` int(11) DEFAULT NULL,
  `application_id` bigint(20) NOT NULL,
  `token` varchar(255) NOT NULL,
  `refresh_token` varchar(255) DEFAULT NULL,
  `expires_in` int(11) DEFAULT NULL,
  `revoked_at` datetime DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `scopes` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `index_oauth_tokens_on_token` (`token`),
  UNIQUE KEY `index_oauth_tokens_on_refresh_token` (`refresh_token`),
  KEY `index_oauth_tokens_on_resource_owner_id` (`resource_owner_id`),
  KEY `index_oauth_tokens_on_application_id` (`application_id`),
  CONSTRAINT `fk_rails_99d9442b91` FOREIGN KEY (`application_id`) REFERENCES `oauth_applications` (`id`),
  CONSTRAINT `fk_rails_e21318da29` FOREIGN KEY (`resource_owner_id`) REFERENCES `Schools` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `oauth_users`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `oauth_users` (
  `username` varchar(255) NOT NULL,
  `password` varchar(2000) DEFAULT NULL,
  `first_name` varchar(255) DEFAULT NULL,
  `last_name` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`username`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `pathwright_categories`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `pathwright_categories` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `description` text,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `pathwright_courses`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `pathwright_courses` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `category_id` bigint(20) NOT NULL,
  `name` varchar(255) NOT NULL,
  `description` text,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index_pathwright_courses_on_category_id` (`category_id`),
  CONSTRAINT `fk_rails_aa563d9547` FOREIGN KEY (`category_id`) REFERENCES `pathwright_categories` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `paya_configs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `paya_configs` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `school_id` int(11) NOT NULL,
  `enabled` tinyint(1) NOT NULL DEFAULT '0',
  `location_id` varchar(255) DEFAULT NULL,
  `user_id` varchar(255) DEFAULT NULL,
  `user_api_key` varchar(255) DEFAULT NULL,
  `user_hash_key` varchar(255) DEFAULT NULL,
  `environment` int(11) NOT NULL DEFAULT '0',
  `created_at` datetime(6) DEFAULT NULL,
  `updated_at` datetime(6) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `index_paya_configs_on_school_id` (`school_id`),
  CONSTRAINT `fk_rails_af73a1abf7` FOREIGN KEY (`school_id`) REFERENCES `Schools` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `payjunction_accounts`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `payjunction_accounts` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `school_id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `status` tinyint(1) NOT NULL DEFAULT '0',
  `payment_type` int(11) NOT NULL,
  `account_id` varchar(255) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index_payjunction_accounts_on_school_id` (`school_id`),
  KEY `index_payjunction_accounts_on_status_and_payment_type` (`status`,`payment_type`),
  KEY `index_payjunction_accounts_on_account_id` (`account_id`),
  CONSTRAINT `fk_rails_8a545e9a27` FOREIGN KEY (`school_id`) REFERENCES `Schools` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `payjunction_convenience_fees`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `payjunction_convenience_fees` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `account_id` bigint(20) NOT NULL,
  `accounting_subcategory_id` bigint(20) NOT NULL,
  `type` varchar(255) NOT NULL,
  `amount` decimal(20,2) NOT NULL,
  `status` tinyint(1) NOT NULL DEFAULT '0',
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index_payjunction_convenience_fees_on_accounting_subcategory_id` (`accounting_subcategory_id`),
  KEY `index_payjunction_convenience_fees_on_account_id` (`account_id`),
  CONSTRAINT `fk_rails_3a9a2c2eea` FOREIGN KEY (`accounting_subcategory_id`) REFERENCES `accounting_subcategories` (`id`),
  CONSTRAINT `fk_rails_8afddc72f5` FOREIGN KEY (`account_id`) REFERENCES `payjunction_accounts` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `payjunction_credentials`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `payjunction_credentials` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `school_id` int(11) NOT NULL,
  `username` varchar(255) NOT NULL,
  `password` varchar(512) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index_payjunction_credentials_on_school_id` (`school_id`),
  CONSTRAINT `fk_rails_57ebfb32b2` FOREIGN KEY (`school_id`) REFERENCES `Schools` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `payjunction_customers`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `payjunction_customers` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `person_id` int(11) NOT NULL,
  `external_id` varchar(255) NOT NULL,
  `type` varchar(255) NOT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index_payjunction_customers_on_person_id` (`person_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `payjunction_terminals`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `payjunction_terminals` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `school_id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `status` tinyint(1) NOT NULL DEFAULT '0',
  `serial_number` varchar(255) NOT NULL,
  `terminal_id` varchar(255) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index_payjunction_terminals_on_school_id` (`school_id`),
  KEY `index_payjunction_terminals_on_status` (`status`),
  KEY `index_payjunction_terminals_on_terminal_id` (`terminal_id`),
  CONSTRAINT `fk_rails_e96d7e0596` FOREIGN KEY (`school_id`) REFERENCES `Schools` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `phinxlog`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `phinxlog` (
  `version` bigint(20) NOT NULL,
  `migration_name` varchar(100) DEFAULT NULL,
  `start_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `end_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `breakpoint` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`version`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `phones`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `phones` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `associated_type` varchar(255) DEFAULT NULL,
  `associated_id` bigint(20) DEFAULT NULL,
  `type` varchar(255) NOT NULL,
  `code` int(11) NOT NULL DEFAULT '0',
  `country_code` varchar(2) NOT NULL,
  `number` varchar(255) NOT NULL,
  `extension` varchar(255) DEFAULT NULL,
  `created_at` datetime(6) NOT NULL,
  `updated_at` datetime(6) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index_phones_on_associated_type_and_associated_id` (`associated_type`,`associated_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `push_notification_subscribers`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `push_notification_subscribers` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `uuid` varchar(255) NOT NULL,
  `platform` int(11) NOT NULL,
  `created_at` datetime(6) NOT NULL,
  `updated_at` datetime(6) NOT NULL,
  `enabled` tinyint(1) DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `index_push_notification_subscribers_on_user_id` (`user_id`),
  CONSTRAINT `fk_rails_104ac45f1e` FOREIGN KEY (`user_id`) REFERENCES `Users` (`UserID`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `rc_cache`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `rc_cache` (
  `cache_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `cache_key` varchar(128) CHARACTER SET ascii NOT NULL,
  `created` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
  `data` longtext NOT NULL,
  `user_id` int(10) unsigned NOT NULL DEFAULT '0',
  `expires` datetime DEFAULT NULL,
  PRIMARY KEY (`cache_id`),
  KEY `user_cache_index` (`user_id`,`cache_key`),
  KEY `expires_index` (`expires`),
  CONSTRAINT `rc_cache_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `rc_users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `rc_cache_index`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `rc_cache_index` (
  `user_id` int(10) unsigned NOT NULL,
  `mailbox` varchar(255) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL,
  `expires` datetime DEFAULT NULL,
  `valid` tinyint(1) NOT NULL DEFAULT '0',
  `data` longtext NOT NULL,
  PRIMARY KEY (`user_id`,`mailbox`),
  KEY `expires_index` (`expires`),
  CONSTRAINT `user_id_fk_cache_index` FOREIGN KEY (`user_id`) REFERENCES `rc_users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `rc_cache_messages`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `rc_cache_messages` (
  `user_id` int(10) unsigned NOT NULL,
  `mailbox` varchar(255) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL,
  `uid` int(11) unsigned NOT NULL DEFAULT '0',
  `expires` datetime DEFAULT NULL,
  `data` longtext NOT NULL,
  `flags` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`user_id`,`mailbox`,`uid`),
  KEY `expires_index` (`expires`),
  CONSTRAINT `user_id_fk_cache_messages` FOREIGN KEY (`user_id`) REFERENCES `rc_users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `rc_cache_shared`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `rc_cache_shared` (
  `cache_key` varchar(255) CHARACTER SET ascii NOT NULL,
  `created` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
  `expires` datetime DEFAULT NULL,
  `data` longtext NOT NULL,
  KEY `expires_index` (`expires`),
  KEY `cache_key_index` (`cache_key`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `rc_cache_thread`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `rc_cache_thread` (
  `user_id` int(10) unsigned NOT NULL,
  `mailbox` varchar(255) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL,
  `expires` datetime DEFAULT NULL,
  `data` longtext NOT NULL,
  PRIMARY KEY (`user_id`,`mailbox`),
  KEY `expires_index` (`expires`),
  CONSTRAINT `user_id_fk_cache_thread` FOREIGN KEY (`user_id`) REFERENCES `rc_users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `rc_contactgroupmembers`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `rc_contactgroupmembers` (
  `contactgroup_id` int(10) unsigned NOT NULL,
  `contact_id` int(10) unsigned NOT NULL DEFAULT '0',
  `created` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
  PRIMARY KEY (`contactgroup_id`,`contact_id`),
  KEY `contact_id_fk_contacts` (`contact_id`),
  CONSTRAINT `contact_id_fk_contacts` FOREIGN KEY (`contact_id`) REFERENCES `contacts` (`contact_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `contactgroup_id_fk_contactgroups` FOREIGN KEY (`contactgroup_id`) REFERENCES `contactgroups` (`contactgroup_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `rc_contactgroups`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `rc_contactgroups` (
  `contactgroup_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned NOT NULL DEFAULT '0',
  `changed` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
  `del` tinyint(1) NOT NULL DEFAULT '0',
  `name` varchar(128) NOT NULL DEFAULT '',
  PRIMARY KEY (`contactgroup_id`),
  KEY `contactgroups_user_index` (`user_id`,`del`),
  CONSTRAINT `user_id_fk_contactgroups` FOREIGN KEY (`user_id`) REFERENCES `rc_users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `rc_contacts`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `rc_contacts` (
  `contact_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `changed` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
  `del` tinyint(1) NOT NULL DEFAULT '0',
  `name` varchar(128) NOT NULL DEFAULT '',
  `email` varchar(128) NOT NULL,
  `firstname` varchar(128) NOT NULL DEFAULT '',
  `surname` varchar(128) NOT NULL DEFAULT '',
  `vcard` longtext,
  `words` text,
  `user_id` int(10) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`contact_id`),
  KEY `user_contacts_index` (`user_id`,`email`),
  CONSTRAINT `rc_contacts_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `rc_users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `rc_dictionary`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `rc_dictionary` (
  `user_id` int(10) unsigned DEFAULT NULL,
  `language` varchar(5) NOT NULL,
  `data` longtext NOT NULL,
  UNIQUE KEY `uniqueness` (`user_id`,`language`),
  CONSTRAINT `user_id_fk_dictionary` FOREIGN KEY (`user_id`) REFERENCES `rc_users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `rc_identities`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `rc_identities` (
  `identity_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned NOT NULL DEFAULT '0',
  `changed` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
  `del` tinyint(1) NOT NULL DEFAULT '0',
  `standard` tinyint(1) NOT NULL DEFAULT '0',
  `name` varchar(128) NOT NULL,
  `organization` varchar(128) NOT NULL DEFAULT '',
  `email` varchar(128) NOT NULL,
  `reply-to` varchar(128) NOT NULL DEFAULT '',
  `bcc` varchar(128) NOT NULL DEFAULT '',
  `signature` longtext,
  `html_signature` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`identity_id`),
  KEY `user_identities_index` (`user_id`,`del`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `rc_searches`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `rc_searches` (
  `search_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned NOT NULL,
  `type` int(3) NOT NULL DEFAULT '0',
  `name` varchar(128) NOT NULL,
  `data` text,
  PRIMARY KEY (`search_id`),
  UNIQUE KEY `uniqueness` (`user_id`,`type`,`name`),
  CONSTRAINT `user_id_fk_searches` FOREIGN KEY (`user_id`) REFERENCES `rc_users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `rc_session`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `rc_session` (
  `sess_id` varchar(40) NOT NULL,
  `created` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
  `changed` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
  `ip` varchar(40) NOT NULL,
  `vars` mediumtext NOT NULL,
  PRIMARY KEY (`sess_id`),
  KEY `changed_index` (`changed`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `rc_system`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `rc_system` (
  `name` varchar(64) NOT NULL,
  `value` mediumtext,
  PRIMARY KEY (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `rc_users`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `rc_users` (
  `user_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `username` varchar(128) NOT NULL,
  `mail_host` varchar(128) NOT NULL,
  `created` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
  `last_login` datetime DEFAULT NULL,
  `language` varchar(5) DEFAULT NULL,
  `preferences` longtext,
  `failed_login` datetime DEFAULT NULL,
  `failed_login_counter` int(10) unsigned DEFAULT NULL,
  PRIMARY KEY (`user_id`),
  KEY `username_index` (`username`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `report_card_stats`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `report_card_stats` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `school_id` int(11) NOT NULL,
  `pdfs` int(11) NOT NULL DEFAULT '0',
  `created_at` datetime(6) NOT NULL,
  `updated_at` datetime(6) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `index_report_card_stats_on_school_id` (`school_id`),
  CONSTRAINT `fk_rails_7fded9079a` FOREIGN KEY (`school_id`) REFERENCES `Schools` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `schema_migrations`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `schema_migrations` (
  `version` varchar(255) NOT NULL,
  PRIMARY KEY (`version`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `school_brandings`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `school_brandings` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `school_id` int(11) NOT NULL,
  `color` int(11) NOT NULL DEFAULT '0',
  `created_at` datetime(6) NOT NULL,
  `updated_at` datetime(6) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index_school_brandings_on_school_id` (`school_id`),
  CONSTRAINT `fk_rails_08fa8c1a5d` FOREIGN KEY (`school_id`) REFERENCES `Schools` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `school_environments`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `school_environments` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `school_id` int(11) NOT NULL,
  `type` varchar(255) NOT NULL,
  `environment` int(11) NOT NULL DEFAULT '0',
  `created_at` datetime(6) NOT NULL,
  `updated_at` datetime(6) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index_school_environments_on_school_id` (`school_id`),
  CONSTRAINT `fk_rails_a29275da53` FOREIGN KEY (`school_id`) REFERENCES `Schools` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `school_grades`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `school_grades` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `school_id` int(11) NOT NULL,
  `grade` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `external` varchar(255) NOT NULL,
  `edfi_grade` int(11) DEFAULT NULL,
  `active` tinyint(1) NOT NULL DEFAULT '0',
  `created_at` datetime(6) NOT NULL,
  `updated_at` datetime(6) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `index_school_grades_on_school_id_and_grade` (`school_id`,`grade`),
  KEY `index_school_grades_on_school_id` (`school_id`),
  CONSTRAINT `fk_rails_fd2ad7a56a` FOREIGN KEY (`school_id`) REFERENCES `Schools` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `school_snapshots`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `school_snapshots` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `school_id` int(11) NOT NULL,
  `academic_year` int(11) NOT NULL,
  `employee_count` int(11) NOT NULL,
  `student_count` int(11) NOT NULL,
  `family_count` int(11) NOT NULL,
  `created_at` datetime(6) NOT NULL,
  `updated_at` datetime(6) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index_school_snapshots_on_school_id` (`school_id`),
  CONSTRAINT `fk_rails_bee84ce707` FOREIGN KEY (`school_id`) REFERENCES `Schools` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `school_tokens`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `school_tokens` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `school_id` int(11) NOT NULL,
  `access_token` varchar(255) NOT NULL,
  `client` varchar(255) NOT NULL,
  `active` tinyint(1) NOT NULL DEFAULT '1',
  `scopes` text,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `index_school_tokens_on_client_and_active` (`client`,`active`),
  KEY `index_school_tokens_on_school_id` (`school_id`),
  KEY `index_school_tokens_on_client` (`client`),
  CONSTRAINT `fk_rails_6297990c97` FOREIGN KEY (`school_id`) REFERENCES `Schools` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `service_settings`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `service_settings` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `school_id` int(11) NOT NULL,
  `track` int(11) NOT NULL DEFAULT '0',
  `created_at` datetime(6) NOT NULL,
  `updated_at` datetime(6) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index_service_settings_on_school_id` (`school_id`),
  CONSTRAINT `fk_rails_b3b5670a93` FOREIGN KEY (`school_id`) REFERENCES `Schools` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `session_stats`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `session_stats` (
  `sid` varchar(32) NOT NULL DEFAULT '',
  `name` varchar(32) NOT NULL DEFAULT '',
  `start_time` varchar(14) NOT NULL DEFAULT '',
  `referer` varchar(250) NOT NULL DEFAULT '',
  `addr` varchar(15) NOT NULL DEFAULT '',
  `user_agent` varchar(250) NOT NULL DEFAULT '',
  KEY `session_identifier` (`name`,`sid`),
  KEY `start_time` (`start_time`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `state_reporting_configs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `state_reporting_configs` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `school_year_id` int(11) NOT NULL,
  `calendar_descriptor_id` int(11) DEFAULT NULL,
  `syncing` int(11) NOT NULL DEFAULT '0',
  `enabled` tinyint(1) NOT NULL DEFAULT '0',
  `performance` tinyint(1) NOT NULL DEFAULT '0',
  `created_at` datetime(6) NOT NULL,
  `updated_at` datetime(6) NOT NULL,
  `calendar_job` varchar(255) DEFAULT NULL,
  `master_schedule_job` varchar(255) DEFAULT NULL,
  `students_job` varchar(255) DEFAULT NULL,
  `attendance_job` varchar(255) DEFAULT NULL,
  `staff_job` varchar(255) DEFAULT NULL,
  `parents_job` varchar(255) DEFAULT NULL,
  `student_membership_job` varchar(255) DEFAULT NULL,
  `student_programs_job` varchar(255) DEFAULT NULL,
  `course_offering_job` varchar(255) DEFAULT NULL,
  `course_section_rosters_job` varchar(255) DEFAULT NULL,
  `preschool_transcripts_job` varchar(255) DEFAULT NULL,
  `secondary_transcripts_job` varchar(255) DEFAULT NULL,
  `middle_transcripts_job` varchar(255) DEFAULT NULL,
  `primary_transcripts_job` varchar(255) DEFAULT NULL,
  `graduates_job` varchar(255) DEFAULT NULL,
  `student_accommodations_job` varchar(255) DEFAULT NULL,
  `student_graduation_plans_job` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `index_state_reporting_configs_on_school_year_id` (`school_year_id`),
  KEY `index_state_reporting_configs_on_calendar_descriptor_id` (`calendar_descriptor_id`),
  CONSTRAINT `fk_rails_83aaed51de` FOREIGN KEY (`school_year_id`) REFERENCES `SchoolYears` (`SchoolYearID`),
  CONSTRAINT `fk_rails_c55a9395c6` FOREIGN KEY (`calendar_descriptor_id`) REFERENCES `EdFi_Descriptors` (`DescriptorID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `student_notification_configs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `student_notification_configs` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `service` int(11) NOT NULL DEFAULT '0',
  `created_at` datetime(6) NOT NULL,
  `updated_at` datetime(6) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index_student_notification_configs_on_user_id` (`user_id`),
  CONSTRAINT `fk_rails_e77874aef6` FOREIGN KEY (`user_id`) REFERENCES `Users` (`UserID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `student_origins`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `student_origins` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `student_id` int(11) NOT NULL,
  `origin` int(11) NOT NULL DEFAULT '0',
  `descriptor` varchar(255) NOT NULL DEFAULT '',
  `created_at` datetime(6) NOT NULL,
  `updated_at` datetime(6) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index_student_origins_on_student_id` (`student_id`),
  CONSTRAINT `fk_rails_5c1aea9599` FOREIGN KEY (`student_id`) REFERENCES `Students` (`StudentID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `support_permissions`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `support_permissions` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `user_id` bigint(20) NOT NULL,
  `users` int(11) NOT NULL DEFAULT '0',
  `training` int(11) NOT NULL DEFAULT '0',
  `communication` int(11) NOT NULL DEFAULT '0',
  `sites` int(11) NOT NULL DEFAULT '0',
  `financial_aid` int(11) DEFAULT '0',
  `login_access` int(11) NOT NULL DEFAULT '0',
  `created_at` datetime(6) NOT NULL,
  `updated_at` datetime(6) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index_support_permissions_on_user_id` (`user_id`),
  CONSTRAINT `fk_rails_2932dfeebe` FOREIGN KEY (`user_id`) REFERENCES `support_users` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `support_tokens`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `support_tokens` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `user_id` bigint(20) NOT NULL,
  `current` varchar(255) NOT NULL,
  `previous` varchar(255) DEFAULT NULL,
  `client` varchar(255) NOT NULL,
  `expiry` int(11) NOT NULL,
  `created_at` datetime(6) NOT NULL,
  `updated_at` datetime(6) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `index_support_tokens_on_client` (`client`),
  KEY `index_support_tokens_on_user_id` (`user_id`),
  CONSTRAINT `fk_rails_40b3cd9efe` FOREIGN KEY (`user_id`) REFERENCES `support_users` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `support_users`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `support_users` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `username` varchar(255) NOT NULL,
  `password_digest` varchar(255) NOT NULL,
  `password_changed_at` datetime DEFAULT NULL,
  `first_name` varchar(255) NOT NULL,
  `last_name` varchar(255) NOT NULL,
  `active` tinyint(1) NOT NULL DEFAULT '1',
  `email` varchar(255) DEFAULT NULL,
  `freshdesk_api_key` varchar(255) DEFAULT NULL,
  `created_at` datetime(6) NOT NULL,
  `updated_at` datetime(6) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `index_support_users_on_username` (`username`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `sycamore_storage_attachments`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `sycamore_storage_attachments` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `school_id` int(11) NOT NULL,
  `associated_id` int(11) NOT NULL,
  `associated_type` varchar(255) NOT NULL,
  `name` varchar(255) NOT NULL,
  `filename` varchar(255) NOT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `index_sycamore_storage_attachments_keys` (`associated_id`,`associated_type`,`name`),
  KEY `index_sycamore_storage_attachments_on_school_id` (`school_id`),
  CONSTRAINT `fk_rails_ff14bf1be5` FOREIGN KEY (`school_id`) REFERENCES `Schools` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `tags`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `tags` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `school_id` int(11) NOT NULL,
  `name` varchar(32) NOT NULL,
  `color` varchar(7) NOT NULL,
  `type` varchar(255) NOT NULL,
  `created_at` datetime(6) NOT NULL,
  `updated_at` datetime(6) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index_tags_on_school_id` (`school_id`),
  CONSTRAINT `fk_rails_90ea9180b2` FOREIGN KEY (`school_id`) REFERENCES `Schools` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `tokens`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `tokens` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `support_user_id` bigint(20) DEFAULT NULL,
  `current` varchar(255) NOT NULL,
  `previous` varchar(255) DEFAULT NULL,
  `client` varchar(255) NOT NULL,
  `expiry` int(11) NOT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `index_tokens_on_client` (`client`),
  KEY `index_tokens_on_user_id` (`user_id`),
  KEY `index_tokens_on_support_user_id` (`support_user_id`),
  CONSTRAINT `fk_rails_ac8a5d0441` FOREIGN KEY (`user_id`) REFERENCES `Users` (`UserID`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `training_categories`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `training_categories` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `name` varchar(64) NOT NULL,
  `created_at` datetime(6) NOT NULL,
  `updated_at` datetime(6) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `training_videos`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `training_videos` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `category_id` bigint(20) NOT NULL,
  `name` varchar(128) NOT NULL,
  `description` text,
  `url` varchar(255) NOT NULL,
  `created_at` datetime(6) NOT NULL,
  `updated_at` datetime(6) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index_training_videos_on_category_id` (`category_id`),
  CONSTRAINT `fk_rails_8187340d4d` FOREIGN KEY (`category_id`) REFERENCES `training_categories` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `tuition_mgmt_configurations`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `tuition_mgmt_configurations` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `school_id` int(11) NOT NULL,
  `auto_charging` int(11) NOT NULL DEFAULT '0',
  `days_prior` int(11) NOT NULL DEFAULT '0',
  `auto_payment` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `index_tuition_mgmt_configurations_on_school_id` (`school_id`),
  CONSTRAINT `fk_rails_406cf1b7f9` FOREIGN KEY (`school_id`) REFERENCES `Schools` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `us_states`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `us_states` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `abbreviation` varchar(255) NOT NULL,
  `created_at` datetime(6) NOT NULL,
  `updated_at` datetime(6) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

INSERT INTO `schema_migrations` (version) VALUES
('20171018153912'),
('20171018175909'),
('20171110163123'),
('20171114202238'),
('20171115193708'),
('20171115202245'),
('20171128201215'),
('20171130160634'),
('20171130224538'),
('20171204204524'),
('20171204204529'),
('20180105213550'),
('20180105213612'),
('20180105213616'),
('20180105220102'),
('20180105220114'),
('20180115221123'),
('20180125182818'),
('20180126154627'),
('20180126155148'),
('20180213235041'),
('20180214001718'),
('20180223193825'),
('20180228194555'),
('20180301203830'),
('20180302195737'),
('20180302195811'),
('20180306221120'),
('20180306221126'),
('20180308191112'),
('20180313201816'),
('20180315205230'),
('20180316193904'),
('20180330145843'),
('20180425175524'),
('20180508164830'),
('20180508175704'),
('20180511142517'),
('20180514135924'),
('20180517173113'),
('20180521215131'),
('20180523154446'),
('20180606173636'),
('20180611153140'),
('20180611154113'),
('20180611154217'),
('20180611154539'),
('20180611154913'),
('20180611154952'),
('20180611155039'),
('20180611155125'),
('20180611155155'),
('20180611185041'),
('20180612171344'),
('20181121162209'),
('20181128164842'),
('20181128181316'),
('20181212195342'),
('20181212195452'),
('20181212195730'),
('20190107211817'),
('20190122175946'),
('20190218193254'),
('20190218193843'),
('20190218193905'),
('20190311170740'),
('20190312160137'),
('20190321221125'),
('20190321221144'),
('20190401164535'),
('20190408155532'),
('20190410204630'),
('20190524145237'),
('20190618150406'),
('20190618150540'),
('20190618150734'),
('20190626142547'),
('20190718201608'),
('20190718211824'),
('20190718212424'),
('20190815175232'),
('20190823173901'),
('20190924182933'),
('20190925184448'),
('20191017210139'),
('20191022195232'),
('20191023190619'),
('20191102191646'),
('20191121163351'),
('20191121201949'),
('20191202170020'),
('20191205154711'),
('20191205165350'),
('20191210003345'),
('20191211170955'),
('20200107152013'),
('20200108230150'),
('20200120192442'),
('20200122034916'),
('20200126212737'),
('20200203221517'),
('20200207181813'),
('20200213035303'),
('20200216234831'),
('20200216234840'),
('20200218231440'),
('20200226150818'),
('20200302033829'),
('20200302034623'),
('20200302040251'),
('20200302040752'),
('20200302041256'),
('20200302041357'),
('20200304032924'),
('20200304192040'),
('20200326193533'),
('20200406200603'),
('20200413161349'),
('20200413162116'),
('20200413164553'),
('20200413165541'),
('20200427153629'),
('20200427155138'),
('20200504222759'),
('20200508213950'),
('20200511203250'),
('20200511203739'),
('20200511203903'),
('20200512172022'),
('20200512174740'),
('20200515160027'),
('20200521180055'),
('20200521181843'),
('20200521191457'),
('20200526160720'),
('20200526220031'),
('20200528051751'),
('20200528141829'),
('20200528192212'),
('20200529140453'),
('20200529143802'),
('20200602170930'),
('20200602175910'),
('20200604175743'),
('20200604180521'),
('20200605155809'),
('20200610021709'),
('20200610021853'),
('20200610022649'),
('20200622210426'),
('20200623162242'),
('20200623185629'),
('20200624171549'),
('20200701214439'),
('20200708211802'),
('20200709211134'),
('20200716042257'),
('20200720175523'),
('20200720180212'),
('20200720180519'),
('20200720182204'),
('20200720183122'),
('20200720184555'),
('20200722173141'),
('20200729185857'),
('20200729211435'),
('20200730193437'),
('20200804212946'),
('20200805142207'),
('20200805155227'),
('20200810193514'),
('20200814204749'),
('20200818183510'),
('20200819194214'),
('20200826180820'),
('20200826202248'),
('20200901154516'),
('20200901155618'),
('20200909040438'),
('20200910183149'),
('20200914192558'),
('20200917204415'),
('20201007215115'),
('20201007215129'),
('20201009164134'),
('20201012163558'),
('20201012163625'),
('20201012163650'),
('20201012170942'),
('20201014210120'),
('20201014210605'),
('20201015215219'),
('20201015230856'),
('20201015231243'),
('20201019163659'),
('20201019164434'),
('20201021162414'),
('20201103203640'),
('20201104174526'),
('20201107024314'),
('20201108223853'),
('20201110031751'),
('20201110032816'),
('20201110201114'),
('20201121014732'),
('20201121020059'),
('20201125044951'),
('20201125045201'),
('20201130180859'),
('20201201011248'),
('20201201011345'),
('20201207184449'),
('20201208175919'),
('20201210211723'),
('20201210211944'),
('20201211051524'),
('20201215023311'),
('20201215023423'),
('20201217212139'),
('20210105014142'),
('20210105043834'),
('20210105052611'),
('20210107191337'),
('20210108174313'),
('20210122230926'),
('20210125171351'),
('20210210202926'),
('20210212035107'),
('20210213022355'),
('20210216220721'),
('20210216225015'),
('20210217191956'),
('20210221220445'),
('20210224214858'),
('20210302003943'),
('20210303201716'),
('20210304235830'),
('20210305154524'),
('20210305182614'),
('20210308181538'),
('20210309060844'),
('20210312012000'),
('20210312190637'),
('20210312190822'),
('20210313084733'),
('20210314030719'),
('20210314210957'),
('20210315185028'),
('20210317220036'),
('20210318173907'),
('20210319041213'),
('20210319041413'),
('20210323152806'),
('20210325191346'),
('20210325191430'),
('20210326210646'),
('20210329141956'),
('20210329162647'),
('20210330164047'),
('20210330174421'),
('20210405022035'),
('20210407195705'),
('20210407195743'),
('20210413175733'),
('20210415150110'),
('20210417182642'),
('20210419174823'),
('20210421201100'),
('20210424221939'),
('20210426180445'),
('20210427203609'),
('20210429171746'),
('20210429211620'),
('20210506194639'),
('20210506212320'),
('20210510154314'),
('20210512153437'),
('20210521164120'),
('20210521202243'),
('20210525154913'),
('20210527164812'),
('20210527191740'),
('20210530180358'),
('20210602195243'),
('20210602205259'),
('20210603181719'),
('20210605210956'),
('20210606051304'),
('20210606223959'),
('20210609170838'),
('20210614011234'),
('20210616204330'),
('20210618045432'),
('20210622141212'),
('20210622161602'),
('20210622165105'),
('20210622174342'),
('20210624164820'),
('20210624174945'),
('20210627030024'),
('20210628023923'),
('20210628024700'),
('20210629185143'),
('20210710012631'),
('20210710211050'),
('20210713171950'),
('20210714145725'),
('20210714203249'),
('20210721035158'),
('20210721193237'),
('20210723154014'),
('20210729165435'),
('20210730174143'),
('20210802165940'),
('20210812163742'),
('20210818034321'),
('20210820192255'),
('20210826192842'),
('20210901181344'),
('20210902044634'),
('20210902151633'),
('20210913160103'),
('20210915043630'),
('20210922140706'),
('20210923201839'),
('20210927153843'),
('20210927154255'),
('20210929181217'),
('20211001142911'),
('20211001203727'),
('20211001213307'),
('20211005152333'),
('20211006144055'),
('20211006203554'),
('20211008033612'),
('20211013151748'),
('20211013160041'),
('20211025162903'),
('20211028160724'),
('20211028175935'),
('20211104203759'),
('20211110201051'),
('20211110204154'),
('20211209170245'),
('20211215210249'),
('20220111220144'),
('20220114175701'),
('20220117212550'),
('20220118183902'),
('20220118190047'),
('20220118191500'),
('20220120173522'),
('20220120202140'),
('20220120202428'),
('20220120222821'),
('20220121180713'),
('20220127205553'),
('20220131180140'),
('20220201231250'),
('20220203153306'),
('20220204180600'),
('20220207222810'),
('20220209181527'),
('20220224200750'),
('20220304155358'),
('20220309225943'),
('20220311200414'),
('20220311233754'),
('20220311233816'),
('20220316190457'),
('20220320183240'),
('20220322182024'),
('20220323024740'),
('20220328192132'),
('20220403234000'),
('20220405151843'),
('20220406190926'),
('20220705171704'),
('20220721005807'),
('20220728181131'),
('20220728214751'),
('20220731161756'),
('20220801001827'),
('20220801143941'),
('20220801194832'),
('20220801213053'),
('20220801225920'),
('20220901152254'),
('20220901163521'),
('20220907221325'),
('20220908154343'),
('20220919164720'),
('20220923164744'),
('20220923171324'),
('20221004145632'),
('20221007180644'),
('20221013205019'),
('20221021222642'),
('20221027211937'),
('20221027212246'),
('20221027212526'),
('20221027221541'),
('20221028193042'),
('20221210021337'),
('20221210233423'),
('20221211182803'),
('20221212025337'),
('20221213212556'),
('20221214185955'),
('20221220233454'),
('20221223232440'),
('20230116215451'),
('20230121004636'),
('20230124203337'),
('20230130220054'),
('20230208182429'),
('20230213215021'),
('20230219002605'),
('20230219025224'),
('20230222202646'),
('20230308003844'),
('20230308010543'),
('20230308011411'),
('20230327193459'),
('20230404150241'),
('20230419183222'),
('20230425154839'),
('20230425205659'),
('20230427154601'),
('20230524210801'),
('20230602192218'),
('20230607174648'),
('20230619171906'),
('20230620201039'),
('20230713205101'),
('20230725170817'),
('20230814221304'),
('20230815191431'),
('20230816160720'),
('20230816160907'),
('20230816161013'),
('20230818201421'),
('20230821141856'),
('20231211232537'),
('20231213191808'),
('20231218155444'),
('20240205162602'),
('20240227155308'),
('20240502185449'),
('20240515145719'),
('20240522210005'),
('20240624153936'),
('20240703170055'),
('20240717013135'),
('20240725014703'),
('20240725014704'),
('20240813214848'),
('20240827180249'),
('20240905170103'),
('20240912174745'),
('20241007175713'),
('20241007181920'),
('20241007185304'),
('20241008212019'),
('20241018203843'),
('20241018204144'),
('20241113200127'),
('20241118164036'),
('20241118165747'),
('20241119181021'),
('20241120222723'),
('20241122212505'),
('20241126153927'),
('20241204194312'),
('20241205214814'),
('20241219211647'),
('20250121174518'),
('20250325164410'),
('20250325192051'),
('20250331152526'),
('20250403203902'),
('20250414162702'),
('20250416204550'),
('20250502174125');


