DROP TABLE IF EXISTS `EnrollFamilies`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `EnrollFamilies` (
  `EnrollFamilyId` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolId` int(11) NOT NULL DEFAULT '0',
  `SchoolYearID` int(11) NOT NULL DEFAULT '0',
  `FamilyID` int(11) NOT NULL DEFAULT '0',
  `New` tinyint(1) NOT NULL DEFAULT '0',
  `Status` int(11) NOT NULL DEFAULT '0',
  `DateTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Comments` text NOT NULL,
  `Amount` float(10,2) NOT NULL DEFAULT '0.00',
  `Finished` int(11) NOT NULL DEFAULT '0',
  `Enrolled` int(11) NOT NULL DEFAULT '0',
  `Completed` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Online` int(11) NOT NULL DEFAULT '0',
  `DiscountPercent` int(11) NOT NULL DEFAULT '0',
  `DiscountAmount` float(10,2) NOT NULL DEFAULT '0.00',
  `Charged` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Portal` int(11) NOT NULL DEFAULT '0',
  `Submitted` int(11) NOT NULL DEFAULT '0',
  `EPID` int(11) NOT NULL,
  `Exempt` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`EnrollFamilyId`),
  KEY `SchollId` (`SchoolId`),
  KEY `SchoolYearID` (`SchoolYearID`),
  KEY `FamilyID` (`FamilyID`),
  KEY `Portal` (`Portal`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `EnrollFamilyCheck`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `EnrollFamilyCheck` (
  `EFCID` int(11) NOT NULL AUTO_INCREMENT,
  `EFID` int(11) NOT NULL DEFAULT '0',
  `ECID` int(11) NOT NULL DEFAULT '0',
  `Status` int(11) NOT NULL DEFAULT '0',
  `DateTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Comments` text NOT NULL,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `FamilyID` int(11) NOT NULL DEFAULT '0',
  `StaffID` int(11) NOT NULL DEFAULT '0',
  `Flagged` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`EFCID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `FamilyID` (`FamilyID`),
  KEY `ECID` (`ECID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `EnrollFamilyProspects`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `EnrollFamilyProspects` (
  `EFPID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `FamilyID` int(11) NOT NULL,
  `CreateDT` datetime NOT NULL,
  `Archived` int(11) NOT NULL DEFAULT '0',
  `SchoolYearID` int(11) NOT NULL DEFAULT '0',
  `ArchivedDT` datetime NOT NULL,
  PRIMARY KEY (`EFPID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `EnrollFamilyTransactions`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `EnrollFamilyTransactions` (
  `EFTID` 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',
  `Sequence` int(11) NOT NULL DEFAULT '0',
  `CCID` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`EFTID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `FamilyID` (`FamilyID`),
  KEY `StudentID` (`StudentID`),
  KEY `CCID` (`CCID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `EnrollFees`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `EnrollFees` (
  `EnrollFeeID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `Description` varchar(64) NOT NULL DEFAULT '',
  `Amount` float(10,2) NOT NULL DEFAULT '0.00',
  PRIMARY KEY (`EnrollFeeID`),
  UNIQUE KEY `TuitionID` (`EnrollFeeID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `EnrollPayments`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `EnrollPayments` (
  `EPID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `FamilyID` int(11) NOT NULL,
  `SchoolYearID` int(11) NOT NULL,
  `AmountCharged` float NOT NULL,
  `AuthCode` int(11) NOT NULL,
  PRIMARY KEY (`EPID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `EnrollStatus`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `EnrollStatus` (
  `ESID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `Item` varchar(32) NOT NULL DEFAULT '',
  `Description` varchar(255) NOT NULL DEFAULT '',
  `Type` int(11) NOT NULL DEFAULT '0' COMMENT 'Fam =1, Student = 2',
  `Sequence` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`ESID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `Type` (`Type`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `EnrollStudentCheck`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `EnrollStudentCheck` (
  `ESCID` int(11) NOT NULL AUTO_INCREMENT,
  `ESID` int(11) NOT NULL DEFAULT '0',
  `ECID` int(11) NOT NULL DEFAULT '0',
  `Status` int(11) NOT NULL DEFAULT '0',
  `DateTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Comments` text NOT NULL,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `FamilyID` int(11) NOT NULL DEFAULT '0',
  `StudentID` int(11) NOT NULL DEFAULT '0',
  `StaffID` int(11) NOT NULL DEFAULT '0',
  `Flagged` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`ESCID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `FamilyID` (`FamilyID`),
  KEY `StudentID` (`StudentID`),
  KEY `ECID` (`ECID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `EnrollStudentClasses`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `EnrollStudentClasses` (
  `ESCID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `SchoolYearID` int(11) NOT NULL,
  `ClassID` int(11) NOT NULL DEFAULT '0',
  `StudentID` int(11) NOT NULL DEFAULT '0',
  UNIQUE KEY `ClassStudentID` (`ESCID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ClassID` (`ClassID`),
  KEY `StudentID` (`StudentID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `EnrollStudents`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `EnrollStudents` (
  `ESID` 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',
  `NewGrade` int(11) NOT NULL DEFAULT '99',
  `NewStudent` int(11) NOT NULL DEFAULT '0',
  `DateTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Comments` text NOT NULL,
  `FamilyID` int(11) NOT NULL DEFAULT '0',
  `TuitionID` int(11) NOT NULL DEFAULT '0',
  `Enrolled` int(11) NOT NULL DEFAULT '0',
  `Status` int(11) NOT NULL DEFAULT '0',
  `Accepted` int(11) NOT NULL DEFAULT '1',
  `Dverified` datetime NOT NULL,
  PRIMARY KEY (`ESID`),
  KEY `EnrollStudentID` (`ESID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `SchoolYearID` (`SchoolYearID`),
  KEY `StudentID` (`StudentID`),
  KEY `FamilyID` (`FamilyID`),
  KEY `NewStudent` (`NewStudent`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `Enrollment`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Enrollment` (
  `EnrollID` int(11) NOT NULL AUTO_INCREMENT,
  `FamilyID` int(11) NOT NULL DEFAULT '0',
  `AFee` int(11) NOT NULL DEFAULT '0',
  `EFee` int(11) NOT NULL DEFAULT '0',
  `Testing` int(11) NOT NULL DEFAULT '0',
  `Recommend` int(11) NOT NULL DEFAULT '0',
  `Interview` int(11) NOT NULL DEFAULT '0',
  `Immunization` int(11) NOT NULL DEFAULT '0',
  `ECard` int(11) NOT NULL DEFAULT '0',
  `Contract` int(11) NOT NULL DEFAULT '0',
  `FamilyCode` varchar(8) NOT NULL DEFAULT '',
  PRIMARY KEY (`EnrollID`),
  KEY `EnrollID` (`EnrollID`),
  KEY `FamilyID` (`FamilyID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `EquipmentCategories`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `EquipmentCategories` (
  `EQID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `Category` varchar(32) NOT NULL,
  PRIMARY KEY (`EQID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `EquipmentInv`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `EquipmentInv` (
  `EQINID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `EQID` int(11) NOT NULL,
  `SportID` int(11) NOT NULL,
  `STID` int(11) NOT NULL COMMENT 'Team ID',
  `Size` int(11) NOT NULL,
  `Color` varchar(32) NOT NULL,
  `Description` varchar(32) NOT NULL,
  `PhotoURL` varchar(255) NOT NULL,
  `DateUpdated` datetime NOT NULL,
  `Source` varchar(32) NOT NULL,
  `DatePurchased` date NOT NULL,
  `Cost` float(10,2) NOT NULL DEFAULT '0.00',
  PRIMARY KEY (`EQINID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `EQID` (`EQID`),
  KEY `SportID` (`SportID`),
  KEY `STID` (`STID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `EquipmentInvItems`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `EquipmentInvItems` (
  `InvItemID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `StudentID` int(11) NOT NULL,
  `UserID` int(11) NOT NULL,
  `Code` int(11) DEFAULT NULL,
  `EQINID` int(11) NOT NULL,
  `EQID` int(11) NOT NULL,
  `STID` int(11) NOT NULL DEFAULT '0',
  `SportID` int(11) NOT NULL DEFAULT '0',
  `CheckedOut` binary(1) NOT NULL DEFAULT '0',
  `ItemCondition` int(1) NOT NULL DEFAULT '1',
  `Comments` varchar(32) NOT NULL,
  `DateIssued` date NOT NULL,
  `DateReturned` date NOT NULL,
  PRIMARY KEY (`InvItemID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `EquipmentTrans`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `EquipmentTrans` (
  `EQTID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `StudentID` int(11) NOT NULL,
  `UserID` int(11) NOT NULL,
  `EQINID` int(11) NOT NULL,
  `EQID` int(11) NOT NULL,
  `DateIssued` datetime NOT NULL,
  `DateReturned` datetime NOT NULL,
  `DateRemoved` datetime NOT NULL,
  PRIMARY KEY (`EQTID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `EventAlarms`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `EventAlarms` (
  `EventAlarmID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `UserID` int(11) NOT NULL DEFAULT '0',
  `EventID` int(11) NOT NULL DEFAULT '0',
  KEY `EventAlarmID` (`EventAlarmID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `UserID` (`UserID`),
  KEY `EventID` (`EventID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `EventCalendars`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `EventCalendars` (
  `ECID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `UserID` int(11) NOT NULL,
  `ClassID` int(11) NOT NULL,
  `Vendor` varchar(32) NOT NULL,
  `Name` varchar(128) NOT NULL,
  `Description` varchar(255) NOT NULL,
  `Syncronize` int(11) NOT NULL DEFAULT '0',
  `BackgroundColor` varchar(8) NOT NULL,
  `ForegroundColor` varchar(8) NOT NULL,
  `PrimaryCalendar` tinyint(4) NOT NULL,
  `TimeZone` varchar(32) NOT NULL,
  `GoogleEtag` varchar(128) NOT NULL,
  `GoogleID` varchar(254) NOT NULL,
  `GoogleWatchUUID` varchar(128) NOT NULL,
  `GoogleWatchResourceID` varchar(128) NOT NULL,
  `Deleted` tinyint(4) NOT NULL,
  PRIMARY KEY (`ECID`),
  UNIQUE KEY `ECID` (`ECID`),
  KEY `CompanyID` (`SchoolID`),
  KEY `UserID` (`UserID`),
  KEY `GoogleID` (`GoogleID`),
  KEY `PrimaryCalendar` (`PrimaryCalendar`),
  KEY `Vendor` (`Vendor`),
  KEY `Syncronize` (`Syncronize`),
  KEY `ClassID` (`ClassID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `EventContacts`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `EventContacts` (
  `ECID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `EventID` int(11) NOT NULL DEFAULT '0',
  `ContactID` int(11) NOT NULL DEFAULT '0',
  `Status` int(11) NOT NULL DEFAULT '0',
  UNIQUE KEY `ECID` (`ECID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `EventID` (`EventID`),
  KEY `ContactID` (`ContactID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `EventEditors`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `EventEditors` (
  `EMID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `UserID` int(11) NOT NULL DEFAULT '0',
  `EditorID` int(11) NOT NULL DEFAULT '0',
  `Type` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`EMID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `UserID` (`UserID`),
  KEY `EditorID` (`EditorID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `EventNotifications`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `EventNotifications` (
  `ENID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `UserID` int(11) NOT NULL DEFAULT '0',
  `EventID` int(11) NOT NULL DEFAULT '0',
  KEY `EventAlarmID` (`ENID`),
  KEY `CompanyID` (`SchoolID`),
  KEY `UserID` (`UserID`),
  KEY `EventID` (`EventID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `EventParticipants`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `EventParticipants` (
  `EPID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `EventID` int(11) NOT NULL DEFAULT '0',
  `ERID` int(11) NOT NULL DEFAULT '0',
  `FirstName` varchar(24) NOT NULL DEFAULT '',
  `LastName` varchar(24) NOT NULL DEFAULT '',
  `Email` varchar(128) NOT NULL DEFAULT '',
  PRIMARY KEY (`EPID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `EventID` (`EventID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `EventProperties`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `EventProperties` (
  `EPID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `EventID` int(11) NOT NULL DEFAULT '0',
  `Status` int(11) NOT NULL DEFAULT '0',
  `MaxAttend` int(11) NOT NULL DEFAULT '0',
  `ManagerID` int(11) NOT NULL DEFAULT '0',
  `Highlight` int(11) NOT NULL DEFAULT '0',
  `Color` varchar(8) NOT NULL DEFAULT '',
  `PhotoID` int(11) NOT NULL DEFAULT '0',
  `PhotoURL` varchar(128) NOT NULL DEFAULT '',
  `Comments` text NOT NULL,
  `Item1` varchar(48) NOT NULL DEFAULT '',
  `Price1` float NOT NULL DEFAULT '0',
  `Item2` varchar(48) NOT NULL DEFAULT '',
  `Price2` float NOT NULL DEFAULT '0',
  `Item3` varchar(48) NOT NULL DEFAULT '',
  `Price3` float NOT NULL DEFAULT '0',
  `Item4` varchar(48) NOT NULL DEFAULT '',
  `Price4` float NOT NULL DEFAULT '0',
  `Item5` varchar(48) NOT NULL DEFAULT '',
  `Price5` float NOT NULL DEFAULT '0',
  `Free` int(11) NOT NULL DEFAULT '0',
  `Invoice` int(11) NOT NULL DEFAULT '0',
  `OffLine` int(11) NOT NULL DEFAULT '0',
  `OLInstructions` text NOT NULL,
  `PayPal` int(11) NOT NULL DEFAULT '0',
  `PayPalEmail` varchar(128) NOT NULL DEFAULT '',
  `PayPalCode` varchar(64) NOT NULL DEFAULT '',
  PRIMARY KEY (`EPID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `EventID` (`EventID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Event Properties for Registration';
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `EventRegistrations`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `EventRegistrations` (
  `ERID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `EventID` int(11) NOT NULL DEFAULT '0',
  `RegistrationDT` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `FirstName` varchar(32) NOT NULL DEFAULT '',
  `LastName` varchar(32) NOT NULL DEFAULT '',
  `CompanyName` varchar(32) NOT NULL DEFAULT '',
  `Phone` varchar(16) NOT NULL DEFAULT '',
  `Email` varchar(128) NOT NULL DEFAULT '',
  `Item1Count` int(11) NOT NULL DEFAULT '0',
  `Item2Count` int(11) NOT NULL DEFAULT '0',
  `Item3Count` int(11) NOT NULL DEFAULT '0',
  `Item4Count` int(11) NOT NULL DEFAULT '0',
  `Item5Count` int(11) NOT NULL DEFAULT '0',
  `PaymentType` int(11) NOT NULL DEFAULT '0',
  `PaymentInfo` varchar(32) NOT NULL DEFAULT '',
  `Confirmation` varchar(16) NOT NULL DEFAULT '',
  `AcctInvID` int(11) NOT NULL,
  `Finalized` int(11) NOT NULL DEFAULT '0',
  `PaymentNotes` text NOT NULL,
  PRIMARY KEY (`ERID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `EventID` (`EventID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `EventUsers`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `EventUsers` (
  `EventUserID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `ClassID` int(11) NOT NULL DEFAULT '0',
  `EventID` int(11) NOT NULL DEFAULT '0',
  `UserID` int(11) NOT NULL DEFAULT '0',
  `StudentID` int(11) NOT NULL,
  `Status` int(11) NOT NULL DEFAULT '0',
  `HHID` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`EventUserID`),
  KEY `EventUserID` (`EventUserID`),
  KEY `EventID` (`EventID`),
  KEY `UserID` (`UserID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ClassID` (`ClassID`),
  KEY `EventUsers` (`SchoolID`,`EventID`,`UserID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `EventVolunteers`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `EventVolunteers` (
  `EVID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `ClassID` int(11) NOT NULL,
  `EventID` int(11) NOT NULL DEFAULT '0',
  `Type` int(11) NOT NULL COMMENT '1=ToDo, 2=ToBring',
  `Description` varchar(64) NOT NULL,
  `UserID` int(11) NOT NULL,
  `Name` varchar(24) NOT NULL DEFAULT '',
  `Email` varchar(255) NOT NULL DEFAULT '',
  `SOID` int(11) NOT NULL COMMENT 'Sevice Opp ID',
  `SLID` int(11) NOT NULL,
  PRIMARY KEY (`EVID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `EventID` (`EventID`),
  KEY `ClassID` (`ClassID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `Events`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Events` (
  `EventID` int(11) NOT NULL AUTO_INCREMENT,
  `EventParentID` int(11) NOT NULL DEFAULT '0',
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `ClassID` int(11) NOT NULL DEFAULT '0',
  `ExternalID` varchar(64) NOT NULL,
  `DateTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Date` date NOT NULL DEFAULT '0000-00-00',
  `Hour` int(11) NOT NULL DEFAULT '0',
  `Minute` int(11) NOT NULL DEFAULT '0',
  `ShortDescription` varchar(20) NOT NULL DEFAULT '',
  `Description` varchar(64) NOT NULL DEFAULT '',
  `EType` int(11) NOT NULL DEFAULT '0',
  `Notes` text NOT NULL,
  `Length` int(11) NOT NULL DEFAULT '0',
  `AllDay` int(11) NOT NULL DEFAULT '0',
  `Internal` int(11) NOT NULL DEFAULT '0',
  `Public` int(11) NOT NULL DEFAULT '0',
  `Private` int(11) NOT NULL DEFAULT '0',
  `PeriodID` int(11) NOT NULL DEFAULT '0',
  `Approved` int(11) NOT NULL DEFAULT '0',
  `AuthorID` int(11) NOT NULL DEFAULT '0',
  `Created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Updated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `FacilityID` int(11) DEFAULT NULL,
  `Location` varchar(128) NOT NULL DEFAULT '',
  `FacilityApproval` int(11) NOT NULL DEFAULT '0',
  `Exposure` int(11) NOT NULL DEFAULT '0',
  `CategoryID` int(11) NOT NULL DEFAULT '0',
  `Canceled` int(11) NOT NULL DEFAULT '0',
  `Deleted` int(11) NOT NULL DEFAULT '0',
  `Initiated` int(11) NOT NULL DEFAULT '0',
  `Managed` int(11) NOT NULL DEFAULT '0',
  `Volunteer` int(11) NOT NULL,
  `ECID` int(11) NOT NULL,
  `Vendor` varchar(16) NOT NULL,
  `GoogleID` varchar(128) NOT NULL,
  `GoogleSequence` tinyint(4) NOT NULL DEFAULT '1',
  `GoogleHtmlLink` varchar(128) NOT NULL,
  UNIQUE KEY `EventID` (`EventID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ClassID` (`ClassID`),
  KEY `DateTime` (`DateTime`),
  KEY `AuthorID` (`AuthorID`),
  KEY `EventParentID` (`EventParentID`),
  KEY `Search` (`SchoolID`,`ClassID`,`DateTime`,`Exposure`,`Deleted`),
  KEY `CategoryID` (`CategoryID`),
  KEY `Exposure` (`Exposure`),
  KEY `Date` (`Date`),
  KEY `Deleted` (`Deleted`),
  KEY `FacilityID` (`FacilityID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `Facility`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Facility` (
  `FacilityID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `BuildingID` int(11) DEFAULT NULL,
  `Number` varchar(10) NOT NULL DEFAULT '0',
  `Name` varchar(32) NOT NULL DEFAULT '',
  `Capacity` int(11) NOT NULL DEFAULT '0',
  `Description` varchar(128) NOT NULL DEFAULT '',
  `PictureFile` varchar(32) NOT NULL DEFAULT '',
  `OwnerID` int(11) DEFAULT NULL,
  `Alert` int(11) NOT NULL DEFAULT '0',
  `Notes` text NOT NULL,
  UNIQUE KEY `FacilitiyID_2` (`FacilityID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `BuildingID` (`BuildingID`),
  KEY `Number` (`Number`),
  KEY `Name` (`Name`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `FacilityBuildings`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `FacilityBuildings` (
  `BuildingID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `LocationID` int(11) DEFAULT NULL,
  `Number` int(16) NOT NULL DEFAULT '0',
  `Name` varchar(32) NOT NULL DEFAULT '',
  `Address1` varchar(32) NOT NULL DEFAULT '',
  `Address2` varchar(32) NOT NULL DEFAULT '',
  `City` varchar(32) NOT NULL DEFAULT '',
  `State` char(2) NOT NULL DEFAULT '',
  `Zip` varchar(10) NOT NULL DEFAULT '',
  `Capacity` int(11) NOT NULL DEFAULT '0',
  `Description` varchar(128) NOT NULL DEFAULT '',
  `PictureFile` varchar(128) NOT NULL DEFAULT '',
  `OwnerID` int(11) DEFAULT NULL,
  `Alert` int(11) NOT NULL DEFAULT '0',
  `Notes` text NOT NULL,
  UNIQUE KEY `BuildingID_2` (`BuildingID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `Number` (`Number`),
  KEY `Name` (`Name`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `FacilityLocations`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `FacilityLocations` (
  `LocationID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `Number` int(16) NOT NULL DEFAULT '0',
  `Name` varchar(32) NOT NULL DEFAULT '',
  `Address1` varchar(32) NOT NULL DEFAULT '',
  `Address2` varchar(32) NOT NULL DEFAULT '',
  `City` varchar(32) NOT NULL DEFAULT '',
  `State` char(2) NOT NULL DEFAULT '',
  `Zip` varchar(10) NOT NULL DEFAULT '',
  `Description` varchar(128) NOT NULL DEFAULT '',
  `PictureFile` varchar(32) NOT NULL DEFAULT '',
  `OwnerID` int(11) DEFAULT NULL,
  `Alert` int(11) NOT NULL DEFAULT '0',
  `Notes` text NOT NULL,
  UNIQUE KEY `BuildingID_2` (`LocationID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `Name` (`Name`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `FacilityMemos`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `FacilityMemos` (
  `FNID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `EventID` int(11) NOT NULL DEFAULT '0',
  `Memo` text NOT NULL,
  PRIMARY KEY (`FNID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `Families`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Families` (
  `FamilyID` int(11) NOT NULL AUTO_INCREMENT,
  `Name` varchar(64) NOT NULL DEFAULT '',
  `FormalName` varchar(64) NOT NULL DEFAULT '',
  `BillingName` varchar(32) NOT NULL DEFAULT '',
  `Memo` varchar(64) NOT NULL DEFAULT '',
  `SecretWord` varchar(32) NOT NULL DEFAULT '',
  `UserID` int(11) NOT NULL DEFAULT '0',
  `FirstName1` varchar(16) NOT NULL DEFAULT '',
  `LastName1` varchar(24) NOT NULL DEFAULT '',
  `Address1` varchar(64) NOT NULL,
  `Address1B` varchar(64) NOT NULL,
  `City1` varchar(32) NOT NULL DEFAULT '',
  `County` varchar(255) DEFAULT NULL,
  `State1` varchar(32) NOT NULL,
  `Zip1` varchar(10) NOT NULL DEFAULT '',
  `Country1` varchar(255) NOT NULL DEFAULT '',
  `country_id` bigint(20) DEFAULT NULL,
  `DistrictCode` varchar(24) NOT NULL DEFAULT '',
  `HomePhone1` varchar(16) NOT NULL DEFAULT '',
  `WorkPhone1` varchar(16) NOT NULL DEFAULT '',
  `CellPhone1` varchar(16) NOT NULL DEFAULT '',
  `FirstName2` varchar(16) NOT NULL DEFAULT '',
  `LastName2` varchar(23) NOT NULL DEFAULT '',
  `Address2` varchar(64) NOT NULL DEFAULT '',
  `Address2B` varchar(64) NOT NULL DEFAULT '',
  `City2` varchar(32) NOT NULL DEFAULT '',
  `State2` varchar(32) NOT NULL,
  `Zip2` varchar(10) NOT NULL DEFAULT '',
  `Country2` varchar(255) NOT NULL DEFAULT '',
  `country_2_id` bigint(20) DEFAULT NULL,
  `HomePhone2` varchar(16) NOT NULL DEFAULT '',
  `WorkPhone2` varchar(16) NOT NULL DEFAULT '',
  `CellPhone2` varchar(16) NOT NULL DEFAULT '',
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `Password` varchar(16) NOT NULL DEFAULT '',
  `FamilyStatusID` int(11) NOT NULL DEFAULT '0',
  `Login` int(11) NOT NULL DEFAULT '0',
  `FamilyCode` varchar(8) NOT NULL DEFAULT '',
  `Status1` int(11) NOT NULL DEFAULT '0',
  `Status2` int(11) NOT NULL DEFAULT '0',
  `PayPlanID` int(11) NOT NULL DEFAULT '0',
  `Relationship1` int(11) NOT NULL DEFAULT '0',
  `Relationship2` int(11) NOT NULL DEFAULT '0',
  `Title1` int(11) NOT NULL DEFAULT '0',
  `Title2` int(11) NOT NULL DEFAULT '0',
  `Directory` int(11) NOT NULL DEFAULT '1',
  `DirectoryAddress` int(11) NOT NULL DEFAULT '0',
  `DirectoryPhone` int(11) NOT NULL DEFAULT '0',
  `DirectoryEmail` int(11) NOT NULL DEFAULT '1',
  `DirectoryCell` int(11) NOT NULL DEFAULT '1',
  `RelOther1` varchar(32) NOT NULL DEFAULT '',
  `RelOther2` varchar(32) NOT NULL DEFAULT '',
  `Occupation1` int(11) NOT NULL DEFAULT '0',
  `Occupation2` int(11) NOT NULL DEFAULT '0',
  `Company1` varchar(32) NOT NULL DEFAULT '',
  `Company2` varchar(32) NOT NULL DEFAULT '',
  `user_id` varchar(32) NOT NULL DEFAULT '',
  `Current` int(11) NOT NULL DEFAULT '0',
  `LastLogin` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `LoginCount` int(11) NOT NULL DEFAULT '0',
  `NotifyEMail` int(11) NOT NULL DEFAULT '1',
  `AuthorID` int(11) NOT NULL DEFAULT '0',
  `Created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `MessengerID` int(11) NOT NULL DEFAULT '0',
  `ExtID` varchar(16) NOT NULL DEFAULT '',
  `Pickup` text NOT NULL,
  `AdvisorID` int(11) NOT NULL,
  `Notifications` int(11) NOT NULL DEFAULT '3',
  `MaritalStatus` int(1) NOT NULL DEFAULT '0' COMMENT '1=m,2=sp,3=d,4=rm,5=w,6=si',
  PRIMARY KEY (`FamilyID`),
  KEY `FamilyCode` (`FamilyCode`),
  KEY `Current` (`Current`),
  KEY `SchoolID` (`SchoolID`),
  KEY `LastName1` (`LastName1`),
  KEY `Name` (`Name`),
  KEY `FormalName` (`FormalName`),
  KEY `index_Families_on_country_id` (`country_id`),
  KEY `index_Families_on_country_2_id` (`country_2_id`),
  CONSTRAINT `fk_rails_3d97da9137` FOREIGN KEY (`country_id`) REFERENCES `iso_countries` (`id`),
  CONSTRAINT `fk_rails_5649ca8567` 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 `FamilyAccounts`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `FamilyAccounts` (
  `AcctID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `Number` int(11) NOT NULL DEFAULT '0',
  `Name` varchar(32) NOT NULL DEFAULT '',
  `Description` varchar(64) NOT NULL DEFAULT '',
  `AccountID` int(11) NOT NULL COMMENT 'School Account',
  `Viewable` int(11) NOT NULL DEFAULT '1',
  `Archived` int(11) NOT NULL,
  PRIMARY KEY (`AcctID`),
  UNIQUE KEY `AcctID_2` (`AcctID`),
  KEY `AcctID` (`AcctID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `FamilyBillings`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `FamilyBillings` (
  `FamilyBillingID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `FamilyID` int(11) NOT NULL DEFAULT '0',
  `Amount` float NOT NULL DEFAULT '0',
  `ChargeAmount` float(10,2) NOT NULL,
  `CreditAmount` float(10,2) NOT NULL,
  `Month` int(11) NOT NULL DEFAULT '0',
  `Year` int(11) NOT NULL DEFAULT '0',
  `BilledDateTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `CreateDateTime` datetime NOT NULL,
  `PaidedDateTime` datetime NOT NULL,
  `TID` int(11) NOT NULL DEFAULT '0',
  `MBID` int(11) NOT NULL DEFAULT '0',
  `AuthorID` int(11) NOT NULL,
  `AcctInvID` int(11) NOT NULL COMMENT 'Account Invoice ID',
  `AcctCCID` int(11) NOT NULL COMMENT 'AcctCC ID',
  `BillingStatus` int(11) NOT NULL,
  `BillingNotes` varchar(64) NOT NULL,
  PRIMARY KEY (`FamilyBillingID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `FamilyID` (`FamilyID`),
  KEY `Month` (`Month`),
  KEY `Year` (`Year`),
  KEY `MBID` (`MBID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `FamilyChargeItems`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `FamilyChargeItems` (
  `FCIID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `FamilyID` int(11) NOT NULL,
  `StudentID` int(11) NOT NULL,
  `MBID` int(11) NOT NULL,
  `Title` varchar(32) NOT NULL,
  `TotalAmount` float(10,2) NOT NULL,
  `AcctID` int(11) NOT NULL COMMENT 'Family Account ID',
  `AChargeID` int(11) NOT NULL COMMENT 'Common Charge ID',
  `ChargeName` varchar(64) NOT NULL,
  `ChargeAmount` float(10,2) NOT NULL,
  `ACreditID` int(11) NOT NULL COMMENT 'Common Credit ID',
  `CreditName` varchar(64) NOT NULL,
  `CreditAmount` float(10,2) NOT NULL,
  PRIMARY KEY (`FCIID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `FamilyID` (`FamilyID`),
  KEY `StudentID` (`StudentID`),
  KEY `MBID` (`MBID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `FamilyCharges`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `FamilyCharges` (
  `MBID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `FamilyID` int(11) NOT NULL DEFAULT '0',
  `Status` int(11) NOT NULL,
  `OnHold` int(11) NOT NULL,
  `Name` varchar(32) NOT NULL DEFAULT '',
  `Line1` varchar(64) NOT NULL DEFAULT '',
  `Line2` varchar(64) NOT NULL DEFAULT '',
  `Line3` varchar(64) NOT NULL DEFAULT '',
  `Line4` varchar(64) NOT NULL DEFAULT '',
  `Line5` varchar(64) NOT NULL DEFAULT '',
  `Amount1` float NOT NULL DEFAULT '0',
  `Amount2` float NOT NULL DEFAULT '0',
  `Amount3` float NOT NULL DEFAULT '0',
  `Amount4` float NOT NULL DEFAULT '0',
  `Amount5` float NOT NULL DEFAULT '0',
  `CC1ID` int(11) NOT NULL,
  `CC2ID` int(11) NOT NULL,
  `CC3ID` int(11) NOT NULL,
  `CC4ID` int(11) NOT NULL,
  `CC5ID` int(11) NOT NULL,
  `DayofMonth` tinyint(4) NOT NULL,
  `January` int(11) NOT NULL DEFAULT '0',
  `February` int(11) NOT NULL DEFAULT '0',
  `March` int(11) NOT NULL DEFAULT '0',
  `April` int(11) NOT NULL DEFAULT '0',
  `May` int(11) NOT NULL DEFAULT '0',
  `June` int(11) NOT NULL DEFAULT '0',
  `July` int(11) NOT NULL DEFAULT '0',
  `August` int(11) NOT NULL DEFAULT '0',
  `September` int(11) NOT NULL DEFAULT '0',
  `October` int(11) NOT NULL DEFAULT '0',
  `November` int(11) NOT NULL DEFAULT '0',
  `December` int(11) NOT NULL DEFAULT '0',
  `Memo` text NOT NULL,
  `StartDate` date NOT NULL DEFAULT '0000-00-00',
  `StopDate` date NOT NULL,
  `FPOID` int(11) NOT NULL DEFAULT '0' COMMENT 'Family Payment Opion ID',
  `APMID` int(11) NOT NULL COMMENT 'Account Payment Method ID',
  `VaultID` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`MBID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `FamilyID` (`FamilyID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `FamilyDeposits`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `FamilyDeposits` (
  `FDID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `FamilyID` int(11) NOT NULL DEFAULT '0',
  `AcctCCID` int(11) NOT NULL,
  `AcctDWID` int(11) NOT NULL,
  `Date` date NOT NULL DEFAULT '0000-00-00',
  `Amount` float(10,2) NOT NULL DEFAULT '0.00',
  `Comments` varchar(255) NOT NULL DEFAULT '',
  `PaymentMethod` int(11) NOT NULL,
  `CheckNum` varchar(16) NOT NULL,
  `AuthorID` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`FDID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `FamilyID` (`FamilyID`),
  KEY `AcctCCID` (`AcctCCID`),
  KEY `AcctDWID` (`AcctDWID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `FamilyEnroll`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `FamilyEnroll` (
  `FamilyEnrollID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `FamilyID` tinyint(4) NOT NULL DEFAULT '0',
  `RegFee` int(11) DEFAULT '0',
  `RegFeeDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `RegFeeID` varchar(12) NOT NULL DEFAULT '',
  `RegFeeTxt` varchar(32) NOT NULL DEFAULT '',
  `RegForm` int(11) NOT NULL DEFAULT '0',
  `RegFormDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `RegFormID` varchar(12) NOT NULL DEFAULT '',
  `RegFormTxt` varchar(32) NOT NULL DEFAULT '',
  `Pastor` int(11) NOT NULL DEFAULT '0',
  `PastorID` varchar(12) NOT NULL DEFAULT '',
  `PastorTxt` varchar(32) NOT NULL DEFAULT '',
  `EnrollFee` int(11) NOT NULL DEFAULT '0',
  `EnrollFeeDate` date NOT NULL DEFAULT '0000-00-00',
  `EnrollFeeID` varchar(12) NOT NULL DEFAULT '',
  `Interview` int(11) NOT NULL DEFAULT '0',
  `InterviewDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `InterviewID` varchar(12) NOT NULL DEFAULT '',
  `InterviewTxt` varchar(32) NOT NULL DEFAULT '',
  `Contract` int(11) NOT NULL DEFAULT '0',
  `ContractDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `ContractID` varchar(12) NOT NULL DEFAULT '',
  `ContractTxt` varchar(32) NOT NULL DEFAULT '',
  `EnrollFeeTxt` varchar(32) NOT NULL DEFAULT '',
  `Payment` int(11) NOT NULL DEFAULT '0',
  `PaymentDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `PaymentID` int(11) NOT NULL DEFAULT '0',
  `PaymentTxt` varchar(32) NOT NULL DEFAULT '',
  `PastorDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Students` int(11) NOT NULL DEFAULT '0',
  `StudentsDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `StudentsID` varchar(16) NOT NULL DEFAULT '',
  `StudentsTxt` varchar(32) NOT NULL DEFAULT '',
  PRIMARY KEY (`FamilyEnrollID`),
  UNIQUE KEY `FamilyEnrollID` (`FamilyEnrollID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `FamilyID` (`FamilyID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `FamilyLogs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `FamilyLogs` (
  `FLID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `FamilyID` int(11) NOT NULL,
  `UserID` int(11) NOT NULL,
  `Updated` datetime NOT NULL,
  `Application` varchar(32) NOT NULL,
  PRIMARY KEY (`FLID`),
  KEY `SchoolID` (`SchoolID`,`Updated`),
  KEY `FamilyID` (`FamilyID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `FamilyMed`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `FamilyMed` (
  `FamilyMedID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `FamilyID` int(11) NOT NULL DEFAULT '0',
  `Physician` varchar(64) NOT NULL DEFAULT '',
  `PhysicianNumber` varchar(16) NOT NULL DEFAULT '',
  `PhysicianAddress1` varchar(128) NOT NULL DEFAULT '',
  `PhysicianAddress2` varchar(128) NOT NULL DEFAULT '',
  `PhysicianCity` varchar(32) NOT NULL DEFAULT '',
  `PhysicianState` varchar(32) NOT NULL,
  `PhysicianZip` varchar(10) NOT NULL DEFAULT '',
  `physician_country_id` bigint(20) DEFAULT NULL,
  `Dentist` varchar(64) NOT NULL DEFAULT '',
  `DentistNumber` varchar(16) NOT NULL DEFAULT '',
  `DentistAddress1` varchar(128) NOT NULL DEFAULT '',
  `DentistAddress2` varchar(128) NOT NULL DEFAULT '',
  `DentistCity` varchar(32) NOT NULL DEFAULT '',
  `DentistState` varchar(32) NOT NULL,
  `DentistZip` varchar(10) NOT NULL DEFAULT '',
  `dentist_country_id` bigint(20) DEFAULT NULL,
  `InsuranceCompany` varchar(32) NOT NULL DEFAULT '',
  `InsurancePlan` varchar(128) NOT NULL DEFAULT '',
  `InsuranceGroup` varchar(24) NOT NULL DEFAULT '',
  `Hospital` varchar(64) NOT NULL DEFAULT '',
  `MedicalComments` text NOT NULL,
  PRIMARY KEY (`FamilyMedID`),
  KEY `FamilyMedID` (`FamilyMedID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `FamilyID` (`FamilyID`),
  KEY `index_FamilyMed_on_physician_country_id` (`physician_country_id`),
  KEY `index_FamilyMed_on_dentist_country_id` (`dentist_country_id`),
  CONSTRAINT `fk_rails_0dc6d9a992` FOREIGN KEY (`physician_country_id`) REFERENCES `iso_countries` (`id`),
  CONSTRAINT `fk_rails_7bb3a8e1e2` FOREIGN KEY (`dentist_country_id`) REFERENCES `iso_countries` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `FamilyNotes`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `FamilyNotes` (
  `FamilyNotesID` 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',
  `StaffID` int(11) NOT NULL DEFAULT '0',
  `Comments` text NOT NULL,
  `Subject` varchar(32) NOT NULL DEFAULT '',
  `Flagged` int(11) NOT NULL DEFAULT '0',
  `Expire` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `AuthorID` int(11) NOT NULL DEFAULT '0',
  `UpdateAuthorID` int(11) NOT NULL DEFAULT '0',
  `UpdateDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  PRIMARY KEY (`FamilyNotesID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `FamilyID` (`FamilyID`),
  KEY `StudentID` (`StudentID`),
  KEY `Date` (`Date`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `FamilyParents`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `FamilyParents` (
  `FamilyParentID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `FamilyID` int(11) NOT NULL DEFAULT '0',
  `ContactID` int(11) NOT NULL DEFAULT '0',
  `RelationshipID` int(11) NOT NULL DEFAULT '0',
  `PrimaryParent` int(11) NOT NULL DEFAULT '0',
  `Emergency` int(11) NOT NULL DEFAULT '0',
  `Pickup` int(11) NOT NULL COMMENT 'Authorized Pickup ContactID',
  `PIN` int(4) NOT NULL DEFAULT '1234',
  PRIMARY KEY (`FamilyParentID`),
  UNIQUE KEY `SchoolID` (`SchoolID`,`FamilyID`,`ContactID`),
  KEY `FamilyID` (`FamilyID`),
  KEY `PrimaryParent` (`PrimaryParent`),
  KEY `ContactID` (`ContactID`),
  KEY `Pickup` (`Pickup`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `FamilyPaymentOptions`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `FamilyPaymentOptions` (
  `FPOID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `FamilyID` int(11) NOT NULL,
  `Type` int(11) NOT NULL COMMENT '1=Cash,2=ACH,3=Credit',
  `SubType` int(11) NOT NULL,
  `Label` varchar(32) NOT NULL,
  `ServiceID` int(11) NOT NULL,
  PRIMARY KEY (`FPOID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `FamilyID` (`FamilyID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Family Payment Options';
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `FamilyStatisticChoices`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `FamilyStatisticChoices` (
  `FSCID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `FSID` int(11) NOT NULL,
  `Sequence` int(11) NOT NULL,
  `Value` varchar(16) NOT NULL,
  `Label` varchar(48) NOT NULL,
  PRIMARY KEY (`FSCID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `FSID` (`FSID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `FamilyStatisticGroups`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `FamilyStatisticGroups` (
  `FSGID` 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',
  PRIMARY KEY (`FSGID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `FamilyStatisticValues`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `FamilyStatisticValues` (
  `FSVID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `FamilyID` int(11) NOT NULL DEFAULT '0',
  `FSID` int(11) NOT NULL DEFAULT '0',
  `Value` varchar(255) NOT NULL DEFAULT '',
  `ValueDate` date DEFAULT '0000-00-00',
  PRIMARY KEY (`FSVID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `FamilyID` (`FamilyID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `FamilyStatistics`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `FamilyStatistics` (
  `FSID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `FSGID` int(11) NOT NULL,
  `Sequence` int(11) NOT NULL DEFAULT '0',
  `Name` varchar(32) NOT NULL DEFAULT '',
  `Type` int(11) NOT NULL DEFAULT '1',
  `Description` varchar(255) NOT NULL DEFAULT '',
  `Public` int(11) NOT NULL DEFAULT '0',
  `Profile` int(11) NOT NULL,
  `Admissions` int(11) NOT NULL DEFAULT '0',
  `Inquiries` int(11) NOT NULL,
  `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 (`FSID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `Sequence` (`Sequence`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `FamilyTransactions`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `FamilyTransactions` (
  `TID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `AcctID` int(11) NOT NULL DEFAULT '0' COMMENT 'Family Account ID',
  `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',
  `RealDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Amount` float(10,2) NOT NULL DEFAULT '0.00',
  `Comments` varchar(128) NOT NULL DEFAULT '',
  `AuthorID` int(11) NOT NULL DEFAULT '0',
  `PaymentMethod` int(11) NOT NULL DEFAULT '0',
  `CheckNum` int(11) NOT NULL DEFAULT '0',
  `Cleared` int(4) NOT NULL DEFAULT '0',
  `AcctInvID` int(11) NOT NULL DEFAULT '0',
  `ACID` int(11) NOT NULL DEFAULT '0' COMMENT 'Account Common Charge ID',
  `ACommonCreditID` int(11) NOT NULL COMMENT 'Account Common Credit ID',
  `Quantity` int(11) NOT NULL DEFAULT '1',
  `FDID` int(11) NOT NULL DEFAULT '0',
  `FBID` int(11) NOT NULL COMMENT 'Family Billing ID',
  `ATID` int(11) NOT NULL,
  PRIMARY KEY (`TID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `FamilyID` (`FamilyID`),
  KEY `AcctID` (`AcctID`),
  KEY `StudentID` (`StudentID`),
  KEY `FBID` (`FBID`),
  KEY `FDID` (`FDID`),
  KEY `ATID` (`ATID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `FinancialAid`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `FinancialAid` (
  `FinancialAidID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `Year` int(11) NOT NULL DEFAULT '0',
  `FamilyContribution` int(11) NOT NULL DEFAULT '0',
  `AGI` int(11) NOT NULL DEFAULT '0',
  `GrantAmount` int(11) NOT NULL DEFAULT '0',
  `GrantPercent` int(11) NOT NULL DEFAULT '0',
  `FamilyCode` varchar(8) NOT NULL DEFAULT '',
  `AidID` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`FinancialAidID`),
  UNIQUE KEY `FinancialAidID` (`FinancialAidID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `FamilyCode` (`FamilyCode`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `FinancialAidSources`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `FinancialAidSources` (
  `AidID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `SourceName` varchar(32) NOT NULL DEFAULT '',
  `Abbr` varchar(5) NOT NULL DEFAULT '',
  `Comments` varchar(255) NOT NULL DEFAULT '',
  PRIMARY KEY (`AidID`),
  UNIQUE KEY `AidID` (`AidID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `Flash`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Flash` (
  `FlashID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `ClassID` int(11) NOT NULL DEFAULT '0',
  `Start` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `Stop` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `HeadLine` varchar(32) NOT NULL DEFAULT '',
  `Message` text NOT NULL,
  `AuthorID` int(11) NOT NULL DEFAULT '0',
  `Internal` int(11) NOT NULL DEFAULT '0',
  UNIQUE KEY `NewsID` (`FlashID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ClassID` (`ClassID`),
  KEY `Start` (`Start`),
  KEY `Stop` (`Stop`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `FlashAds`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `FlashAds` (
  `FlashAdID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `ClassID` int(11) NOT NULL DEFAULT '0',
  `Start` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `Stop` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `HeadLine` varchar(32) NOT NULL DEFAULT '',
  `Message` text NOT NULL,
  `URL` varchar(128) NOT NULL,
  `AuthorID` int(11) NOT NULL DEFAULT '0',
  `Internal` int(11) NOT NULL DEFAULT '0',
  UNIQUE KEY `NewsID` (`FlashAdID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ClassID` (`ClassID`),
  KEY `Start` (`Start`),
  KEY `Stop` (`Stop`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `Form`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Form` (
  `FormID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `ClassID` int(11) NOT NULL DEFAULT '0',
  `DateTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Name` varchar(32) NOT NULL DEFAULT '',
  `Description` varchar(128) NOT NULL DEFAULT '',
  `FolderID` int(11) NOT NULL DEFAULT '0',
  `Color` varchar(8) NOT NULL DEFAULT '',
  `AuthorUID` int(11) NOT NULL DEFAULT '0',
  `PANID` int(11) NOT NULL DEFAULT '0',
  `EmailID` int(11) NOT NULL DEFAULT '0',
  `Active` int(11) NOT NULL DEFAULT '0',
  `Internal` int(11) NOT NULL DEFAULT '0',
  `Public` int(11) NOT NULL DEFAULT '0',
  `Height` int(11) NOT NULL DEFAULT '0',
  `Width` int(11) NOT NULL DEFAULT '0',
  `NextFormID` int(11) NOT NULL DEFAULT '0',
  `Alert` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`FormID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ClassID` (`ClassID`),
  KEY `Active` (`Active`),
  KEY `Alert` (`Alert`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `FormData`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `FormData` (
  `FormDataID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `UserID` int(11) NOT NULL DEFAULT '0',
  `FormID` int(11) NOT NULL DEFAULT '0',
  `FormEntryID` int(11) NOT NULL DEFAULT '0',
  `FormFieldID` int(11) NOT NULL DEFAULT '0',
  `TextField` longtext NOT NULL,
  `LongTextField` text NOT NULL,
  `DateField` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `CheckBoxField` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`FormDataID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `FormID` (`FormID`),
  KEY `FormEntryID` (`FormEntryID`),
  KEY `FormFieldID` (`FormFieldID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `FormEntry`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `FormEntry` (
  `FormEntryID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `FormID` int(11) NOT NULL DEFAULT '0',
  `Date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `UserID` int(11) NOT NULL DEFAULT '0',
  `Verified` int(11) NOT NULL DEFAULT '0',
  `VerifiedDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Verifier` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`FormEntryID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `FormID` (`FormID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `FormFields`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `FormFields` (
  `FormFieldID` int(11) NOT NULL AUTO_INCREMENT,
  `FormID` int(11) NOT NULL DEFAULT '0',
  `Label` varchar(64) NOT NULL DEFAULT '',
  `Description` varchar(128) NOT NULL DEFAULT '',
  `Type` int(11) NOT NULL DEFAULT '0',
  `Length` int(11) NOT NULL DEFAULT '0',
  `Sequence` int(11) NOT NULL DEFAULT '0',
  `Align` varchar(10) NOT NULL DEFAULT '',
  `FieldRows` int(11) NOT NULL DEFAULT '0',
  `Cols` int(11) NOT NULL DEFAULT '0',
  `Content` text NOT NULL,
  `Bold` int(11) NOT NULL DEFAULT '0',
  `Italic` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`FormFieldID`),
  KEY `FormID` (`FormID`),
  KEY `Sequence` (`Sequence`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `FormFolders`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `FormFolders` (
  `FormFolderID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `ClassID` int(11) NOT NULL DEFAULT '0',
  `Name` varchar(32) NOT NULL DEFAULT '',
  `Description` varchar(128) NOT NULL DEFAULT '',
  `Internal` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`FormFolderID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ClassID` (`ClassID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `Forum`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Forum` (
  `FID` int(11) NOT NULL AUTO_INCREMENT,
  `FPID` int(11) NOT NULL DEFAULT '0',
  `FBID` int(11) NOT NULL DEFAULT '0',
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `ClassID` int(11) NOT NULL DEFAULT '0',
  `CreateDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `UserID` int(11) NOT NULL DEFAULT '0',
  `Topic` varchar(128) NOT NULL DEFAULT '',
  `Message` text NOT NULL,
  PRIMARY KEY (`FID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ClassID` (`ClassID`),
  KEY `FPID` (`FPID`),
  KEY `FBID` (`FBID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `ForumBoard`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ForumBoard` (
  `FBID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `ClassID` int(11) NOT NULL DEFAULT '0',
  `Name` varchar(128) NOT NULL DEFAULT '',
  `Description` varchar(255) NOT NULL DEFAULT '',
  PRIMARY KEY (`FBID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ClassID` (`ClassID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `ForumCount`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ForumCount` (
  `FCID` int(11) NOT NULL AUTO_INCREMENT,
  `FID` int(11) NOT NULL DEFAULT '0',
  `StaffID` int(11) NOT NULL DEFAULT '0',
  `DateTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  PRIMARY KEY (`FCID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `Goals`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Goals` (
  `GoalID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `ClassID` int(11) NOT NULL DEFAULT '0',
  `Active` int(11) NOT NULL DEFAULT '0',
  `Description` varchar(255) NOT NULL DEFAULT '',
  `Goal` int(11) NOT NULL DEFAULT '0',
  `Current` int(11) NOT NULL DEFAULT '0',
  `UserID` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`GoalID`),
  UNIQUE KEY `GoalID` (`GoalID`),
  KEY `GoalID_2` (`GoalID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `GoogleAssignments`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `GoogleAssignments` (
  `GAID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `ClassID` int(11) NOT NULL,
  `CAID` int(11) NOT NULL,
  `GoogleID` varchar(128) NOT NULL,
  `GoogleLink` varchar(128) NOT NULL,
  `Title` varchar(128) NOT NULL DEFAULT '',
  `Description` text NOT NULL,
  `WorkType` int(11) NOT NULL,
  `DueDateTime` datetime NOT NULL,
  `State` int(11) NOT NULL,
  `MaxPoints` int(11) NOT NULL,
  `AttachmentCount` int(11) NOT NULL,
  `GradeCount` int(11) NOT NULL,
  PRIMARY KEY (`GAID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ClassID` (`ClassID`),
  KEY `CAID` (`CAID`),
  KEY `GoogleID` (`GoogleID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `GoogleClassroomStudents`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `GoogleClassroomStudents` (
  `GCSID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `ClassID` int(11) NOT NULL,
  `StudentID` int(11) NOT NULL,
  `GoogleID` varchar(128) NOT NULL,
  PRIMARY KEY (`GCSID`),
  KEY `fk_rails_6260a761d3` (`StudentID`),
  CONSTRAINT `fk_rails_6260a761d3` FOREIGN KEY (`StudentID`) REFERENCES `Students` (`StudentID`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `GoogleClassrooms`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `GoogleClassrooms` (
  `GCID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `ClassID` int(11) DEFAULT NULL,
  `GoogleID` varchar(128) NOT NULL,
  `OwnerID` varchar(128) NOT NULL,
  `UserID` int(11) NOT NULL,
  `Name` varchar(36) NOT NULL,
  `Section` varchar(24) NOT NULL,
  `Room` varchar(16) NOT NULL,
  `Status` int(11) NOT NULL COMMENT '1=Provisioned, 2=Active',
  `URL` varchar(128) NOT NULL,
  `UpdateDateTime` datetime NOT NULL,
  PRIMARY KEY (`GCID`),
  UNIQUE KEY `SchoolID_2` (`SchoolID`,`ClassID`,`GoogleID`),
  KEY `GoogleID` (`GoogleID`),
  KEY `OwnerID` (`OwnerID`),
  KEY `UserID` (`UserID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `GoogleGroups`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `GoogleGroups` (
  `GGID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `GroupID` varchar(32) NOT NULL,
  `Kind` varchar(32) NOT NULL,
  `Name` varchar(32) NOT NULL,
  `Description` varchar(64) NOT NULL,
  `Email` varchar(128) NOT NULL,
  `Deleted` int(11) NOT NULL,
  PRIMARY KEY (`GGID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `GroupID` (`GroupID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `GoogleOrgUnits`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `GoogleOrgUnits` (
  `GOUID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `OrgName` varchar(32) NOT NULL,
  `OrgDesc` varchar(64) NOT NULL,
  `OrgUnitID` varchar(32) NOT NULL,
  `OrgUnitPath` varchar(128) NOT NULL,
  `ParentOrgUnitID` varchar(32) NOT NULL,
  `TopLevel` int(11) NOT NULL,
  `Deleted` int(11) NOT NULL,
  PRIMARY KEY (`GOUID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `OrgUnitID` (`OrgUnitID`),
  KEY `ParentOrgUnitID` (`ParentOrgUnitID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `GoogleProvisions`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `GoogleProvisions` (
  `GPID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `UserID` int(11) NOT NULL,
  `StudentID` int(11) DEFAULT NULL,
  `Type` int(11) NOT NULL COMMENT '1=staff, 2=student',
  `GoogleID` varchar(128) NOT NULL,
  `OrgUnitPath` varchar(128) NOT NULL,
  PRIMARY KEY (`GPID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `UserID` (`UserID`),
  KEY `GoogleID` (`GoogleID`),
  KEY `OrgUnitID` (`OrgUnitPath`),
  KEY `StudentID` (`StudentID`),
  CONSTRAINT `fk_rails_ca63e40c52` FOREIGN KEY (`StudentID`) REFERENCES `Students` (`StudentID`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `GoogleSync`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `GoogleSync` (
  `GSID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `UserID` int(11) NOT NULL,
  `SyncDateTime` datetime NOT NULL,
  `LastChangeId` int(11) NOT NULL,
  PRIMARY KEY (`GSID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `UserID` (`UserID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `GoogleUsers`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `GoogleUsers` (
  `UGID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `UserID` int(11) NOT NULL,
  `StudentID` int(11) DEFAULT NULL,
  `Type` int(11) NOT NULL COMMENT '1=staff, 2=student',
  `GoogleID` varchar(128) NOT NULL,
  `OrgUnitPath` varchar(128) NOT NULL,
  `Admin` int(11) NOT NULL,
  `Suspended` int(11) NOT NULL,
  `Deleted` int(11) NOT NULL,
  `Notes` varchar(128) NOT NULL,
  PRIMARY KEY (`UGID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `UserID` (`UserID`),
  KEY `GoogleID` (`GoogleID`),
  KEY `OrgUnitID` (`OrgUnitPath`),
  KEY `StudentID` (`StudentID`),
  CONSTRAINT `fk_rails_06da7e4752` FOREIGN KEY (`StudentID`) REFERENCES `Students` (`StudentID`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `GradeSkillSubjects`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `GradeSkillSubjects` (
  `GSSID` int(11) NOT NULL AUTO_INCREMENT,
  `Name` varchar(32) 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 (`GSSID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `GradeSkills`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `GradeSkills` (
  `GSID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `Num` varchar(5) NOT NULL,
  `Name` varchar(128) NOT NULL,
  `Description` varchar(255) NOT NULL,
  `Grade` int(11) NOT NULL DEFAULT '0',
  `GSSID` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`GSID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `CCGID` (`GSSID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `GradeStandardChanges`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `GradeStandardChanges` (
  `GSID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `SectionNum` varchar(20) NOT NULL,
  `Category` varchar(128) NOT NULL,
  `Description` varchar(254) NOT NULL,
  `Example` text NOT NULL,
  `Grade` int(11) NOT NULL DEFAULT '0',
  `GSSID` int(11) NOT NULL DEFAULT '0',
  `GSMID` int(11) NOT NULL DEFAULT '0',
  `Removed` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`GSID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `CCGID` (`GSSID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `GradeStandardCores`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `GradeStandardCores` (
  `GSCID` int(11) NOT NULL AUTO_INCREMENT,
  `CoreID` int(11) NOT NULL DEFAULT '0',
  `Name` varchar(128) NOT NULL,
  `Description` varchar(254) NOT NULL,
  PRIMARY KEY (`GSCID`),
  KEY `CoreID` (`CoreID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `GradeStandardMaster`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `GradeStandardMaster` (
  `GSMID` int(11) NOT NULL AUTO_INCREMENT,
  `CoreID` int(11) NOT NULL DEFAULT '0',
  `SectionNum` varchar(20) NOT NULL,
  `Category` varchar(255) NOT NULL,
  `Description` text NOT NULL,
  `Example` text NOT NULL,
  `Grade` int(11) NOT NULL DEFAULT '0',
  `GSSID` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`GSMID`),
  KEY `CoreID` (`CoreID`),
  KEY `GSSID` (`GSSID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `GradeStandardMasterSubjects`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `GradeStandardMasterSubjects` (
  `GSSID` int(11) NOT NULL AUTO_INCREMENT,
  `CoreID` int(11) NOT NULL,
  `Name` varchar(48) NOT NULL DEFAULT '',
  `Description` varchar(64) NOT NULL DEFAULT '',
  `Sequence` int(11) NOT NULL DEFAULT '0',
  `NGSSID` int(11) NOT NULL DEFAULT '0' COMMENT 'Used for copying',
  PRIMARY KEY (`GSSID`),
  KEY `CoreID` (`CoreID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `GradeStandardSchools`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `GradeStandardSchools` (
  `GSSCHID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `CoreID` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`GSSCHID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `GradeStandardSubjects`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `GradeStandardSubjects` (
  `GSSID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `Name` varchar(48) NOT NULL DEFAULT '',
  `Description` varchar(64) NOT NULL DEFAULT '',
  `Sequence` int(11) NOT NULL DEFAULT '0',
  `NGSSID` int(11) NOT NULL DEFAULT '0' COMMENT 'Used for copying',
  PRIMARY KEY (`GSSID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `GradeStandards`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `GradeStandards` (
  `GSID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `SectionNum` varchar(20) NOT NULL,
  `Category` varchar(255) NOT NULL,
  `Description` text NOT NULL,
  `Example` text NOT NULL,
  `Grade` int(11) NOT NULL DEFAULT '0',
  `GSSID` int(11) NOT NULL DEFAULT '0',
  `GSMID` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`GSID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `CCGID` (`GSSID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `GradeVisitors`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `GradeVisitors` (
  `GVID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `UserID` int(11) NOT NULL,
  `Date` date NOT NULL,
  PRIMARY KEY (`GVID`),
  KEY `SchoolID_2` (`SchoolID`,`UserID`),
  KEY `Date` (`Date`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `Grades`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Grades` (
  `GradeID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `GradeCode` varchar(5) NOT NULL DEFAULT '',
  `GradeDesc` varchar(16) NOT NULL DEFAULT '',
  `GradeOrder` int(11) NOT NULL DEFAULT '0',
  `GradeNum` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`GradeID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `GradeNum` (`GradeNum`),
  KEY `GradeOrder` (`GradeOrder`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `GroupFamily`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `GroupFamily` (
  `GroupFamilyID` int(11) NOT NULL AUTO_INCREMENT,
  `GroupID` int(11) NOT NULL DEFAULT '0',
  `FamilyID` int(11) NOT NULL DEFAULT '0',
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`GroupFamilyID`),
  UNIQUE KEY `GroupFamilyID` (`GroupFamilyID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `GroupStaff`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `GroupStaff` (
  `GroupStaffID` int(11) NOT NULL AUTO_INCREMENT,
  `GroupID` int(11) NOT NULL DEFAULT '0',
  `StaffID` int(11) NOT NULL DEFAULT '0',
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`GroupStaffID`),
  UNIQUE KEY `GroupStaffID_2` (`GroupStaffID`),
  KEY `GroupStaffID` (`GroupStaffID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `GroupStudents`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `GroupStudents` (
  `GroupStudentsID` int(11) NOT NULL AUTO_INCREMENT,
  `GroupID` int(11) NOT NULL DEFAULT '0',
  `StudentID` int(11) NOT NULL DEFAULT '0',
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  UNIQUE KEY `GroupStudentsID` (`GroupStudentsID`),
  KEY `GroupID` (`GroupID`),
  KEY `StudentID` (`StudentID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `Groups`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Groups` (
  `GroupID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `GroupCode` varchar(8) NOT NULL DEFAULT '',
  `GroupDesc` varchar(128) NOT NULL DEFAULT '',
  `GroupType` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`GroupID`),
  UNIQUE KEY `GroupID` (`GroupID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `GuestBook`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `GuestBook` (
  `GuestID` int(11) NOT NULL AUTO_INCREMENT,
  `School` varchar(32) NOT NULL DEFAULT '',
  `Name` varchar(24) NOT NULL DEFAULT '',
  `Title` varchar(24) NOT NULL DEFAULT '',
  `Address` varchar(64) NOT NULL DEFAULT '',
  `City` varchar(32) NOT NULL DEFAULT '',
  `State` varchar(10) NOT NULL DEFAULT '',
  `Zip` varchar(10) NOT NULL DEFAULT '',
  `Email` varchar(128) NOT NULL DEFAULT '',
  `NumStudents` int(11) NOT NULL DEFAULT '0',
  `Comments` text NOT NULL,
  `DateTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Phone` varchar(16) NOT NULL DEFAULT '',
  `Country` varchar(32) NOT NULL DEFAULT '',
  PRIMARY KEY (`GuestID`),
  UNIQUE KEY `GuestID_2` (`GuestID`),
  KEY `GuestID` (`GuestID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `GuestBookNotes`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `GuestBookNotes` (
  `GBNotesID` int(11) NOT NULL AUTO_INCREMENT,
  `GuestBookID` int(11) NOT NULL DEFAULT '0',
  `DateTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `AuthorID` varchar(24) NOT NULL DEFAULT '0',
  `Comments` text NOT NULL,
  `Subject` varchar(64) NOT NULL DEFAULT '',
  PRIMARY KEY (`GBNotesID`),
  UNIQUE KEY `GBNotesID_2` (`GBNotesID`),
  KEY `GBNotesID` (`GBNotesID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `IG_Pledges`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `IG_Pledges` (
  `IGPID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `SERID` int(11) NOT NULL,
  `Pledge` float NOT NULL,
  PRIMARY KEY (`IGPID`),
  KEY `SchoolID` (`SchoolID`,`SERID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `ImportData`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ImportData` (
  `IDID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `UserID` int(11) NOT NULL DEFAULT '0',
  `Type` varchar(16) NOT NULL DEFAULT '',
  `Data` text NOT NULL,
  PRIMARY KEY (`IDID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `InstantQueue`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `InstantQueue` (
  `IQID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `UserID` int(11) NOT NULL,
  `Type` tinyint(1) NOT NULL COMMENT 'Type of instant notification',
  `ID` int(11) NOT NULL COMMENT 'Generic ID Field',
  PRIMARY KEY (`IQID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `IntegrationAssociations`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `IntegrationAssociations` (
  `AssociationID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `Vendor` int(11) NOT NULL,
  `Target` varchar(32) NOT NULL,
  `TargetID` int(11) NOT NULL,
  `ExternalID` varchar(64) NOT NULL,
  PRIMARY KEY (`AssociationID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `InvitedUsers`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `InvitedUsers` (
  `IUID` 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,
  `ContactID` int(11) NOT NULL,
  `Email` varchar(64) NOT NULL,
  `UserName` varchar(32) NOT NULL,
  `Type` int(1) NOT NULL COMMENT '1=new account, 2=pw reset',
  PRIMARY KEY (`IUID`),
  KEY `UserID` (`UserID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `Journal`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Journal` (
  `JournalID` int(11) NOT NULL AUTO_INCREMENT,
  `UserID` int(11) NOT NULL DEFAULT '0',
  `Created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Modified` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Title` varchar(128) NOT NULL DEFAULT '',
  `Message` longtext NOT NULL,
  `CheckSum` varchar(64) NOT NULL DEFAULT '',
  UNIQUE KEY `NewsID` (`JournalID`),
  KEY `UserID` (`UserID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `Kiosk_Access_Tokens`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Kiosk_Access_Tokens` (
  `token_id` int(11) NOT NULL AUTO_INCREMENT,
  `access_token` varchar(48) NOT NULL,
  `SchoolID` int(11) DEFAULT NULL,
  `UserID` int(11) DEFAULT NULL,
  `expires` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `Kiosk` varchar(24) NOT NULL,
  PRIMARY KEY (`token_id`),
  KEY `user_id` (`UserID`),
  KEY `access_token` (`access_token`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `KnowledgeBase`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `KnowledgeBase` (
  `KBID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `ClassID` int(11) NOT NULL DEFAULT '0',
  `AuthorID` int(11) NOT NULL DEFAULT '0',
  `Alert` int(11) NOT NULL DEFAULT '0',
  `ModifyDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Question` varchar(255) NOT NULL DEFAULT '',
  `Answer` text NOT NULL,
  `SearchBy` varchar(255) NOT NULL DEFAULT '',
  `Active` int(11) NOT NULL DEFAULT '0',
  `Public` int(11) NOT NULL DEFAULT '0',
  `Deleted` int(11) NOT NULL DEFAULT '0',
  `KBGID` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`KBID`),
  KEY `NotepadID` (`KBID`),
  KEY `AuthorID` (`AuthorID`),
  KEY `CompanyID` (`SchoolID`),
  KEY `ModifyDate` (`ModifyDate`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `KnowledgeBaseGroups`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `KnowledgeBaseGroups` (
  `KBGID` 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 (`KBGID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `KnowledgeRead`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `KnowledgeRead` (
  `KnowledgeReadID` int(11) NOT NULL AUTO_INCREMENT,
  `KBID` 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 (`KnowledgeReadID`),
  UNIQUE KEY `KnowledgeReadID_2` (`KnowledgeReadID`),
  KEY `KnowledgeReadID` (`KnowledgeReadID`),
  KEY `KBID` (`KBID`),
  KEY `CompanyID` (`SchoolID`),
  KEY `UserID` (`UserID`),
  KEY `DateTime` (`DateTime`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `LibraryBookSummaries`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `LibraryBookSummaries` (
  `LBSID` int(11) NOT NULL AUTO_INCREMENT,
  `LBID` int(11) NOT NULL,
  `Summary` text NOT NULL,
  PRIMARY KEY (`LBSID`),
  KEY `LBID` (`LBID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `LibraryBooks`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `LibraryBooks` (
  `LBID` int(11) NOT NULL AUTO_INCREMENT,
  `Title` varchar(64) NOT NULL DEFAULT '',
  `TitleSearch` varchar(64) NOT NULL,
  `TitleLong` varchar(128) NOT NULL DEFAULT '',
  `Copyright` int(4) NOT NULL,
  `BookSeries` varchar(32) NOT NULL,
  `Author` varchar(64) NOT NULL DEFAULT '',
  `Publisher` varchar(128) NOT NULL DEFAULT '',
  `Published` varchar(15) NOT NULL,
  `ISBN` varchar(13) NOT NULL DEFAULT '',
  `ISBN13` varchar(16) NOT NULL,
  `GoogleID` varchar(32) NOT NULL,
  `ISBNCover` tinyint(4) NOT NULL DEFAULT '1',
  `Subjects` varchar(124) NOT NULL,
  `KeyWords` varchar(64) NOT NULL,
  `Summary` varchar(255) NOT NULL,
  `Dewey` varchar(24) NOT NULL,
  `LCC` varchar(16) NOT NULL,
  `DDC` varchar(16) NOT NULL,
  `Amount` float NOT NULL DEFAULT '0',
  `PageCount` int(11) NOT NULL,
  `CoverSmallURL` varchar(255) NOT NULL,
  `CoverMediumURL` varchar(255) NOT NULL,
  `CoverLargeURL` varchar(255) NOT NULL,
  `PreviewURL` varchar(255) NOT NULL,
  `InfoURL` varchar(255) NOT NULL,
  PRIMARY KEY (`LBID`),
  KEY `ISBN` (`ISBN`),
  KEY `Title` (`Title`),
  KEY `Author` (`Author`),
  KEY `ISBN13` (`ISBN13`),
  KEY `GoogleID` (`GoogleID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `LibraryBooksChecked`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `LibraryBooksChecked` (
  `LBCID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `StudentID` int(11) NOT NULL,
  `UserID` int(11) NOT NULL,
  `LBIID` int(11) NOT NULL,
  `LBID` int(11) NOT NULL,
  `OutDate` date NOT NULL,
  `DueDate` date NOT NULL,
  `InDate` date NOT NULL,
  `ARPoints` decimal(4,2) NOT NULL,
  `ARGrade` decimal(4,2) NOT NULL,
  PRIMARY KEY (`LBCID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `LBIID` (`LBIID`),
  KEY `StudentID` (`StudentID`),
  KEY `UserID` (`UserID`),
  KEY `DueDate` (`DueDate`),
  KEY `InDate` (`InDate`),
  CONSTRAINT `LibraryBooksChecked_ibfk_1` FOREIGN KEY (`LBIID`) REFERENCES `LibraryBooksIndex` (`LBIID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `LibraryBooksImport`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `LibraryBooksImport` (
  `LBIID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `LLID` int(11) NOT NULL,
  `ISBN` varchar(16) NOT NULL,
  `Title` varchar(32) NOT NULL,
  `Author` varchar(32) NOT NULL,
  `LocalNumber` bigint(20) NOT NULL,
  `Call1` varchar(16) NOT NULL,
  `Call2` varchar(16) NOT NULL,
  `Call3` varchar(16) NOT NULL,
  `Level` int(11) NOT NULL,
  `BookLevel` decimal(4,2) NOT NULL DEFAULT '0.00',
  `ARPts` int(11) NOT NULL,
  `ARTest` int(11) NOT NULL,
  `KeyWords` varchar(64) NOT NULL,
  `Processed` int(11) NOT NULL,
  `Comments` varchar(32) NOT NULL,
  PRIMARY KEY (`LBIID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `Processed` (`Processed`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `LibraryBooksIndex`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `LibraryBooksIndex` (
  `LBIID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `LBID` int(11) NOT NULL,
  `LocalNum` bigint(11) NOT NULL,
  `LocalStr` varchar(32) NOT NULL,
  `LLID` int(11) NOT NULL,
  `ResourceType` int(11) NOT NULL DEFAULT '1' COMMENT '1:Book 2:News Paper, Magazine 3:Movies 4: equipment',
  `AR` decimal(4,2) NOT NULL,
  `ARTest` int(11) NOT NULL,
  `BL` decimal(4,2) NOT NULL,
  `Level` int(11) NOT NULL,
  `Call1` varchar(16) NOT NULL,
  `Call2` varchar(16) NOT NULL,
  `Call3` varchar(16) NOT NULL,
  `Rating` decimal(6,1) NOT NULL COMMENT '1-5',
  `KeyWords` varchar(64) NOT NULL,
  `CheckedOut` int(11) NOT NULL COMMENT 'Contails StudentID ',
  `UpdateDT` datetime NOT NULL,
  `ReserveInfo` varchar(32) NOT NULL COMMENT 'User book is reserved for',
  `LBLID` int(11) NOT NULL,
  PRIMARY KEY (`LBIID`),
  KEY `LBIID` (`LBIID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `LBID` (`LBID`),
  KEY `ReserveID` (`ReserveInfo`),
  KEY `Call1` (`Call1`),
  KEY `Call2` (`Call2`),
  KEY `Call3` (`Call3`),
  KEY `LLID` (`LLID`),
  KEY `LocalNum` (`LocalNum`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `LibraryBooksLocal`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `LibraryBooksLocal` (
  `LBLID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `Title` varchar(64) NOT NULL,
  `TitleLong` varchar(128) NOT NULL,
  `Authors` varchar(64) NOT NULL,
  `Publisher` varchar(128) NOT NULL,
  `Published` varchar(16) NOT NULL,
  `Copyright` varchar(8) NOT NULL,
  `Summary` text NOT NULL,
  `PageCount` int(11) NOT NULL,
  `UpdateDT` datetime NOT NULL,
  PRIMARY KEY (`LBLID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `LBLID` (`LBLID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `LibraryClassBookClasses`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `LibraryClassBookClasses` (
  `CBCID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `ClassID` int(11) NOT NULL,
  `CBID` int(11) NOT NULL DEFAULT '0',
  `BookCode` varchar(16) NOT NULL,
  `StudentID` int(11) NOT NULL,
  `BookCondition` int(11) NOT NULL,
  `Comments` varchar(255) NOT NULL,
  `UpdateDT` datetime NOT NULL,
  PRIMARY KEY (`CBCID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `CBID` (`CBID`),
  KEY `ClassID` (`ClassID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `LibraryClassBooks`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `LibraryClassBooks` (
  `CBID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `DeptID` int(11) NOT NULL DEFAULT '0',
  `Title` varchar(64) NOT NULL DEFAULT '',
  `TitleLong` varchar(128) NOT NULL DEFAULT '',
  `Author` varchar(64) NOT NULL DEFAULT '',
  `Publisher` varchar(128) NOT NULL DEFAULT '',
  `ISBN` varchar(13) NOT NULL DEFAULT '',
  `Amount` float NOT NULL DEFAULT '0',
  `Location` varchar(64) NOT NULL DEFAULT '',
  PRIMARY KEY (`CBID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `LibraryGradeDays`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `LibraryGradeDays` (
  `LGCOID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `Grade` int(11) NOT NULL,
  `Days` int(11) NOT NULL,
  PRIMARY KEY (`LGCOID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `LibraryInventory`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `LibraryInventory` (
  `LINVID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `LocalNum` bigint(11) NOT NULL,
  `UpdateDT` datetime NOT NULL,
  PRIMARY KEY (`LINVID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `LINVID` (`LINVID`),
  KEY `LocalNum` (`LocalNum`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `LibraryLocations`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `LibraryLocations` (
  `LLID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `NextNew` int(11) NOT NULL,
  `Number` varchar(5) NOT NULL DEFAULT '0',
  `Name` varchar(32) NOT NULL DEFAULT '',
  `Description` varchar(128) NOT NULL DEFAULT '',
  UNIQUE KEY `LLID` (`LLID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `Name` (`Name`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `LibraryLogs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `LibraryLogs` (
  `LLOGID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `LocalNum` bigint(11) NOT NULL DEFAULT '0',
  `UserID` int(11) NOT NULL DEFAULT '0',
  `UpdateDT` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Comments` varchar(64) NOT NULL DEFAULT '',
  `Type` int(4) NOT NULL DEFAULT '0' COMMENT '1 - Inventory Error',
  PRIMARY KEY (`LLOGID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `LinkCatagories`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `LinkCatagories` (
  `CatagoryID` int(11) NOT NULL AUTO_INCREMENT,
  `ClassID` int(11) NOT NULL DEFAULT '0',
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `Description` varchar(128) NOT NULL DEFAULT '',
  `Name` varchar(32) NOT NULL DEFAULT '',
  PRIMARY KEY (`CatagoryID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ClassID` (`ClassID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `Links`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Links` (
  `LinkID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `ClassID` int(11) NOT NULL DEFAULT '0',
  `CatagoryID` int(11) NOT NULL DEFAULT '0',
  `URL` varchar(255) NOT NULL DEFAULT '',
  `Name` varchar(32) NOT NULL DEFAULT '',
  `Description` varchar(255) NOT NULL DEFAULT '',
  `Secure` int(11) NOT NULL DEFAULT '0',
  `Alert` int(11) NOT NULL DEFAULT '0',
  `Focus` int(11) NOT NULL DEFAULT '0',
  `External` int(11) NOT NULL,
  `Hits` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`LinkID`),
  KEY `LinkID` (`LinkID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ClassID` (`ClassID`),
  KEY `CatagoryID` (`CatagoryID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `LinksOkd`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `LinksOkd` (
  `LinkID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `ClassID` int(11) NOT NULL DEFAULT '0',
  `Name` varchar(32) NOT NULL DEFAULT '',
  `URL` tinytext NOT NULL,
  `Comments` tinytext NOT NULL,
  `Date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `CatagoryID` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`LinkID`),
  UNIQUE KEY `LinkID_2` (`LinkID`),
  KEY `LinkID` (`LinkID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `LunchAccounts`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `LunchAccounts` (
  `TransactionID` 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',
  `TransactionDate` date NOT NULL DEFAULT '0000-00-00',
  `EnteredDate` date NOT NULL DEFAULT '0000-00-00',
  `UpdatedDate` date NOT NULL DEFAULT '0000-00-00',
  `AuthorID` int(11) NOT NULL DEFAULT '0',
  `Amount` float(10,2) NOT NULL DEFAULT '0.00',
  `Comments` varchar(32) NOT NULL DEFAULT '',
  PRIMARY KEY (`TransactionID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `FamilyID` (`FamilyID`),
  KEY `Amount` (`Amount`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `LunchCalendarComments`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `LunchCalendarComments` (
  `LCCID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `Comments` text NOT NULL,
  PRIMARY KEY (`LCCID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `LunchConfig`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `LunchConfig` (
  `LNSID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `Active` tinyint(4) NOT NULL,
  `Balance` float NOT NULL,
  `Subject` varchar(64) NOT NULL,
  `Message` text NOT NULL,
  `ReturnEmail` varchar(64) NOT NULL,
  PRIMARY KEY (`LNSID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `LunchCycles`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `LunchCycles` (
  `LunchCycleID` 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',
  `AlaCarte` tinyint(4) NOT NULL DEFAULT '0',
  PRIMARY KEY (`LunchCycleID`),
  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 `LunchDays`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `LunchDays` (
  `LunchDayID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `LGID` int(11) NOT NULL COMMENT 'LunchGroupID',
  `SchoolYearID` int(11) NOT NULL DEFAULT '0',
  `LunchDate` date NOT NULL DEFAULT '0000-00-00',
  `Meal1ID` int(11) NOT NULL DEFAULT '0',
  `Meal2ID` int(11) NOT NULL DEFAULT '0',
  `Meal3ID` int(11) NOT NULL DEFAULT '0',
  `Meal4ID` int(11) NOT NULL DEFAULT '0',
  `Meal5ID` int(11) NOT NULL DEFAULT '0',
  `Charged` int(11) NOT NULL DEFAULT '0',
  `AlaCarte` tinyint(4) NOT NULL DEFAULT '0',
  PRIMARY KEY (`LunchDayID`),
  UNIQUE KEY `SchoolID_2` (`SchoolID`,`LunchDate`),
  KEY `SchoolYearID` (`SchoolYearID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `LunchGroupSchools`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `LunchGroupSchools` (
  `LGSID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `LGID` int(11) NOT NULL,
  PRIMARY KEY (`LGSID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `LunchGroups`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `LunchGroups` (
  `LGID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `GroupName` varchar(32) NOT NULL,
  `Description` varchar(64) NOT NULL,
  PRIMARY KEY (`LGID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `LunchItemOrdersStudents`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `LunchItemOrdersStudents` (
  `OrderID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `SchoolYearID` int(11) NOT NULL DEFAULT '0',
  `LunchCycleID` int(11) NOT NULL DEFAULT '0',
  `ClassID` int(11) NOT NULL DEFAULT '0',
  `FamilyID` int(11) NOT NULL DEFAULT '0',
  `StudentID` int(11) NOT NULL DEFAULT '0',
  `LPPID` int(11) NOT NULL,
  `LunchDayID` int(11) NOT NULL DEFAULT '0',
  `ItemID` int(11) NOT NULL DEFAULT '0',
  `ItemCount` int(11) NOT NULL DEFAULT '0',
  `OrderDate` date NOT NULL DEFAULT '0000-00-00',
  `ChargeDate` date NOT NULL DEFAULT '0000-00-00',
  `LTID` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`OrderID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ClassID` (`ClassID`),
  KEY `LunchDayID` (`LunchDayID`),
  KEY `OrderDate` (`OrderDate`),
  KEY `ChargeDate` (`ChargeDate`),
  KEY `FamilyID` (`FamilyID`),
  KEY `StudentID` (`StudentID`),
  KEY `StudentCount` (`SchoolID`,`LunchDayID`,`StudentID`),
  KEY `LTID` (`LTID`),
  KEY `LTID_2` (`LTID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `LunchItemOrdersTeachers`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `LunchItemOrdersTeachers` (
  `OrderID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `SchoolYearID` int(11) NOT NULL DEFAULT '0',
  `LunchCycleID` int(11) NOT NULL DEFAULT '0',
  `ClassID` int(11) NOT NULL DEFAULT '0',
  `UserID` int(11) NOT NULL DEFAULT '0',
  `LPPID` int(11) NOT NULL,
  `LunchDayID` int(11) NOT NULL DEFAULT '0',
  `ItemID` int(11) NOT NULL DEFAULT '0',
  `ItemCount` int(11) NOT NULL DEFAULT '0',
  `OrderDate` date NOT NULL DEFAULT '0000-00-00',
  `ChargeDate` date NOT NULL DEFAULT '0000-00-00',
  `LTID` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`OrderID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ClassID` (`ClassID`),
  KEY `LunchDayID` (`LunchDayID`),
  KEY `UserID` (`UserID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `LunchItems`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `LunchItems` (
  `ItemID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `ParentID` int(11) NOT NULL DEFAULT '0',
  `Name` varchar(32) NOT NULL DEFAULT '',
  `Code` int(11) NOT NULL,
  `Description` varchar(128) NOT NULL DEFAULT '',
  `Amount` double(10,2) NOT NULL DEFAULT '0.00',
  `Exempt` int(11) NOT NULL DEFAULT '0',
  `Count` int(11) NOT NULL,
  PRIMARY KEY (`ItemID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `Code` (`Code`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `LunchMealGroups`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `LunchMealGroups` (
  `LunchMealGroupID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `GroupName` varchar(32) NOT NULL DEFAULT '',
  `Comments` text NOT NULL,
  `daysofweek` set('Monday','Tuesday','Wednesday','Thursday','Friday') NOT NULL DEFAULT '',
  PRIMARY KEY (`LunchMealGroupID`),
  UNIQUE KEY `VenID_2` (`LunchMealGroupID`),
  KEY `VenID` (`LunchMealGroupID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `LunchMeals`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `LunchMeals` (
  `MealID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `ParentID` int(11) NOT NULL DEFAULT '0',
  `Name` varchar(32) NOT NULL DEFAULT '',
  `Description` varchar(128) NOT NULL DEFAULT '',
  `Amount` double(10,2) NOT NULL DEFAULT '0.00',
  `Exempt` int(11) NOT NULL DEFAULT '0',
  `Displayable` int(11) NOT NULL DEFAULT '1',
  PRIMARY KEY (`MealID`),
  KEY `MealID` (`MealID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `LunchMilk`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `LunchMilk` (
  `LunchMilkID` int(11) NOT NULL DEFAULT '0',
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `Amount` float NOT NULL DEFAULT '0',
  `Exempt` int(11) NOT NULL DEFAULT '0',
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `LunchMilkOrderTeachers`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `LunchMilkOrderTeachers` (
  `LMOID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `ClassID` int(11) NOT NULL DEFAULT '0',
  `UserID` int(11) NOT NULL DEFAULT '0',
  `OrderDate` date NOT NULL DEFAULT '0000-00-00',
  `ChargeDate` date NOT NULL DEFAULT '0000-00-00',
  `LPPID` int(11) NOT NULL DEFAULT '0',
  `LTID` int(11) NOT NULL DEFAULT '0',
  `Count` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`LMOID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ClassID` (`ClassID`),
  KEY `StudentID` (`UserID`),
  KEY `Date` (`OrderDate`),
  KEY `LTID` (`LTID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `LunchMilkOrders`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `LunchMilkOrders` (
  `LMOID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `ClassID` int(11) NOT NULL DEFAULT '0',
  `StudentID` int(11) NOT NULL DEFAULT '0',
  `OrderDate` date NOT NULL DEFAULT '0000-00-00',
  `ChargeDate` date NOT NULL DEFAULT '0000-00-00',
  `LPPID` int(11) NOT NULL DEFAULT '0',
  `LTID` int(11) NOT NULL DEFAULT '0',
  `Count` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`LMOID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ClassID` (`ClassID`),
  KEY `StudentID` (`StudentID`),
  KEY `Date` (`OrderDate`),
  KEY `LTID` (`LTID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `LunchNotes`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `LunchNotes` (
  `LNID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `ClassID` int(11) NOT NULL DEFAULT '0',
  `UserID` int(11) NOT NULL DEFAULT '0',
  `Date` date NOT NULL DEFAULT '0000-00-00',
  `Comments` text NOT NULL,
  PRIMARY KEY (`LNID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ClassID` (`ClassID`),
  KEY `UserID` (`UserID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `LunchNotifierResults`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `LunchNotifierResults` (
  `LNRID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `FamilyID` int(11) NOT NULL,
  `DateTime` datetime NOT NULL,
  `EmailAddress` varchar(64) NOT NULL,
  `Balance` varchar(16) NOT NULL,
  `Serviced` tinyint(4) NOT NULL DEFAULT '0',
  PRIMARY KEY (`LNRID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `LunchOrdersStudents`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `LunchOrdersStudents` (
  `OrderID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `SchoolYearID` int(11) NOT NULL DEFAULT '0',
  `LunchCycleID` int(11) NOT NULL DEFAULT '0',
  `ClassID` int(11) NOT NULL DEFAULT '0',
  `FamilyID` int(11) NOT NULL DEFAULT '0',
  `StudentID` int(11) NOT NULL DEFAULT '0',
  `LPPID` int(11) NOT NULL DEFAULT '0',
  `LunchDayID` int(11) NOT NULL DEFAULT '0',
  `MealID` int(11) NOT NULL DEFAULT '0',
  `MealCount` int(11) NOT NULL DEFAULT '0',
  `OrderDate` date NOT NULL DEFAULT '0000-00-00',
  `ChargeDate` date NOT NULL DEFAULT '0000-00-00',
  `LTID` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`OrderID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ClassID` (`ClassID`),
  KEY `LunchDayID` (`LunchDayID`),
  KEY `OrderDate` (`OrderDate`),
  KEY `ChargeDate` (`ChargeDate`),
  KEY `FamilyID` (`FamilyID`),
  KEY `StudentID` (`StudentID`),
  KEY `StudentCount` (`SchoolID`,`LunchDayID`,`StudentID`),
  KEY `LunchCycleID` (`LunchCycleID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `LunchOrdersTeachers`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `LunchOrdersTeachers` (
  `OrderID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `SchoolYearID` int(11) NOT NULL DEFAULT '0',
  `LunchCycleID` int(11) NOT NULL DEFAULT '0',
  `ClassID` int(11) NOT NULL DEFAULT '0',
  `UserID` int(11) NOT NULL DEFAULT '0',
  `LPPID` int(11) NOT NULL DEFAULT '0',
  `LunchDayID` int(11) NOT NULL DEFAULT '0',
  `MealID` int(11) NOT NULL DEFAULT '0',
  `MealCount` int(11) NOT NULL DEFAULT '0',
  `OrderDate` date NOT NULL DEFAULT '0000-00-00',
  `ChargeDate` date NOT NULL DEFAULT '0000-00-00',
  `LTID` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`OrderID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ClassID` (`ClassID`),
  KEY `LunchDayID` (`LunchDayID`),
  KEY `UserID` (`UserID`),
  KEY `ChargeDate` (`ChargeDate`),
  KEY `OrderDate` (`OrderDate`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `LunchPricePlans`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `LunchPricePlans` (
  `LPPID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `ParentID` int(11) NOT NULL DEFAULT '0',
  `Name` varchar(32) NOT NULL DEFAULT '',
  `Description` varchar(128) NOT NULL DEFAULT '',
  `LunchType` int(11) NOT NULL COMMENT '0=Standard, 1=Reduces, 2=Free',
  `Percentage` float NOT NULL DEFAULT '0',
  `DefaultPlan` int(1) NOT NULL DEFAULT '0',
  `OneMeal` bit(1) NOT NULL DEFAULT b'0' COMMENT '1Meal per PP',
  PRIMARY KEY (`LPPID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `LunchTransactionsStudents`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `LunchTransactionsStudents` (
  `LTID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `SchoolYearID` int(11) NOT NULL DEFAULT '0',
  `FamilyID` int(11) NOT NULL DEFAULT '0',
  `StudentID` int(11) NOT NULL DEFAULT '0',
  `LunchOrderID` int(11) NOT NULL DEFAULT '0',
  `Type` int(11) NOT NULL DEFAULT '0' COMMENT '0=Paymnt,1=LunchOrd,2=MilkOrd, 3=AlaCtOrd',
  `TransactionDate` date NOT NULL DEFAULT '0000-00-00',
  `EnteredDate` date NOT NULL DEFAULT '0000-00-00',
  `UpdatedDate` date NOT NULL DEFAULT '0000-00-00',
  `Amount` float(10,2) NOT NULL DEFAULT '0.00',
  `Comments` varchar(128) NOT NULL DEFAULT '',
  `AuthorID` int(11) NOT NULL DEFAULT '0',
  `CheckNum` int(11) NOT NULL DEFAULT '0',
  `Cleared` int(4) NOT NULL DEFAULT '0',
  `ItemID` int(11) NOT NULL DEFAULT '0',
  `ItemCount` int(11) NOT NULL DEFAULT '1',
  `FDID` int(11) NOT NULL COMMENT 'Family Deposit ID',
  PRIMARY KEY (`LTID`),
  KEY `FamilyID` (`FamilyID`),
  KEY `StudentID` (`StudentID`),
  KEY `TransactionDate` (`TransactionDate`),
  KEY `SchoolID` (`SchoolID`),
  KEY `LunchOrderID` (`LunchOrderID`),
  KEY `ItemID` (`ItemID`),
  KEY `FDID` (`FDID`),
  KEY `FDID_2` (`FDID`),
  KEY `FDID_3` (`FDID`),
  KEY `FDID_4` (`FDID`),
  KEY `FDID_5` (`FDID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `LunchTransactionsTeachers`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `LunchTransactionsTeachers` (
  `LTID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `SchoolYearID` int(11) NOT NULL DEFAULT '0',
  `UserID` int(11) NOT NULL DEFAULT '0',
  `LunchOrderID` int(11) NOT NULL DEFAULT '0',
  `Type` int(11) NOT NULL DEFAULT '0' COMMENT '0=Paymnt,1=LunchOrd,2=MilkOrd, 3=AlaCtOrd',
  `TransactionDate` date NOT NULL DEFAULT '0000-00-00',
  `EnteredDate` date NOT NULL DEFAULT '0000-00-00',
  `UpdatedDate` date NOT NULL DEFAULT '0000-00-00',
  `Amount` float(10,2) NOT NULL DEFAULT '0.00',
  `Comments` varchar(128) NOT NULL DEFAULT '',
  `AuthorID` int(11) NOT NULL DEFAULT '0',
  `CheckNum` int(11) NOT NULL DEFAULT '0',
  `Cleared` int(4) NOT NULL DEFAULT '0',
  `ItemID` int(11) NOT NULL DEFAULT '0',
  `ItemCount` int(11) NOT NULL DEFAULT '1',
  `UDID` int(11) NOT NULL COMMENT 'User Deposit ID',
  PRIMARY KEY (`LTID`),
  KEY `FAID` (`LTID`),
  KEY `StudentID` (`UserID`),
  KEY `TransactionDate` (`TransactionDate`),
  KEY `ItemID` (`ItemID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `Lunches`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Lunches` (
  `LunchID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `Date` date NOT NULL DEFAULT '0000-00-00',
  `StudentID` int(11) NOT NULL DEFAULT '0',
  `Comments` varchar(32) NOT NULL DEFAULT '',
  `FamilyID` int(4) NOT NULL DEFAULT '0',
  `MealID` int(4) NOT NULL DEFAULT '0',
  PRIMARY KEY (`LunchID`),
  UNIQUE KEY `LunchID_2` (`LunchID`),
  KEY `LunchID` (`LunchID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `MP_Account`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `MP_Account` (
  `MPAID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(12) NOT NULL,
  `UserID` int(12) NOT NULL,
  `FirstName` varchar(128) NOT NULL,
  `LastName` varchar(128) NOT NULL,
  `Nickname` varchar(128) NOT NULL,
  `Email` varchar(128) NOT NULL,
  `Location` varchar(128) NOT NULL,
  `Country` varchar(128) NOT NULL,
  `PrimaryGrade` varchar(128) NOT NULL,
  `PrimarySubject` varchar(128) NOT NULL,
  PRIMARY KEY (`MPAID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `MP_Products`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `MP_Products` (
  `MPPID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `UserID` int(11) NOT NULL DEFAULT '0',
  `Filename` varchar(255) NOT NULL DEFAULT '',
  `UFilename` varchar(32) NOT NULL DEFAULT '',
  `DateTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Size` int(11) NOT NULL DEFAULT '0',
  `Title` varchar(128) NOT NULL,
  `Description` text NOT NULL,
  `Location` varchar(255) NOT NULL DEFAULT '',
  `Type` varchar(32) NOT NULL DEFAULT '',
  `Subject` int(12) NOT NULL,
  `ProductPic` varchar(128) NOT NULL,
  `Price` float NOT NULL,
  `PageCount` int(12) NOT NULL,
  `GradeLevel` int(12) NOT NULL,
  `Duration` varchar(128) NOT NULL,
  `ResourceTypes` varchar(128) NOT NULL,
  `MPFID` int(11) NOT NULL DEFAULT '0',
  `Status` int(11) NOT NULL DEFAULT '0',
  `VirusScan` tinyint(4) NOT NULL,
  `VirusScanResults` varchar(128) NOT NULL,
  `Free` int(11) NOT NULL,
  `Active` int(12) NOT NULL,
  UNIQUE KEY `DocumentID_2` (`MPPID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `UserID` (`UserID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `MP_PurchaseCheckout`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `MP_PurchaseCheckout` (
  `MPPCID` int(12) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(12) NOT NULL,
  `UserID` int(12) NOT NULL,
  `MPPID` int(12) NOT NULL,
  PRIMARY KEY (`MPPCID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `MP_Questions`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `MP_Questions` (
  `MPQID` int(11) NOT NULL AUTO_INCREMENT,
  `MPPID` int(12) NOT NULL,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `UserID` int(11) NOT NULL DEFAULT '0',
  `Comments` tinytext NOT NULL,
  `Updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `MPPQID` int(11) NOT NULL,
  PRIMARY KEY (`MPQID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `UserID` (`UserID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `MP_ResourceTypes`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `MP_ResourceTypes` (
  `MPRTID` int(11) NOT NULL AUTO_INCREMENT,
  `Name` varchar(32) NOT NULL,
  PRIMARY KEY (`MPRTID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `MP_SubjectAreas`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `MP_SubjectAreas` (
  `MPSAID` int(11) NOT NULL AUTO_INCREMENT,
  `Name` varchar(32) NOT NULL,
  PRIMARY KEY (`MPSAID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `MP_Transactions`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `MP_Transactions` (
  `MPTID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `UserID` int(11) NOT NULL,
  `ProcessorID` int(11) NOT NULL,
  `Status` int(11) NOT NULL COMMENT '1=Approved, 2=Void, 3=Hold, 4=Settled',
  `MethodType` int(11) NOT NULL COMMENT '1=cc 2=echeck',
  `CardType` int(11) NOT NULL COMMENT '2=V,3=M,4=A,5=D',
  `AmountSubmitted` decimal(10,2) NOT NULL,
  `AmountCharged` decimal(10,2) NOT NULL,
  `SubmitDateTime` datetime NOT NULL,
  `ProcessDateTime` datetime NOT NULL,
  `Settled` int(11) NOT NULL,
  `TransactionID` int(11) NOT NULL,
  `TransactionCode` varchar(24) NOT NULL,
  `ResponseType` varchar(8) NOT NULL,
  `ResponseCode` varchar(8) NOT NULL,
  `ResponseDescription` varchar(254) NOT NULL,
  `AuthorizationCode` varchar(32) NOT NULL,
  `TraceNumber` varchar(64) NOT NULL,
  `AuthorID` int(11) NOT NULL,
  `Comments` varchar(255) NOT NULL,
  `UpdateDT` datetime NOT NULL,
  PRIMARY KEY (`MPTID`),
  KEY `CompanyID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `MaritalStatus`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `MaritalStatus` (
  `MaritalStatusID` int(11) NOT NULL AUTO_INCREMENT,
  `MaritalStatusCode` varchar(16) NOT NULL DEFAULT '',
  KEY `MaritalStatusID` (`MaritalStatusID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `MarkTmp`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `MarkTmp` (
  `MTID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `StudentID` int(11) NOT NULL,
  `ClassID` int(11) NOT NULL,
  PRIMARY KEY (`MTID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `Medications`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Medications` (
  `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 COMMENT='StudentMedications';
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `MessageOptions`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `MessageOptions` (
  `MOID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `UserID` int(11) NOT NULL DEFAULT '0',
  `Recieve` int(11) NOT NULL DEFAULT '0',
  `Audio` int(11) NOT NULL DEFAULT '0',
  `Color` varchar(8) NOT NULL DEFAULT '',
  `Signature` longtext NOT NULL,
  `Instant` int(11) NOT NULL DEFAULT '0',
  `LifeSpan` int(11) NOT NULL DEFAULT '60',
  PRIMARY KEY (`MOID`),
  UNIQUE KEY `MOID_2` (`MOID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `UserID` (`UserID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `Messages`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Messages` (
  `MessageID` int(11) NOT NULL AUTO_INCREMENT,
  `MessageUID` varchar(16) NOT NULL DEFAULT '',
  `Date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `FromID` varchar(16) NOT NULL DEFAULT '',
  `FromUID` int(11) NOT NULL DEFAULT '0',
  `FromFamilyID` int(11) NOT NULL DEFAULT '0',
  `ToID` varchar(16) NOT NULL DEFAULT '',
  `ToUID` int(11) NOT NULL DEFAULT '0',
  `Subject` varchar(128) NOT NULL DEFAULT '',
  `Message` longtext NOT NULL,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `SentDate` datetime DEFAULT NULL,
  `ReadDate` datetime DEFAULT NULL,
  `DeleteRecv` int(11) NOT NULL DEFAULT '0',
  `DeleteSend` int(11) NOT NULL DEFAULT '0',
  `Color` varchar(8) NOT NULL DEFAULT '',
  `FamilyID` int(11) NOT NULL DEFAULT '0',
  UNIQUE KEY `MessageID` (`MessageID`),
  KEY `MessageUID` (`MessageUID`),
  KEY `FromUID` (`FromUID`),
  KEY `Date` (`Date`),
  KEY `SchoolID` (`SchoolID`),
  KEY `SentDate` (`SentDate`),
  KEY `ToUID` (`ToUID`),
  KEY `ReadDate` (`ReadDate`),
  KEY `DeleteRecv` (`DeleteRecv`),
  KEY `DeleteSend` (`DeleteSend`),
  KEY `NewMsg` (`ToUID`,`ReadDate`,`DeleteRecv`),
  KEY `Count` (`ToUID`,`DeleteRecv`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `Motd`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Motd` (
  `MotdID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `MsgDate` date DEFAULT NULL,
  `Message` longtext NOT NULL,
  `Lang` char(2) NOT NULL DEFAULT '',
  `Title` varchar(64) NOT NULL DEFAULT '',
  `Color` varchar(10) NOT NULL DEFAULT '',
  `Banner` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`MotdID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `MsgDate` (`MsgDate`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `Multimedia`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Multimedia` (
  `MMID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `MMGID` int(11) NOT NULL COMMENT 'MM Group ID',
  `ClassID` int(11) NOT NULL DEFAULT '0',
  `URL` varchar(255) NOT NULL DEFAULT '',
  `Name` varchar(32) NOT NULL DEFAULT '',
  `Comments` text NOT NULL,
  `Artist` varchar(32) NOT NULL DEFAULT '',
  `Type` varchar(32) NOT NULL DEFAULT '',
  `Alert` int(11) NOT NULL DEFAULT '0',
  `Public` int(11) NOT NULL DEFAULT '0',
  `AuthorID` int(11) NOT NULL DEFAULT '0',
  `Updated` datetime NOT NULL,
  `Embed` text NOT NULL,
  KEY `MediaID` (`MMID`),
  KEY `CompanyID` (`SchoolID`),
  KEY `ProjectID` (`ClassID`),
  KEY `Type` (`Type`),
  KEY `Alert` (`Alert`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `MultimediaGroups`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `MultimediaGroups` (
  `MMGID` int(11) NOT NULL AUTO_INCREMENT COMMENT 'multimedia group id',
  `SchoolID` int(11) NOT NULL,
  `Name` varchar(16) NOT NULL,
  `Description` varchar(64) NOT NULL,
  `Sequence` int(11) NOT NULL,
  `Type` int(11) NOT NULL,
  PRIMARY KEY (`MMGID`),
  KEY `CompanyID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `MultimediaRead`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `MultimediaRead` (
  `MMRID` int(11) NOT NULL AUTO_INCREMENT,
  `MID` int(11) NOT NULL DEFAULT '0',
  `CompanyID` int(11) NOT NULL DEFAULT '0',
  `ClassID` int(11) NOT NULL,
  `UserID` int(11) NOT NULL DEFAULT '0',
  `DateTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  PRIMARY KEY (`MMRID`),
  KEY `MID` (`MID`),
  KEY `CompanyID` (`CompanyID`),
  KEY `UserID` (`UserID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `MyBlogComments`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `MyBlogComments` (
  `MBCID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `BlogID` int(11) NOT NULL DEFAULT '0',
  `AuthorID` int(11) NOT NULL DEFAULT '0',
  `Comments` text NOT NULL,
  `DateTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  PRIMARY KEY (`MBCID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `NewsID` (`BlogID`),
  KEY `AuthorID` (`AuthorID`),
  KEY `DateTime` (`DateTime`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `MyBlogRead`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `MyBlogRead` (
  `BlogReadID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `BlogID` 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 (`BlogReadID`),
  UNIQUE KEY `NewsReadID_2` (`BlogReadID`),
  KEY `NewsReadID` (`BlogReadID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `UserID` (`UserID`),
  KEY `DateTime` (`DateTime`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `MyBlogs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `MyBlogs` (
  `BlogID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `AuthorID` int(11) NOT NULL DEFAULT '0',
  `Date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Subject` varchar(64) NOT NULL DEFAULT '',
  `Message` longtext NOT NULL,
  `PhotoID` int(11) NOT NULL DEFAULT '0',
  `AuthorNotification` int(11) NOT NULL DEFAULT '0',
  `AllowComments` int(11) NOT NULL DEFAULT '0',
  `Updated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Created` date NOT NULL DEFAULT '0000-00-00',
  `Archive` int(11) NOT NULL DEFAULT '0',
  UNIQUE KEY `NewsID` (`BlogID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `Date` (`Date`),
  KEY `Updated` (`Updated`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `MyCategories`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `MyCategories` (
  `CategoryID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `UserID` int(11) NOT NULL DEFAULT '0',
  `Name` varchar(32) NOT NULL DEFAULT '',
  `Description` varchar(255) NOT NULL DEFAULT '',
  `Color` varchar(8) NOT NULL DEFAULT '',
  `Type` int(11) NOT NULL DEFAULT '1',
  PRIMARY KEY (`CategoryID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `UserID` (`UserID`),
  KEY `Name` (`Name`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `MyCategoryContacts`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `MyCategoryContacts` (
  `CCCID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `UserID` int(11) NOT NULL DEFAULT '0',
  `ContactID` int(11) NOT NULL DEFAULT '0',
  `CatagoryID` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`CCCID`),
  KEY `UserID` (`UserID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ContactID` (`ContactID`),
  KEY `CatagoryID` (`CatagoryID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `MyDocDownLoads`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `MyDocDownLoads` (
  `DDLID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `DocumentID` 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 (`DDLID`),
  UNIQUE KEY `DDLID` (`DDLID`),
  KEY `DDLID_2` (`DDLID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `MyDocFolderLinks`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `MyDocFolderLinks` (
  `MDFLID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `UserID` int(11) NOT NULL,
  `DocFolderID` int(11) NOT NULL,
  `ClassID` int(11) NOT NULL,
  PRIMARY KEY (`MDFLID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `UserID` (`UserID`),
  KEY `MyDocumentID` (`DocFolderID`),
  KEY `ClassID` (`ClassID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `MyDocFolders`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `MyDocFolders` (
  `DocFolderID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `UserID` int(11) NOT NULL DEFAULT '0',
  `Name` varchar(32) NOT NULL DEFAULT '',
  `Comments` tinytext NOT NULL,
  `Starred` tinyint(4) NOT NULL,
  `SystemFolder` int(11) NOT NULL COMMENT 'Classid associated with folder',
  `DateTime` datetime NOT NULL,
  `CreateDateTime` datetime NOT NULL,
  `ModifyDateTime` datetime NOT NULL,
  `ParentFolderID` int(11) NOT NULL DEFAULT '0',
  `GoogleID` varchar(255) NOT NULL,
  `GoogleParentID` varchar(255) NOT NULL,
  `GoogleEditURL` varchar(255) NOT NULL,
  `GoogleOwner` varchar(128) NOT NULL,
  `Deleted` tinyint(4) NOT NULL,
  PRIMARY KEY (`DocFolderID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `UserID` (`UserID`),
  KEY `ParentFolderID` (`ParentFolderID`),
  KEY `GoogleID` (`GoogleID`),
  KEY `Starred` (`Starred`),
  KEY `SystemFolder` (`SystemFolder`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `MyDocumentLinks`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `MyDocumentLinks` (
  `MDLID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `UserID` int(11) NOT NULL,
  `MyDocumentID` int(11) NOT NULL,
  `ClassID` int(11) NOT NULL,
  PRIMARY KEY (`MDLID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `UserID` (`UserID`),
  KEY `MyDocumentID` (`MyDocumentID`),
  KEY `ClassID` (`ClassID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `MyDocuments`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `MyDocuments` (
  `DocumentID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `ClassID` int(11) NOT NULL,
  `UserID` int(11) NOT NULL DEFAULT '0',
  `Filename` varchar(255) NOT NULL DEFAULT '',
  `UFilename` varchar(32) NOT NULL DEFAULT '',
  `DateTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `CreateDateTime` datetime NOT NULL,
  `ModifyDateTime` datetime NOT NULL,
  `Size` int(11) NOT NULL DEFAULT '0',
  `Comments` text NOT NULL,
  `Location` varchar(255) NOT NULL DEFAULT '',
  `Type` varchar(128) NOT NULL DEFAULT '',
  `FolderID` int(11) NOT NULL DEFAULT '0',
  `Starred` tinyint(4) NOT NULL,
  `Online` int(11) NOT NULL DEFAULT '0',
  `VirusScan` tinyint(4) NOT NULL,
  `VirusScanResults` varchar(128) NOT NULL,
  `GoogleID` varchar(128) NOT NULL,
  `GoogleSize` int(11) NOT NULL,
  `GoogleShared` int(11) NOT NULL,
  `GoogleOwner` varchar(128) NOT NULL,
  `GoogleFolderID` varchar(128) NOT NULL,
  `GoogleEditURL` varchar(255) NOT NULL,
  `GoogleDownloadURL` varchar(255) NOT NULL,
  `Deleted` tinyint(4) NOT NULL,
  `ParentDocumentID` int(11) NOT NULL,
  UNIQUE KEY `DocumentID_2` (`DocumentID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `UserID` (`UserID`),
  KEY `Filename` (`Filename`),
  KEY `DateTime` (`DateTime`),
  KEY `ModifyDateTime` (`ModifyDateTime`),
  KEY `FolderID` (`FolderID`),
  KEY `GoogleID` (`GoogleID`),
  KEY `ParentDocumentID` (`ParentDocumentID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `MyLinkCatagories`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `MyLinkCatagories` (
  `MyLinkCatagoryID` int(11) NOT NULL AUTO_INCREMENT,
  `UserID` int(11) NOT NULL DEFAULT '0',
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `Description` varchar(128) NOT NULL DEFAULT '',
  `Name` varchar(32) NOT NULL DEFAULT '',
  PRIMARY KEY (`MyLinkCatagoryID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `UserID` (`UserID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `MyLinks`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `MyLinks` (
  `MyLinkID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `UserID` int(11) NOT NULL DEFAULT '0',
  `MyLinkCatagoryID` int(11) NOT NULL DEFAULT '0',
  `URL` varchar(255) NOT NULL DEFAULT '',
  `Secure` int(11) NOT NULL DEFAULT '0',
  `Name` varchar(32) NOT NULL DEFAULT '',
  `Description` varchar(255) NOT NULL DEFAULT '',
  `Alert` int(11) NOT NULL DEFAULT '0',
  `Hits` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`MyLinkID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `UserID` (`UserID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `MyNews`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `MyNews` (
  `MyNewsID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `Date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Subject` varchar(64) NOT NULL DEFAULT '',
  `Message` text NOT NULL,
  `PhotoID` int(11) NOT NULL DEFAULT '0',
  `Author` varchar(16) NOT NULL DEFAULT '0',
  `AuthorID` int(11) NOT NULL DEFAULT '0',
  `AuthorNotification` int(11) NOT NULL DEFAULT '0',
  `AllowComments` int(11) NOT NULL DEFAULT '0',
  `EditorID` int(11) NOT NULL DEFAULT '0',
  `Updated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Created` date NOT NULL DEFAULT '0000-00-00',
  `Priority` int(11) NOT NULL DEFAULT '5',
  `TopStory` int(11) NOT NULL DEFAULT '0',
  `Archive` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`MyNewsID`),
  KEY `Date` (`Date`),
  KEY `TopStory` (`TopStory`),
  KEY `Archive` (`Archive`),
  KEY `Updated` (`Updated`),
  KEY `Priority` (`Priority`),
  KEY `Created` (`Created`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `MyNewsComments`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `MyNewsComments` (
  `MyNewCommentID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `MyNewsID` int(11) NOT NULL DEFAULT '0',
  `AuthorID` int(11) NOT NULL DEFAULT '0',
  `Comments` text NOT NULL,
  `DateTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  PRIMARY KEY (`MyNewCommentID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `NewsID` (`MyNewsID`),
  KEY `AuthorID` (`AuthorID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `MyNewsLinks`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `MyNewsLinks` (
  `MNLID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `UserID` int(11) NOT NULL,
  `MyNewsID` int(11) NOT NULL,
  `ClassID` int(11) NOT NULL,
  PRIMARY KEY (`MNLID`),
  KEY `UserID` (`UserID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `MyNewsRead`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `MyNewsRead` (
  `MyNewsReadID` int(11) NOT NULL AUTO_INCREMENT,
  `MyNewsID` 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 (`MyNewsReadID`),
  KEY `UserID` (`UserID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `NewsID` (`MyNewsID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `MyPhotoFolders`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `MyPhotoFolders` (
  `PhotoFolderID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `UserID` int(11) NOT NULL,
  `StudentID` int(11) NOT NULL,
  `Name` varchar(32) NOT NULL DEFAULT '',
  `Comments` tinytext NOT NULL,
  PRIMARY KEY (`PhotoFolderID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `UserID` (`UserID`),
  KEY `StudentID` (`StudentID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `MyPhotoLinks`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `MyPhotoLinks` (
  `MDLID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `UserID` int(11) NOT NULL,
  `PhotoID` int(11) NOT NULL,
  `ClassID` int(11) NOT NULL,
  PRIMARY KEY (`MDLID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `UserID` (`UserID`),
  KEY `MyDocumentID` (`PhotoID`),
  KEY `ClassID` (`ClassID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `MyPhotos`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `MyPhotos` (
  `PhotoID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `UserID` int(11) NOT NULL DEFAULT '0',
  `StudentID` int(11) NOT NULL,
  `FolderID` int(11) NOT NULL DEFAULT '0',
  `FileName` varchar(255) NOT NULL DEFAULT '',
  `DateTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Size` int(11) NOT NULL DEFAULT '0',
  `Title` varchar(64) NOT NULL,
  `Comments` varchar(64) NOT NULL DEFAULT '',
  `Location` varchar(255) NOT NULL DEFAULT '',
  `Type` varchar(32) NOT NULL DEFAULT '',
  PRIMARY KEY (`PhotoID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ClassID` (`UserID`),
  KEY `FolderID` (`FolderID`),
  KEY `StudentID` (`StudentID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `MyTaskLists`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `MyTaskLists` (
  `TaskListID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `UserID` int(11) NOT NULL,
  `Name` varchar(32) NOT NULL,
  `GoogleID` varchar(128) NOT NULL,
  `GoogleSync` int(11) NOT NULL,
  PRIMARY KEY (`TaskListID`),
  KEY `CompanyID` (`SchoolID`),
  KEY `UserID` (`UserID`),
  KEY `GoogleID` (`GoogleID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `MyTaskLogs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `MyTaskLogs` (
  `TaskLogID` int(11) NOT NULL AUTO_INCREMENT,
  `TaskLogTypeID` int(11) NOT NULL DEFAULT '0',
  `CompanyID` int(11) NOT NULL DEFAULT '0',
  `TaskID` int(11) NOT NULL DEFAULT '0',
  `AuthorID` int(11) NOT NULL DEFAULT '0',
  `Date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Subject` varchar(64) NOT NULL DEFAULT '',
  `Message` longtext NOT NULL,
  UNIQUE KEY `LogID` (`TaskLogID`),
  KEY `CompanyID` (`CompanyID`),
  KEY `ProjectID` (`TaskID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `MyTasks`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `MyTasks` (
  `TaskID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `AuthorID` int(11) NOT NULL DEFAULT '0',
  `AssignedID` int(11) NOT NULL,
  `Name` varchar(32) NOT NULL,
  `Description` varchar(255) NOT NULL DEFAULT '',
  `TaskListID` int(11) NOT NULL,
  `Priority` int(11) NOT NULL DEFAULT '3',
  `ModifyDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `CreatedDate` date NOT NULL,
  `Status` int(11) NOT NULL DEFAULT '0',
  `DueDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `HHID` int(11) NOT NULL DEFAULT '0',
  `Progress` int(11) NOT NULL,
  `Closed` int(11) NOT NULL,
  `GoogleID` varchar(128) NOT NULL,
  `GoogleSync` int(11) NOT NULL,
  PRIMARY KEY (`TaskID`),
  KEY `ToDoID` (`TaskID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `AuthorID` (`AuthorID`),
  KEY `DueDate` (`DueDate`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `MyTasksNew`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `MyTasksNew` (
  `TaskID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `AuthorID` int(11) NOT NULL DEFAULT '0',
  `AssignedID` int(11) NOT NULL,
  `Name` varchar(32) NOT NULL,
  `Description` varchar(255) NOT NULL DEFAULT '',
  `TaskListID` int(11) NOT NULL,
  `Priority` int(11) NOT NULL DEFAULT '3',
  `ModifyDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `CreatedDate` date NOT NULL,
  `Status` int(11) NOT NULL DEFAULT '0',
  `DueDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `HHID` int(11) NOT NULL DEFAULT '0',
  `Progress` int(11) NOT NULL,
  `Closed` int(11) NOT NULL,
  `GoogleID` varchar(128) NOT NULL,
  `GoogleSync` int(11) NOT NULL,
  PRIMARY KEY (`TaskID`),
  KEY `ToDoID` (`TaskID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `AuthorID` (`AuthorID`),
  KEY `DueDate` (`DueDate`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `MyToDo`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `MyToDo` (
  `ToDoID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `AuthorID` int(11) NOT NULL DEFAULT '0',
  `Description` varchar(255) NOT NULL DEFAULT '',
  `Priority` int(11) NOT NULL DEFAULT '3',
  `ModifyDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Name` varchar(32) NOT NULL DEFAULT '',
  `Status` int(11) NOT NULL DEFAULT '0',
  `DueDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `HHID` int(11) NOT NULL DEFAULT '0',
  `Deleted` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`ToDoID`),
  KEY `ToDoID` (`ToDoID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `AuthorID` (`AuthorID`),
  KEY `DueDate` (`DueDate`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `MyToDoAlarms`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `MyToDoAlarms` (
  `TDAlarmID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `UserID` int(11) NOT NULL DEFAULT '0',
  `ToDoID` int(11) NOT NULL DEFAULT '0',
  KEY `TDAlarmID` (`TDAlarmID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `UserID` (`UserID`),
  KEY `ToDoID` (`ToDoID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `News`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `News` (
  `NewsID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `Date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `NSID` int(11) NOT NULL DEFAULT '0',
  `Subject` varchar(64) NOT NULL DEFAULT '',
  `Message` text NOT NULL,
  `DocumentID` int(11) NOT NULL COMMENT 'MyDocument ID',
  `PhotoID` int(11) NOT NULL DEFAULT '0',
  `PhotoURL` varchar(128) NOT NULL,
  `Author` varchar(16) NOT NULL DEFAULT '0',
  `AuthorID` int(11) NOT NULL DEFAULT '0',
  `AuthorNotification` int(11) NOT NULL DEFAULT '0',
  `AllowComments` int(11) NOT NULL DEFAULT '0',
  `ClassID` int(11) NOT NULL DEFAULT '0',
  `Internal` int(11) NOT NULL DEFAULT '0',
  `Exposure` int(11) NOT NULL DEFAULT '0',
  `EditorID` int(11) NOT NULL DEFAULT '0',
  `Updated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Created` date NOT NULL DEFAULT '0000-00-00',
  `Priority` int(11) NOT NULL DEFAULT '5',
  `Public` int(11) NOT NULL DEFAULT '0',
  `TopStory` int(11) NOT NULL DEFAULT '0',
  `CoverStory` int(11) NOT NULL DEFAULT '0',
  `Archive` int(11) NOT NULL DEFAULT '0',
  `ParentNewsID` int(11) NOT NULL,
  PRIMARY KEY (`NewsID`),
  KEY `Date` (`Date`),
  KEY `ClassID` (`ClassID`),
  KEY `NSID` (`NSID`),
  KEY `TopStory` (`TopStory`),
  KEY `Archive` (`Archive`),
  KEY `Updated` (`Updated`),
  KEY `Priority` (`Priority`),
  KEY `Public` (`Public`),
  KEY `Exposure` (`Exposure`),
  KEY `Internal` (`Internal`),
  KEY `Created` (`Created`),
  KEY `SchoolID` (`SchoolID`),
  KEY `DocumentID` (`DocumentID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `NewsAttachments`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `NewsAttachments` (
  `CAAID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `ClassID` int(11) NOT NULL DEFAULT '0',
  `NewsID` int(11) NOT NULL DEFAULT '0',
  `DocumentID` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`CAAID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ClassID` (`ClassID`),
  KEY `CAID` (`NewsID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `NewsComments`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `NewsComments` (
  `NewCommentID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `NewsID` int(11) NOT NULL DEFAULT '0',
  `AuthorID` int(11) NOT NULL DEFAULT '0',
  `Comments` text NOT NULL,
  `DateTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  PRIMARY KEY (`NewCommentID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `NewsID` (`NewsID`),
  KEY `AuthorID` (`AuthorID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `NewsLikes`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `NewsLikes` (
  `NewsLikeID` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Unique ID for likes',
  `SchoolID` int(11) NOT NULL,
  `NewsID` int(11) NOT NULL COMMENT 'NewsID',
  `UserID` int(11) NOT NULL COMMENT 'UserID',
  PRIMARY KEY (`NewsLikeID`),
  KEY `NewsID` (`NewsID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `NewsRead`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `NewsRead` (
  `NewsReadID` int(11) NOT NULL AUTO_INCREMENT,
  `Mobile` smallint(6) NOT NULL,
  `NewsID` 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 (`NewsReadID`),
  KEY `UserID` (`UserID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `NewsID` (`NewsID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `NewsSections`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `NewsSections` (
  `NSID` int(11) NOT NULL AUTO_INCREMENT,
  `Name` varchar(32) NOT NULL DEFAULT '',
  `Description` varchar(64) NOT NULL DEFAULT '',
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `ClassID` int(11) NOT NULL DEFAULT '0',
  `Sequence` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`NSID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `Notepad`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Notepad` (
  `NotepadID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `AuthorID` int(11) NOT NULL DEFAULT '0',
  `Alert` int(11) NOT NULL DEFAULT '0',
  `ModifyDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Subject` varchar(64) NOT NULL,
  `Note` text NOT NULL,
  `Public` int(11) NOT NULL DEFAULT '0',
  `HHID` int(11) NOT NULL DEFAULT '0',
  `Deleted` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`NotepadID`),
  KEY `NotepadID` (`NotepadID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `AuthorID` (`AuthorID`),
  KEY `ModifyDate` (`ModifyDate`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `OAuthLogs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `OAuthLogs` (
  `OALID` int(11) NOT NULL AUTO_INCREMENT,
  `Type` varchar(32) DEFAULT NULL,
  `Data` varchar(256) DEFAULT NULL,
  `DateTime` datetime DEFAULT NULL,
  `SchoolID` int(11) DEFAULT NULL,
  `UserID` int(11) DEFAULT NULL,
  `StudentID` int(11) DEFAULT NULL,
  `Comments` varchar(128) DEFAULT NULL,
  `Vendor` varchar(32) DEFAULT NULL,
  PRIMARY KEY (`OALID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `Occupation`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Occupation` (
  `OcID` int(11) NOT NULL AUTO_INCREMENT,
  `OcCode` varchar(5) NOT NULL DEFAULT '',
  `OcDesc` varchar(16) NOT NULL DEFAULT '',
  PRIMARY KEY (`OcID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `OneSignalPlayers`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `OneSignalPlayers` (
  `OSPID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `UserID` int(11) NOT NULL,
  `PlayerID` varchar(255) NOT NULL,
  `Name` varchar(255) NOT NULL,
  PRIMARY KEY (`OSPID`),
  UNIQUE KEY `SchoolID` (`SchoolID`,`UserID`,`PlayerID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `OnlineEvaluationAnswers`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `OnlineEvaluationAnswers` (
  `EAID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `ClassID` int(11) NOT NULL,
  `EVID` int(11) NOT NULL,
  `EVQID` int(11) NOT NULL,
  `EVTID` int(11) NOT NULL,
  `StudentID` int(11) NOT NULL,
  `DateTime` datetime NOT NULL,
  `Answer` varchar(255) NOT NULL,
  `Essay` text NOT NULL,
  `Correct` int(11) NOT NULL,
  `Points` decimal(10,2) NOT NULL,
  `Comments` varchar(128) NOT NULL,
  PRIMARY KEY (`EAID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ClassID` (`ClassID`),
  KEY `TID` (`EVID`),
  KEY `TTID` (`EVTID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `OnlineEvaluationLinks`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `OnlineEvaluationLinks` (
  `EVLID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `UserID` int(11) NOT NULL,
  `EVID` int(11) NOT NULL,
  `ClassID` int(11) NOT NULL,
  PRIMARY KEY (`EVLID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `UserID` (`UserID`),
  KEY `TID` (`EVID`),
  KEY `ClassID` (`ClassID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `OnlineEvaluationQuestions`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `OnlineEvaluationQuestions` (
  `EVQID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `ClassID` int(11) NOT NULL,
  `EVID` int(11) NOT NULL,
  `Type` int(11) NOT NULL,
  `Question` text NOT NULL,
  `Sequence` int(11) NOT NULL,
  `Scale` int(11) NOT NULL,
  PRIMARY KEY (`EVQID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ClassID` (`ClassID`),
  KEY `TID` (`EVID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `OnlineEvaluations`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `OnlineEvaluations` (
  `EVID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `AuthorID` int(11) NOT NULL DEFAULT '0',
  `Status` int(11) NOT NULL,
  `Sequence` int(11) NOT NULL,
  `Title` varchar(32) NOT NULL,
  `Description` varchar(255) NOT NULL,
  `Instructions` text NOT NULL,
  `ThankYou` text NOT NULL,
  `Anonymous` int(11) NOT NULL,
  `Locked` int(11) NOT NULL,
  PRIMARY KEY (`EVID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ClassID` (`AuthorID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `OnlineTestAnswers`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `OnlineTestAnswers` (
  `TAID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `ClassID` int(11) NOT NULL,
  `TID` int(11) NOT NULL,
  `TQID` int(11) NOT NULL,
  `TTID` int(11) NOT NULL,
  `StudentID` int(11) NOT NULL,
  `DateTime` datetime NOT NULL,
  `Answer` varchar(255) NOT NULL,
  `Essay` text NOT NULL,
  `Correct` int(11) NOT NULL,
  `Points` decimal(10,2) NOT NULL,
  `Comments` varchar(128) NOT NULL,
  PRIMARY KEY (`TAID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ClassID` (`ClassID`),
  KEY `TID` (`TID`),
  KEY `TTID` (`TTID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `OnlineTestAssignments`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `OnlineTestAssignments` (
  `OLAID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `ClassID` int(11) NOT NULL,
  `TID` int(11) NOT NULL,
  `CAID` int(11) NOT NULL,
  PRIMARY KEY (`OLAID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ClassID` (`ClassID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Maping Test to Classroom Assignments';
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `OnlineTestLinks`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `OnlineTestLinks` (
  `MOTLID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `UserID` int(11) NOT NULL,
  `TID` int(11) NOT NULL,
  `ClassID` int(11) NOT NULL,
  PRIMARY KEY (`MOTLID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `UserID` (`UserID`),
  KEY `TID` (`TID`),
  KEY `ClassID` (`ClassID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `OnlineTestLogs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `OnlineTestLogs` (
  `OTLID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `TID` int(11) NOT NULL,
  `ClassID` int(11) NOT NULL,
  `AuthorID` int(11) NOT NULL,
  `Comments` varchar(255) NOT NULL,
  `UpdateDT` datetime NOT NULL,
  PRIMARY KEY (`OTLID`),
  KEY `CompanyID` (`SchoolID`),
  KEY `TID` (`TID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `OnlineTestQuestions`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `OnlineTestQuestions` (
  `TQID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `ClassID` int(11) NOT NULL,
  `TID` int(11) NOT NULL,
  `Type` int(11) NOT NULL,
  `Question` text NOT NULL,
  `Sequence` int(11) NOT NULL,
  `Points` decimal(10,2) NOT NULL,
  `Choice1` varchar(255) NOT NULL,
  `Choice2` varchar(255) NOT NULL,
  `Choice3` varchar(255) NOT NULL,
  `Choice4` varchar(255) NOT NULL,
  `Choice5` varchar(255) NOT NULL,
  `Answer` varchar(128) NOT NULL,
  PRIMARY KEY (`TQID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ClassID` (`ClassID`),
  KEY `TID` (`TID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `OnlineTestTaken`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `OnlineTestTaken` (
  `TTID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `ClassID` int(11) NOT NULL,
  `TID` int(11) NOT NULL,
  `StudentID` int(11) NOT NULL,
  `TakenCount` int(11) NOT NULL DEFAULT '0',
  `StartTime` datetime NOT NULL,
  `StopTime` datetime NOT NULL,
  PRIMARY KEY (`TTID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ClassID` (`ClassID`),
  KEY `TID` (`TID`),
  KEY `StudentID` (`StudentID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `OnlineTests`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `OnlineTests` (
  `TID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `AuthorID` int(11) NOT NULL DEFAULT '0',
  `Status` int(11) NOT NULL,
  `Sequence` int(11) NOT NULL,
  `Title` varchar(32) NOT NULL,
  `Description` varchar(255) NOT NULL,
  `TestMode` int(11) NOT NULL DEFAULT '1',
  `Reviewable` int(11) NOT NULL DEFAULT '0',
  `Retakes` int(11) NOT NULL DEFAULT '0',
  `Instructions` text NOT NULL,
  `Locked` int(11) NOT NULL,
  PRIMARY KEY (`TID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ClassID` (`AuthorID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `PANMessages`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PANMessages` (
  `MessageID` int(11) NOT NULL AUTO_INCREMENT,
  `MessageUID` varchar(16) NOT NULL DEFAULT '',
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `FromUID` int(11) NOT NULL DEFAULT '0',
  `Date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Subject` varchar(64) NOT NULL DEFAULT '',
  `Message` longtext NOT NULL,
  `Color` varchar(8) NOT NULL DEFAULT '',
  `Deleted` int(11) NOT NULL DEFAULT '0',
  `Support` int(11) NOT NULL DEFAULT '0',
  UNIQUE KEY `MessageID` (`MessageID`),
  KEY `MessageUID` (`MessageUID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `FromUID` (`FromUID`),
  KEY `Support` (`Support`),
  KEY `FromSearch` (`FromUID`,`Deleted`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `PANRecipients`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PANRecipients` (
  `PRID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `MessageID` int(11) NOT NULL DEFAULT '0',
  `Date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Subject` varchar(64) NOT NULL DEFAULT '',
  `FromUID` int(11) NOT NULL DEFAULT '0',
  `ToUID` int(11) NOT NULL DEFAULT '0',
  `Delivered` int(11) NOT NULL DEFAULT '0',
  `Closed` int(11) NOT NULL DEFAULT '0',
  `Deleted` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`PRID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `MessageID` (`MessageID`),
  KEY `FromUID` (`FromUID`),
  KEY `ToUID` (`ToUID`),
  KEY `ToDelivered` (`ToUID`,`Delivered`),
  KEY `Delivered` (`Delivered`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `PTConfConfig`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PTConfConfig` (
  `PTCCID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `Active` int(11) NOT NULL,
  `Label` varchar(64) NOT NULL,
  `HROnly` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`PTCCID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `PTConfDates`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PTConfDates` (
  `PTCDID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `Date` date NOT NULL,
  `TimeBlock` int(3) NOT NULL DEFAULT '30',
  `StartTime` time NOT NULL,
  `StopTime` time NOT NULL,
  `Active` int(11) NOT NULL,
  `BreakTime` int(3) NOT NULL,
  PRIMARY KEY (`PTCDID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Parent/Teacher Conference Date';
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `PTConfFamilies`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PTConfFamilies` (
  `PTCFID` int(11) NOT NULL AUTO_INCREMENT,
  `PTCDID` int(11) NOT NULL,
  `SchoolID` int(11) NOT NULL,
  `FamilyID` int(11) NOT NULL,
  PRIMARY KEY (`PTCFID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `PTConfMeetings`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PTConfMeetings` (
  `PTMID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `Date` date NOT NULL,
  `Time` time NOT NULL,
  `UserID` int(11) NOT NULL,
  `FamilyID` int(11) NOT NULL,
  `StudentID` int(11) NOT NULL,
  `status` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`PTMID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `UserID` (`UserID`),
  KEY `FamilyID` (`FamilyID`),
  KEY `Date` (`Date`),
  KEY `Time` (`Time`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `PTConfUsers`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PTConfUsers` (
  `PTCUID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `UserID` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`PTCUID`),
  KEY `CompanyID` (`SchoolID`),
  KEY `UserID` (`UserID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `ParentEngagement`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ParentEngagement` (
  `PEID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `FamilyID` int(11) NOT NULL,
  `Updated` date NOT NULL,
  `PEI` decimal(2,1) NOT NULL,
  `Logins` int(11) NOT NULL,
  `NewsRead` int(11) NOT NULL,
  `ClassVisits` int(11) NOT NULL,
  `GradeVisits` int(11) NOT NULL,
  `PANsRead` int(11) NOT NULL,
  PRIMARY KEY (`PEID`),
  KEY `FamilyID` (`FamilyID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `ParentNotifyLog`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ParentNotifyLog` (
  `PNLID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `ContactID` int(11) NOT NULL,
  `Name` varchar(32) NOT NULL COMMENT 'Contact Name',
  `Email` varchar(128) NOT NULL,
  `Absent` bit(1) NOT NULL DEFAULT b'0',
  `Tardy` bit(1) NOT NULL DEFAULT b'0',
  `GradeBelow` bit(1) NOT NULL DEFAULT b'0',
  `GradeAbove` bit(1) NOT NULL DEFAULT b'0',
  `LowerThan` int(11) NOT NULL DEFAULT '0',
  `HigherThan` int(11) NOT NULL DEFAULT '100',
  `FamilyID` int(11) NOT NULL DEFAULT '0',
  `Students` varchar(255) NOT NULL COMMENT 'First names of students in report',
  `Notified` datetime NOT NULL,
  PRIMARY KEY (`PNLID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ID` (`ContactID`),
  KEY `Name` (`Name`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `PartnerContacts`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PartnerContacts` (
  `PNID` int(11) NOT NULL AUTO_INCREMENT,
  `PartnerID` int(11) NOT NULL DEFAULT '0',
  `CompanyID` int(11) NOT NULL DEFAULT '0',
  `ContactID` int(11) NOT NULL DEFAULT '0',
  UNIQUE KEY `ContactID` (`PNID`),
  KEY `PartnerID` (`PartnerID`),
  KEY `CompanyID` (`CompanyID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `PartnerDocFolders`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PartnerDocFolders` (
  `DocFolderID` int(11) NOT NULL AUTO_INCREMENT,
  `PartnerID` int(11) NOT NULL DEFAULT '0',
  `ProjectID` int(11) NOT NULL DEFAULT '0',
  `Name` varchar(32) NOT NULL DEFAULT '',
  `Comments` tinytext NOT NULL,
  `Junk` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`DocFolderID`),
  UNIQUE KEY `DocFolderID_2` (`DocFolderID`),
  KEY `DocFolderID` (`DocFolderID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `PartnerDocuments`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PartnerDocuments` (
  `PDID` int(11) NOT NULL AUTO_INCREMENT,
  `PartnerID` int(11) NOT NULL DEFAULT '0',
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `DocumentID` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`PDID`),
  KEY `PartnerID` (`PartnerID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `DocumentID` (`DocumentID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `PartnerEvents`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PartnerEvents` (
  `PEID` int(11) NOT NULL AUTO_INCREMENT,
  `PartnerID` int(11) NOT NULL DEFAULT '0',
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `EventID` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`PEID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `PartnerForms`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PartnerForms` (
  `PDID` int(11) NOT NULL AUTO_INCREMENT,
  `PartnerID` int(11) NOT NULL DEFAULT '0',
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `FormID` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`PDID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `PartnerForum`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PartnerForum` (
  `FID` int(11) NOT NULL AUTO_INCREMENT,
  `FPID` int(11) NOT NULL DEFAULT '0',
  `FBID` int(11) NOT NULL DEFAULT '0',
  `PartnerID` int(11) NOT NULL DEFAULT '0',
  `CreateDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `UserID` int(11) NOT NULL DEFAULT '0',
  `Topic` varchar(128) NOT NULL DEFAULT '',
  `Message` text NOT NULL,
  PRIMARY KEY (`FID`),
  UNIQUE KEY `FID_2` (`FID`),
  KEY `FID` (`FID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `PartnerForumBoard`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PartnerForumBoard` (
  `FBID` int(11) NOT NULL AUTO_INCREMENT,
  `PartnerID` int(11) NOT NULL DEFAULT '0',
  `Name` varchar(128) NOT NULL DEFAULT '',
  `Description` varchar(255) NOT NULL DEFAULT '',
  PRIMARY KEY (`FBID`),
  UNIQUE KEY `FBID_2` (`FBID`),
  KEY `FBID` (`FBID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `PartnerForumCount`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PartnerForumCount` (
  `FCID` int(11) NOT NULL AUTO_INCREMENT,
  `FID` 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 (`FCID`),
  UNIQUE KEY `FCID_2` (`FCID`),
  KEY `FCID` (`FCID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `PartnerInvites`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PartnerInvites` (
  `PartnerInviteID` int(11) NOT NULL AUTO_INCREMENT,
  `PartnerID` int(11) NOT NULL DEFAULT '0',
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `Comments` varchar(255) NOT NULL DEFAULT '',
  PRIMARY KEY (`PartnerInviteID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `PartnerMembers`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PartnerMembers` (
  `PMID` int(11) NOT NULL AUTO_INCREMENT,
  `PartnerID` int(11) NOT NULL DEFAULT '0',
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`PMID`),
  KEY `PartnerID` (`PartnerID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `PartnerNews`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PartnerNews` (
  `PNID` int(11) NOT NULL AUTO_INCREMENT,
  `PartnerID` int(11) NOT NULL DEFAULT '0',
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `NewsID` int(11) NOT NULL DEFAULT '0',
  UNIQUE KEY `NewsID` (`PNID`),
  KEY `NewsID_2` (`NewsID`),
  KEY `PartnerID` (`PartnerID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `Partners`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Partners` (
  `PartnerID` int(11) NOT NULL AUTO_INCREMENT,
  `Name` varchar(64) NOT NULL DEFAULT '',
  `Description` varchar(255) NOT NULL DEFAULT '',
  `Symbol` varchar(8) NOT NULL DEFAULT '',
  `ControlCoID` int(11) NOT NULL DEFAULT '0',
  `Color` varchar(8) NOT NULL DEFAULT '',
  PRIMARY KEY (`PartnerID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `PaymentPlans`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PaymentPlans` (
  `PlanID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `Description` varchar(64) NOT NULL DEFAULT '',
  `Name` varchar(16) NOT NULL DEFAULT '',
  PRIMARY KEY (`PlanID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `Payroll`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Payroll` (
  `PID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `UserID` int(11) NOT NULL,
  `Active` int(11) NOT NULL DEFAULT '1',
  `Name` varchar(64) NOT NULL,
  `Type` tinyint(4) NOT NULL,
  `PayDate` date NOT NULL,
  `PayDay1` tinyint(4) NOT NULL,
  `PayDay2` tinyint(4) NOT NULL,
  `PayRate` decimal(10,2) NOT NULL,
  `PayHours` int(11) NOT NULL,
  `GAmount` decimal(10,2) NOT NULL,
  `NAmount` decimal(10,2) NOT NULL,
  `AccountID` int(11) NOT NULL,
  PRIMARY KEY (`PID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `PayrollHistory`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PayrollHistory` (
  `PHID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `UserID` int(11) NOT NULL,
  `PayDate` date NOT NULL,
  `Comments` varchar(128) NOT NULL,
  `Wages` decimal(10,2) NOT NULL,
  `AuthorID` int(11) NOT NULL,
  PRIMARY KEY (`PHID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `UserID` (`UserID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Employee Payroll History ';
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `PdfForms`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PdfForms` (
  `PDFFID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `Type` int(11) NOT NULL DEFAULT '1',
  `Name` varchar(32) NOT NULL,
  `Description` varchar(128) NOT NULL,
  `Filename` varchar(64) NOT NULL,
  `Uploaded` datetime NOT NULL,
  PRIMARY KEY (`PDFFID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Family / Student PDF Forms';
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `Periods`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Periods` (
  `PeriodID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `StartTime` varchar(10) NOT NULL DEFAULT '',
  `StartUTime` int(11) NOT NULL DEFAULT '0',
  `StopTime` varchar(10) NOT NULL DEFAULT '',
  `StopUTime` int(11) NOT NULL DEFAULT '0',
  `Description` varchar(32) NOT NULL DEFAULT '',
  `Code` varchar(5) NOT NULL DEFAULT '',
  `Number` int(11) NOT NULL DEFAULT '0',
  `Display` int(11) NOT NULL DEFAULT '0',
  `ValueAmt` decimal(10,4) NOT NULL,
  PRIMARY KEY (`PeriodID`),
  UNIQUE KEY `PeriodID` (`PeriodID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `StartTime` (`StartTime`),
  KEY `Number` (`Number`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `PhotoFolders`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PhotoFolders` (
  `PhotoFolderID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `Name` varchar(32) NOT NULL DEFAULT '',
  `Comments` tinytext NOT NULL,
  `ClassID` int(11) NOT NULL DEFAULT '0',
  `Private` int(11) NOT NULL DEFAULT '0',
  `Public` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`PhotoFolderID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ClassID` (`ClassID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `Photos`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Photos` (
  `PhotoID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `ClassID` int(11) NOT NULL DEFAULT '0',
  `FolderID` int(11) NOT NULL DEFAULT '0',
  `FileName` varchar(255) NOT NULL DEFAULT '',
  `DateTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Size` int(11) NOT NULL DEFAULT '0',
  `Comments` varchar(64) NOT NULL DEFAULT '',
  `Location` varchar(255) NOT NULL DEFAULT '',
  `Type` varchar(32) NOT NULL DEFAULT '',
  `Internal` int(11) NOT NULL DEFAULT '0',
  `Public` int(11) NOT NULL DEFAULT '0',
  `Login` int(11) NOT NULL DEFAULT '0',
  `AuthorID` varchar(16) NOT NULL DEFAULT '',
  `Title` varchar(64) NOT NULL DEFAULT '',
  `Alert` int(11) NOT NULL DEFAULT '0',
  `Viewable` int(11) NOT NULL DEFAULT '1',
  `TopLevel` int(11) NOT NULL DEFAULT '0',
  `Emailed` int(11) NOT NULL DEFAULT '0',
  `ParentPhotoID` int(11) NOT NULL,
  PRIMARY KEY (`PhotoID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ClassID` (`ClassID`),
  KEY `Alert` (`Alert`),
  KEY `FolderID` (`FolderID`),
  KEY `Viewable` (`Viewable`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `PollChoices`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PollChoices` (
  `PCID` int(11) NOT NULL AUTO_INCREMENT,
  `PQID` int(11) NOT NULL DEFAULT '0',
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `Choice` varchar(128) NOT NULL DEFAULT '',
  `VoteCount` int(11) NOT NULL DEFAULT '0',
  `Seq` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`PCID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `PQID` (`PQID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `PollQuestions`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PollQuestions` (
  `PQID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `ClassID` int(11) NOT NULL DEFAULT '0',
  `Question` varchar(255) NOT NULL DEFAULT '',
  `Date` date NOT NULL DEFAULT '0000-00-00',
  `Active` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`PQID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `Date` (`Date`),
  KEY `Active` (`Active`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `PollUsers`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PollUsers` (
  `PollUserID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `PQID` int(11) NOT NULL DEFAULT '0',
  `UserID` int(11) NOT NULL DEFAULT '0',
  `PCID` int(11) NOT NULL DEFAULT '0',
  `Date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  PRIMARY KEY (`PollUserID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `PQID` (`PQID`),
  KEY `UserID` (`UserID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `PopAccounts`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PopAccounts` (
  `PopAccountID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `UserID` int(11) NOT NULL DEFAULT '0',
  `Server` varchar(64) NOT NULL DEFAULT '',
  `SMTPServer` varchar(64) NOT NULL DEFAULT '',
  `SMTPSecurity` int(11) NOT NULL,
  `SMTPPort` int(11) NOT NULL DEFAULT '0',
  `SSLConnect` int(11) NOT NULL DEFAULT '0',
  `Username` varchar(64) NOT NULL DEFAULT '',
  `Password` varchar(255) NOT NULL DEFAULT '',
  `Port` int(11) NOT NULL DEFAULT '0',
  `FolderID` int(11) NOT NULL DEFAULT '0',
  `LeaveOnServer` int(11) NOT NULL DEFAULT '0',
  `Retrieval` int(11) NOT NULL DEFAULT '1',
  `SpamGuard` int(11) NOT NULL DEFAULT '1',
  `Name` varchar(32) NOT NULL DEFAULT '',
  `Enabled` int(11) NOT NULL DEFAULT '1',
  `PrimaryAccount` int(11) NOT NULL DEFAULT '0',
  `FromLabel` varchar(255) NOT NULL DEFAULT '',
  `NewMailOnly` int(11) NOT NULL DEFAULT '0',
  `Color` varchar(6) NOT NULL DEFAULT '',
  `LastFetched` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `ErrorMsg` varchar(128) NOT NULL DEFAULT '',
  `ErrorCount` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`PopAccountID`),
  KEY `PopAccountID` (`PopAccountID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `UserID` (`UserID`),
  KEY `Retrieval` (`Retrieval`),
  KEY `Enabled` (`Enabled`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `PopAddresses`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PopAddresses` (
  `PopAddressID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `UserID` int(11) NOT NULL DEFAULT '0',
  `FirstName` varchar(32) NOT NULL DEFAULT '',
  `LastName` varchar(32) NOT NULL DEFAULT '',
  `Email` varchar(128) NOT NULL DEFAULT '',
  `Alias` varchar(16) NOT NULL DEFAULT '',
  PRIMARY KEY (`PopAddressID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `UserID` (`UserID`),
  KEY `Email` (`Email`),
  KEY `Alias` (`Alias`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `PopStatus`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PopStatus` (
  `PopStatusID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `UserID` int(11) NOT NULL DEFAULT '0',
  `Status` longtext NOT NULL,
  `Done` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`PopStatusID`),
  KEY `UserID` (`UserID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `ProjectContacts`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ProjectContacts` (
  `SCID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `ClassID` int(11) NOT NULL DEFAULT '0',
  `ContactID` int(11) NOT NULL DEFAULT '0',
  `DateTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  PRIMARY KEY (`SCID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ClassID` (`ClassID`),
  KEY `ContactID` (`ContactID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `PushNotifications`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PushNotifications` (
  `PNID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `UserID` int(11) NOT NULL,
  `Event` int(11) NOT NULL,
  PRIMARY KEY (`PNID`),
  UNIQUE KEY `SchoolID` (`SchoolID`,`UserID`,`Event`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `Race`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Race` (
  `RaceID` int(11) NOT NULL AUTO_INCREMENT,
  `RaceCode` char(2) NOT NULL DEFAULT '',
  `RaceDesc` varchar(16) NOT NULL DEFAULT '',
  `USA` int(11) NOT NULL DEFAULT '1',
  PRIMARY KEY (`RaceID`),
  KEY `RaceCode` (`RaceCode`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `Relationships`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Relationships` (
  `RelationshipID` int(11) NOT NULL AUTO_INCREMENT,
  `Name` varchar(32) NOT NULL DEFAULT '',
  `Sequence` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`RelationshipID`),
  KEY `Sequence` (`Sequence`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Also add new items to Import Templates';
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `Religions`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Religions` (
  `ReligionID` int(11) NOT NULL AUTO_INCREMENT,
  `Name` varchar(32) NOT NULL DEFAULT '',
  PRIMARY KEY (`ReligionID`),
  KEY `ReligionID` (`ReligionID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `RemittanceIdentifiers`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `RemittanceIdentifiers` (
  `RID` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Remittance ID',
  `SchoolID` int(11) NOT NULL,
  `PaymentType` int(11) NOT NULL DEFAULT '0' COMMENT '1 = ACH, 2 = FACTS',
  `Identifier` int(11) NOT NULL DEFAULT '0' COMMENT '1 = Family ID, 2 = Family Code, 3 = ExtID',
  PRIMARY KEY (`RID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `ReportArchives`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ReportArchives` (
  `RAID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `SchoolYearID` 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 '',
  `FileName` varchar(64) NOT NULL DEFAULT '',
  `UFileName` varchar(32) NOT NULL,
  `Size` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`RAID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `Date` (`Date`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `ReportCardPlus`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ReportCardPlus` (
  `RCPID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `FinalGradeCalc` int(11) NOT NULL DEFAULT '0',
  `UpdateDT` datetime NOT NULL,
  UNIQUE KEY `RCPID` (`RCPID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `ReportCardText`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ReportCardText` (
  `RCTXTID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `SDID` int(11) NOT NULL,
  `TokenNum` int(11) NOT NULL,
  `Name` varchar(32) NOT NULL,
  `Content` text NOT NULL,
  `Locked` tinyint(4) NOT NULL DEFAULT '0',
  PRIMARY KEY (`RCTXTID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `SDID` (`SDID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `ReportCards`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ReportCards` (
  `RCID` 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,
  `Location` varchar(64) 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,
  PRIMARY KEY (`RCID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `ReportForms`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ReportForms` (
  `RTID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `Name` varchar(32) NOT NULL,
  `Description` varchar(255) NOT NULL,
  `Content` text 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,
  `PProcess` int(11) NOT NULL DEFAULT '0' COMMENT 'Single or multi process. DEPRECATED',
  `Seq` int(11) NOT NULL,
  `Tags` int(11) NOT NULL,
  `HelpURL` varchar(255) NOT NULL COMMENT 'DEPRECATED',
  `Country` varchar(32) NOT NULL,
  PRIMARY KEY (`RTID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `ReportJobs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ReportJobs` (
  `RJID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `UserID` int(11) NOT NULL,
  `ReportID` int(11) NOT NULL,
  `Data` text NOT NULL COMMENT 'JSON representation of variables needed to run report',
  `Scheduled` datetime NOT NULL,
  `Completed` datetime NOT NULL,
  `Status` int(11) NOT NULL COMMENT '0 = pending, 1 = complete',
  `Comments` varchar(255) NOT NULL,
  PRIMARY KEY (`RJID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `Scheduled` (`Scheduled`),
  KEY `Status` (`Status`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `ReportLogs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ReportLogs` (
  `ReportLogID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `UserID` int(11) NOT NULL,
  `ReportID` int(11) NOT NULL,
  `ReportName` varchar(64) NOT NULL,
  `Records` int(11) NOT NULL COMMENT 'Affected Rows Count',
  `Datetime` datetime NOT NULL,
  `Comment` varchar(255) NOT NULL,
  PRIMARY KEY (`ReportLogID`),
  KEY `SchoolID` (`SchoolID`,`UserID`,`ReportID`,`ReportName`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `ReportSchools`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ReportSchools` (
  `RSID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `ReportID` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`RSID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ReportID` (`ReportID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `ReportTemplateRuns`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ReportTemplateRuns` (
  `RTRID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `RTID` int(11) NOT NULL,
  `RunDT` datetime NOT NULL,
  `AuthorID` int(11) NOT NULL,
  `Filename` varchar(32) NOT NULL,
  PRIMARY KEY (`RTRID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `ReportTemplates`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ReportTemplates` (
  `RTID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `ReportType` int(11) NOT NULL COMMENT '1=Student,2=Family,3=Employee,4=ClassStudents,5=EnrollStudents;6=Contacts',
  `ReportSubType` int(11) NOT NULL COMMENT '1: Student 2: Teacher',
  `ReportOutput` int(11) NOT NULL,
  `ReportLife` int(11) NOT NULL COMMENT '0=Temp, 1=Forever',
  `AuthorID` int(11) NOT NULL,
  `Created` datetime NOT NULL,
  `Name` varchar(32) NOT NULL,
  `Description` varchar(128) NOT NULL,
  `Released` int(11) NOT NULL DEFAULT '0',
  `StateReport` int(11) NOT NULL,
  `Columns` text NOT NULL,
  `Statistics` text NOT NULL,
  `DistrictStatistics` text NOT NULL,
  `StateStatistics` text NOT NULL,
  `Selected` text NOT NULL,
  `SchoolYearID` int(11) NOT NULL,
  `StudentGrade` int(11) NOT NULL,
  `StudentType` int(11) NOT NULL,
  `OrderBy` varchar(32) NOT NULL,
  `Categories` text NOT NULL,
  `DistrictCategories` text NOT NULL,
  `StateCategories` text NOT NULL,
  PRIMARY KEY (`RTID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `ReportTypes`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ReportTypes` (
  `ReportType` int(11) NOT NULL AUTO_INCREMENT,
  `Directory` varchar(32) NOT NULL,
  `Name` varchar(32) NOT NULL,
  `Description` text NOT NULL,
  `Label` varchar(32) NOT NULL,
  PRIMARY KEY (`ReportType`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `Reports`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Reports` (
  `ReportID` int(11) NOT NULL AUTO_INCREMENT,
  `ReportType` int(11) NOT NULL DEFAULT '0',
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `Name` varchar(48) NOT NULL DEFAULT '',
  `File` varchar(255) NOT NULL DEFAULT '',
  `Description` varchar(255) NOT NULL DEFAULT '',
  `Class` int(11) NOT NULL DEFAULT '0' COMMENT 'Team Report',
  `DevOnly` tinyint(4) NOT NULL DEFAULT '0',
  `EOYCID` tinyint(4) NOT NULL,
  `EOYLabel` varchar(128) NOT NULL,
  `EOYSeq` tinyint(4) NOT NULL DEFAULT '0',
  `SSID` int(11) NOT NULL DEFAULT '0' COMMENT 'State School State ID',
  `EdFi` varchar(16) NOT NULL DEFAULT '',
  PRIMARY KEY (`ReportID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ReportType` (`ReportType`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `Request`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Request` (
  `RequestID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `ClassID` int(11) NOT NULL DEFAULT '0',
  `Start` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `Stop` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `HeadLine` varchar(32) NOT NULL DEFAULT '',
  `Message` text NOT NULL,
  `AuthorID` int(11) NOT NULL DEFAULT '0',
  `Internal` int(11) NOT NULL DEFAULT '0',
  UNIQUE KEY `NewsID` (`RequestID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ClassID` (`ClassID`),
  KEY `Start` (`Start`),
  KEY `Stop` (`Stop`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `RequirementLabels`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `RequirementLabels` (
  `RLID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `Code` varchar(8) NOT NULL,
  `Name` varchar(32) NOT NULL,
  `Description` varchar(128) NOT NULL,
  `DiplomaType` int(11) NOT NULL,
  `DefaultRequirement` int(11) NOT NULL,
  PRIMARY KEY (`RLID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `RequirementSections`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `RequirementSections` (
  `RSID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `Sequence` int(11) NOT NULL,
  `SectionName` varchar(24) NOT NULL DEFAULT '0',
  `SectionCode` varchar(4) NOT NULL DEFAULT '',
  `Description` varchar(64) NOT NULL DEFAULT '',
  PRIMARY KEY (`RSID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Graduation Requirements';
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `Requirements`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Requirements` (
  `RequireID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `RLID` int(11) NOT NULL,
  `RSID` int(11) NOT NULL COMMENT 'RequirementSectionID',
  `Sequence` int(11) NOT NULL DEFAULT '0',
  `SectionName` varchar(24) NOT NULL DEFAULT '0',
  `SectionCode` varchar(4) NOT NULL DEFAULT '',
  `Description` varchar(64) NOT NULL DEFAULT '',
  `Credits` float NOT NULL DEFAULT '0',
  PRIMARY KEY (`RequireID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Graduation Requirements';
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `Restores`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Restores` (
  `RestoreID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `Class` varchar(32) NOT NULL COMMENT 'CRUD Class, i.e. ''Student''',
  `PrimaryID` int(11) NOT NULL,
  `Properties` text NOT NULL COMMENT 'JSON representation of CRUD class props',
  `associated_type` varchar(255) DEFAULT NULL,
  `associated_id` bigint(20) DEFAULT NULL,
  `created_at` datetime(6) DEFAULT NULL,
  `updated_at` datetime(6) DEFAULT NULL,
  PRIMARY KEY (`RestoreID`),
  KEY `SchoolID` (`SchoolID`,`Class`,`PrimaryID`),
  KEY `index_Restores_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 `SafetyAlertTypes`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `SafetyAlertTypes` (
  `SATID` int(11) NOT NULL AUTO_INCREMENT,
  `Code` varchar(5) NOT NULL DEFAULT '',
  `Description` varchar(32) NOT NULL DEFAULT '',
  PRIMARY KEY (`SATID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Safety Alert Message Types';
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `SafetyAlertUsers`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `SafetyAlertUsers` (
  `SAID` 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',
  `Dismissed` int(11) NOT NULL DEFAULT '0',
  UNIQUE KEY `NewsID` (`SAID`),
  KEY `CompanyID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `SafetyAlerts`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `SafetyAlerts` (
  `SAID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `SATID` int(11) NOT NULL DEFAULT '0',
  `Message` text NOT NULL,
  `AuthorID` int(11) NOT NULL DEFAULT '0',
  `Created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Internal` int(11) NOT NULL DEFAULT '0',
  UNIQUE KEY `NewsID` (`SAID`),
  KEY `CompanyID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `SchedulerJobs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `SchedulerJobs` (
  `JobID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `UserID` int(11) NOT NULL,
  `Updated` datetime NOT NULL,
  PRIMARY KEY (`JobID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `SchedulerServers`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `SchedulerServers` (
  `ServerID` int(11) NOT NULL AUTO_INCREMENT,
  `Server` varchar(255) NOT NULL,
  `Activated` datetime NOT NULL,
  PRIMARY KEY (`ServerID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `SchoolAlerts`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `SchoolAlerts` (
  `SAID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `Message` text NOT NULL,
  `Acknowledged` int(11) NOT NULL,
  PRIMARY KEY (`SAID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `SchoolBilling`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `SchoolBilling` (
  `CBID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `CCType` int(11) NOT NULL DEFAULT '0',
  `CCNumber` blob NOT NULL,
  `CCNumber4` varchar(4) NOT NULL DEFAULT '',
  `CCVID` int(11) NOT NULL DEFAULT '0',
  `CCExpMonth` int(11) NOT NULL DEFAULT '0',
  `CCExpYear` int(11) NOT NULL DEFAULT '0',
  `CCName` varchar(32) NOT NULL DEFAULT '',
  `CCAddress1` varchar(32) NOT NULL DEFAULT '',
  `CCAddress2` varchar(32) NOT NULL DEFAULT '',
  `CCCity` varchar(32) NOT NULL DEFAULT '',
  `CCState` char(2) NOT NULL DEFAULT '',
  `CCZip` varchar(10) NOT NULL DEFAULT '',
  PRIMARY KEY (`CBID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `SchoolBillingTransactions`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `SchoolBillingTransactions` (
  `CTID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `Date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `RealDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Amount` float(10,2) NOT NULL DEFAULT '0.00',
  `Comments` varchar(128) NOT NULL DEFAULT '',
  `AuthorID` int(11) NOT NULL DEFAULT '0',
  `CheckNum` int(11) NOT NULL DEFAULT '0',
  `Cleared` int(4) NOT NULL DEFAULT '0',
  `PaymentStatus` varchar(16) NOT NULL DEFAULT '',
  PRIMARY KEY (`CTID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `Date` (`Date`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `SchoolBlocks`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `SchoolBlocks` (
  `SBID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `Name` varchar(16) NOT NULL,
  `Description` varchar(32) NOT NULL,
  `Sequence` int(11) NOT NULL,
  PRIMARY KEY (`SBID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `SchoolCleverIntegration`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `SchoolCleverIntegration` (
  `SCIID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(12) NOT NULL,
  `CleverUsername` varchar(64) NOT NULL,
  `CleverPassword` varchar(255) NOT NULL DEFAULT '',
  `LastSync` datetime NOT NULL,
  `CleverDistrictID` varchar(32) CHARACTER SET latin1 COLLATE latin1_spanish_ci NOT NULL,
  `Data` text NOT NULL,
  PRIMARY KEY (`SCIID`),
  UNIQUE KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `SchoolConfig`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `SchoolConfig` (
  `CoCID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `Updated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `IntroBanner` int(11) NOT NULL DEFAULT '0',
  `SchoolMenu` int(11) NOT NULL,
  `HomePageView` int(11) NOT NULL DEFAULT '1',
  `Organization` int(11) NOT NULL DEFAULT '1',
  `Contacts` int(11) NOT NULL DEFAULT '0',
  `Projects` int(11) NOT NULL DEFAULT '0',
  `Sales` int(11) NOT NULL DEFAULT '0',
  `Members` int(11) NOT NULL DEFAULT '0',
  `WorkFlow` int(11) NOT NULL DEFAULT '0',
  `OnlineForms` int(11) NOT NULL DEFAULT '1',
  `Knowledge` int(11) NOT NULL DEFAULT '0',
  `DB` int(11) NOT NULL DEFAULT '0',
  `BreakRoom` int(11) NOT NULL DEFAULT '0',
  `TimeTracker` int(11) NOT NULL DEFAULT '0',
  `Accounting` int(11) NOT NULL DEFAULT '0',
  `Library` int(11) NOT NULL,
  `MyOrganizer` int(11) NOT NULL DEFAULT '0',
  `Family_PassANotes` int(11) NOT NULL DEFAULT '0',
  `Student_PassANotes` int(11) NOT NULL,
  `Family_Schedules` int(11) NOT NULL DEFAULT '1',
  `Student_Schedules` int(11) NOT NULL DEFAULT '1',
  `Student_AdmissionSchedule` int(11) NOT NULL DEFAULT '0',
  `Student_Discipline` bit(1) NOT NULL DEFAULT b'0',
  `Family_Discipline` int(11) NOT NULL DEFAULT '0',
  `Email` int(11) NOT NULL DEFAULT '0',
  `Email_POP` int(11) NOT NULL DEFAULT '1',
  `Email_IMAP` int(11) NOT NULL DEFAULT '0',
  `Signature` text NOT NULL,
  `AppColor` varchar(6) NOT NULL DEFAULT '',
  `ForceSSL` int(11) NOT NULL DEFAULT '0',
  `IdleLogout` int(11) NOT NULL DEFAULT '240',
  `FrontDesk` int(11) NOT NULL DEFAULT '0',
  `DaycareSecure` int(11) NOT NULL DEFAULT '0',
  `FamilyDirectory` int(11) NOT NULL DEFAULT '1',
  `EmployeeDirectory` int(11) NOT NULL DEFAULT '3',
  `ClassroomDirectory` int(11) NOT NULL DEFAULT '0',
  `DepartmentDirectory` int(11) NOT NULL DEFAULT '0',
  `FamilyBlogging` int(11) NOT NULL DEFAULT '1',
  `FamilyDiscussions` int(11) NOT NULL DEFAULT '1',
  `FamilyChatrooms` int(11) NOT NULL DEFAULT '0',
  `Doc_Uploaded` int(11) NOT NULL DEFAULT '1',
  `Doc_ReportCards` int(11) NOT NULL DEFAULT '1',
  `Doc_Transcripts` int(11) NOT NULL DEFAULT '1',
  `Doc_Attendance` int(11) NOT NULL DEFAULT '1',
  `Doc_Discipline` int(11) NOT NULL DEFAULT '1',
  `Doc_Medical` int(11) NOT NULL DEFAULT '1',
  `Doc_Service` int(11) NOT NULL DEFAULT '1',
  `InfoCenter` int(11) NOT NULL DEFAULT '0',
  `CommCenter` int(11) NOT NULL DEFAULT '0',
  `Event` int(11) NOT NULL DEFAULT '0',
  `Assets` int(11) NOT NULL DEFAULT '0',
  `Nurse` int(11) NOT NULL DEFAULT '0',
  `Conference` int(11) NOT NULL DEFAULT '1',
  `Discipline` int(11) NOT NULL DEFAULT '0',
  `IEP` int(11) NOT NULL,
  `Service` int(11) NOT NULL DEFAULT '0',
  `ContactLog` int(11) NOT NULL DEFAULT '0',
  `Volunteer` int(11) NOT NULL DEFAULT '0',
  `Course` int(11) NOT NULL DEFAULT '0',
  `CollegeCredits` int(11) NOT NULL DEFAULT '0',
  `Classroom` int(11) NOT NULL DEFAULT '0',
  `LessonPlan` int(11) NOT NULL DEFAULT '1',
  `Cafeteria` int(11) NOT NULL DEFAULT '0',
  `Daycare` int(11) NOT NULL DEFAULT '0',
  `Admission` int(11) NOT NULL DEFAULT '0',
  `Admissions` int(11) NOT NULL DEFAULT '0',
  `Athletic` int(11) NOT NULL DEFAULT '1',
  `Donor` int(11) NOT NULL DEFAULT '0',
  `Auction` int(11) NOT NULL DEFAULT '0',
  `UForums` int(11) NOT NULL DEFAULT '1',
  `Transport` int(11) NOT NULL DEFAULT '0',
  `Class1` int(11) NOT NULL DEFAULT '0',
  `Class2` int(11) NOT NULL DEFAULT '0',
  `Class3` int(11) NOT NULL DEFAULT '0',
  `Class4` int(11) NOT NULL DEFAULT '0',
  `FeaturedTab` int(11) NOT NULL DEFAULT '1',
  `DOBStaff` int(11) NOT NULL DEFAULT '1',
  `DOBStudent` int(11) NOT NULL DEFAULT '1',
  `SchoolYearType` int(11) NOT NULL DEFAULT '1',
  `AdmissionsPortal` int(11) NOT NULL DEFAULT '0',
  `PEI` int(11) NOT NULL,
  `PeriodAttendance` int(11) NOT NULL DEFAULT '0',
  `HomeroomAttendance` int(11) NOT NULL DEFAULT '0',
  `NoPANText` int(11) NOT NULL DEFAULT '0',
  `PanForward` int(11) NOT NULL DEFAULT '1',
  `PanEmail` int(11) NOT NULL DEFAULT '1',
  `NCEASchType` int(11) NOT NULL DEFAULT '0',
  `NCEALocation` int(11) NOT NULL DEFAULT '0',
  `NCEASponsor` int(11) NOT NULL DEFAULT '0',
  `NCEAGender` int(11) NOT NULL DEFAULT '0',
  `EdFiType` int(11) NOT NULL,
  `NotifyTime` time NOT NULL DEFAULT '00:00:00',
  `FamilyMedical` int(11) NOT NULL DEFAULT '0',
  `non_binary` tinyint(1) NOT NULL DEFAULT '0',
  `inquiries` tinyint(1) NOT NULL DEFAULT '0',
  `financialaid` tinyint(1) NOT NULL DEFAULT '0',
  `tep_integration` tinyint(1) NOT NULL DEFAULT '0',
  `google_sso` int(11) NOT NULL DEFAULT '0',
  `payments` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`CoCID`),
  UNIQUE KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `SchoolDays`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `SchoolDays` (
  `SchoolDaysID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `SchoolYearID` int(11) NOT NULL DEFAULT '0',
  `day_descriptor_id` int(11) DEFAULT NULL,
  `Date` date NOT NULL DEFAULT '0000-00-00',
  `Quarter` int(11) NOT NULL,
  `HalfDays` int(11) NOT NULL,
  `Hours` decimal(10,2) NOT NULL,
  `CycleDay` int(11) DEFAULT NULL,
  `edfi_id` varchar(255) DEFAULT NULL,
  `created_at` datetime(6) DEFAULT NULL,
  `updated_at` datetime(6) DEFAULT NULL,
  UNIQUE KEY `SchoolDaysID` (`SchoolDaysID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `SchoolYearID` (`SchoolYearID`),
  KEY `Date` (`Date`),
  KEY `Quarter` (`Quarter`),
  KEY `index_SchoolDays_on_day_descriptor_id` (`day_descriptor_id`),
  CONSTRAINT `fk_rails_d630a6dc73` FOREIGN KEY (`day_descriptor_id`) REFERENCES `EdFi_Descriptors` (`DescriptorID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `SchoolDistrictConfig`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `SchoolDistrictConfig` (
  `SDCID` int(11) NOT NULL AUTO_INCREMENT,
  `SDID` int(11) NOT NULL,
  `SchoolID` int(11) NOT NULL,
  `ClassManagement` int(1) NOT NULL,
  PRIMARY KEY (`SDCID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `SchoolDistrictImport`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `SchoolDistrictImport` (
  `SDIID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `SchoolYearID` int(11) NOT NULL DEFAULT '0',
  `StudentID` int(11) NOT NULL,
  `OrigSchoolID` int(11) NOT NULL,
  `OrigStudentID` int(11) NOT NULL,
  `AuthorID` int(11) NOT NULL,
  `Updated` datetime NOT NULL,
  PRIMARY KEY (`SDIID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `UserID` (`StudentID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Student Import';
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `SchoolDistrictSchools`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `SchoolDistrictSchools` (
  `SDSID` int(11) NOT NULL AUTO_INCREMENT,
  `SDID` int(11) NOT NULL DEFAULT '0',
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `Activated` int(11) NOT NULL,
  `UserID` int(11) NOT NULL,
  `Updated` datetime NOT NULL,
  PRIMARY KEY (`SDSID`),
  KEY `PartnerID` (`SDID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `SchoolDistrictStudents`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `SchoolDistrictStudents` (
  `SDSID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `SDID` int(11) NOT NULL COMMENT 'SchoolDistrictID',
  `StudentID` int(11) NOT NULL,
  `Updated` datetime NOT NULL,
  PRIMARY KEY (`SDSID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `UserID` (`StudentID`),
  KEY `SDID` (`SDID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='School District Users';
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `SchoolDistrictUsers`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `SchoolDistrictUsers` (
  `SDUID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `SDID` int(11) NOT NULL COMMENT 'SchoolDistrictID',
  `UserID` int(11) NOT NULL,
  `SD_UserID` int(11) NOT NULL,
  `Updated` datetime NOT NULL,
  PRIMARY KEY (`SDUID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `UserID` (`UserID`),
  KEY `SDID` (`SDID`),
  KEY `SD_UserID` (`SD_UserID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='School District Users';
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `SchoolDistricts`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `SchoolDistricts` (
  `SDID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL COMMENT 'School ID of controlling school',
  `Name` varchar(64) NOT NULL DEFAULT '',
  `Description` varchar(255) NOT NULL DEFAULT '',
  `Symbol` varchar(8) NOT NULL DEFAULT '',
  `Color` varchar(8) NOT NULL DEFAULT '',
  `AccessLevel` int(11) NOT NULL,
  PRIMARY KEY (`SDID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `SchoolFamilyChanges`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `SchoolFamilyChanges` (
  `SFCID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `AllowFamily` int(11) NOT NULL DEFAULT '0',
  `AllowStudent` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`SFCID`),
  UNIQUE KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Schools that have family login disabled';
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `SchoolFamilyLogin`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `SchoolFamilyLogin` (
  `SFLID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`SFLID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Schools that have family login disabled';
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `SchoolGpaScale`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `SchoolGpaScale` (
  `SGSID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `Honors` int(11) NOT NULL DEFAULT '0',
  `Grade` char(3) NOT NULL DEFAULT '',
  `Value` float NOT NULL DEFAULT '0',
  PRIMARY KEY (`SGSID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `SchoolGpaScaleName`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `SchoolGpaScaleName` (
  `SGSNID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `Name` varchar(32) NOT NULL DEFAULT '',
  `GPAScale` int(11) NOT NULL,
  `DenoteSymbol` varchar(5) NOT NULL,
  PRIMARY KEY (`SGSNID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `SchoolGrades`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `SchoolGrades` (
  `SGradesID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `Name1` varchar(16) NOT NULL DEFAULT '',
  `Name2` varchar(16) NOT NULL DEFAULT '',
  `Name3` varchar(16) NOT NULL DEFAULT '',
  `Name4` varchar(16) NOT NULL DEFAULT '',
  `Name5` varchar(16) NOT NULL DEFAULT '',
  `Name6` varchar(16) NOT NULL DEFAULT '',
  `Name7` varchar(16) NOT NULL DEFAULT '',
  `Name8` varchar(16) NOT NULL DEFAULT '',
  `Name9` varchar(16) NOT NULL DEFAULT '',
  `Name10` varchar(16) NOT NULL DEFAULT '',
  PRIMARY KEY (`SGradesID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `SchoolGradingScaleData`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `SchoolGradingScaleData` (
  `SchoolGradeID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `SGSID` int(11) NOT NULL DEFAULT '0',
  `Upper` float NOT NULL DEFAULT '0',
  `Lower` float NOT NULL DEFAULT '0',
  `Letter` char(3) NOT NULL DEFAULT '',
  `Passing` int(11) NOT NULL,
  PRIMARY KEY (`SchoolGradeID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `SGSID` (`SGSID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `SchoolGradingScales`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `SchoolGradingScales` (
  `SGSID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `Name` varchar(32) NOT NULL DEFAULT '',
  `Description` varchar(255) NOT NULL DEFAULT '',
  `RoundGrade` int(11) NOT NULL DEFAULT '1',
  `SkillSet` int(11) NOT NULL DEFAULT '0',
  `IEPSet` int(11) NOT NULL,
  `Special` int(11) NOT NULL COMMENT 'Global Scale',
  `SiteSetup` int(11) NOT NULL,
  `MinPassing` int(11) NOT NULL,
  PRIMARY KEY (`SGSID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `Special` (`Special`),
  KEY `SkillSet` (`SkillSet`),
  KEY `IEPSet` (`IEPSet`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `SchoolHomeCfg`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `SchoolHomeCfg` (
  `SHCID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `News` int(11) NOT NULL,
  `Calendar` int(11) NOT NULL,
  `Documents` int(11) NOT NULL,
  `Photos` int(11) NOT NULL,
  `Overview` int(11) NOT NULL,
  `ShoutBoard` int(11) NOT NULL,
  `UserDetails` int(11) NOT NULL,
  PRIMARY KEY (`SHCID`),
  UNIQUE KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `SchoolIntegrations`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `SchoolIntegrations` (
  `SIID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `Vendor` int(11) NOT NULL COMMENT '1=Google, 2=Clever',
  `Enabled` int(11) NOT NULL,
  `GoogleDomain` varchar(64) NOT NULL,
  `GoogleStaffSchema` int(11) NOT NULL DEFAULT '1',
  `GoogleStudentSchema` int(11) NOT NULL DEFAULT '1',
  `StudentEmailSchema` varchar(255) DEFAULT NULL,
  `StaffEmailSchema` varchar(255) DEFAULT NULL,
  `GoogleOwner` varchar(128) NOT NULL COMMENT 'email address',
  `GoogleCalendar` varchar(128) NOT NULL,
  `Username` varchar(64) NOT NULL,
  `Password` varchar(64) NOT NULL,
  `Data` text NOT NULL,
  PRIMARY KEY (`SIID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `SchoolKeys`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `SchoolKeys` (
  `SKeyID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `KeyID` int(11) NOT NULL DEFAULT '0',
  `Name` varchar(32) NOT NULL DEFAULT '',
  `Description` varchar(255) NOT NULL DEFAULT '',
  PRIMARY KEY (`SKeyID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `SchoolLoginMessage`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `SchoolLoginMessage` (
  `SLMID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `Message` text NOT NULL,
  `Updated` datetime NOT NULL,
  PRIMARY KEY (`SLMID`),
  UNIQUE KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `SchoolReportConfigs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `SchoolReportConfigs` (
  `SRCID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `ReportID` int(11) NOT NULL,
  `Data` text NOT NULL,
  PRIMARY KEY (`SRCID`),
  KEY `SchoolID` (`SchoolID`,`ReportID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `SchoolSocialMedia`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `SchoolSocialMedia` (
  `SMID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `SMSID` int(11) NOT NULL,
  `URL` varchar(128) NOT NULL,
  `DisplayOnHome` int(11) NOT NULL COMMENT '0 = no display; 1 = display on home page',
  PRIMARY KEY (`SMID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `SMSID` (`SMSID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `SchoolStateClasses`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `SchoolStateClasses` (
  `SSCID` int(11) NOT NULL AUTO_INCREMENT,
  `SSID` int(11) NOT NULL DEFAULT '0',
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `ClassID` int(11) NOT NULL DEFAULT '0',
  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 `SchoolStateSchools`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `SchoolStateSchools` (
  `SSSID` int(11) NOT NULL AUTO_INCREMENT,
  `SSID` int(11) NOT NULL DEFAULT '0',
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`SSSID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `SSID` (`SSID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `SchoolStateUsers`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `SchoolStateUsers` (
  `SSUID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `SSID` int(11) NOT NULL COMMENT 'SchoolDistrictID',
  `UserID` int(11) NOT NULL,
  `SS_UserID` int(11) NOT NULL,
  `Updated` datetime NOT NULL,
  PRIMARY KEY (`SSUID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `UserID` (`UserID`),
  KEY `SSID` (`SSID`),
  KEY `SS_UserID` (`SS_UserID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='School District Users';
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `SchoolStates`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `SchoolStates` (
  `SSID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `Name` varchar(64) NOT NULL DEFAULT '',
  `Description` varchar(255) NOT NULL DEFAULT '',
  `URL` varchar(255) NOT NULL,
  `Code` varchar(8) NOT NULL DEFAULT '',
  `Color` varchar(8) NOT NULL DEFAULT '',
  PRIMARY KEY (`SSID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `SchoolSubstitutes`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `SchoolSubstitutes` (
  `SSID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `UserID` int(11) NOT NULL,
  `Updated` datetime NOT NULL,
  PRIMARY KEY (`SSID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `UserID` (`UserID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='School District Users';
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `SchoolTypes`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `SchoolTypes` (
  `SchoolType` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolTypeCode` varchar(12) NOT NULL DEFAULT '',
  `Description` varchar(32) NOT NULL DEFAULT '',
  UNIQUE KEY `SchoolType` (`SchoolType`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `SchoolYearConfig`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `SchoolYearConfig` (
  `SYCID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `Semester_Count` int(11) NOT NULL,
  `Semester_Name` varchar(16) NOT NULL,
  PRIMARY KEY (`SYCID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `SchoolYearFamilies`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `SchoolYearFamilies` (
  `SchoolYearFamilyID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `SchoolYearID` int(11) NOT NULL DEFAULT '0',
  `FamilyID` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`SchoolYearFamilyID`),
  UNIQUE KEY `index_SchoolYearFamilies_on_FamilyID_and_SchoolYearID` (`FamilyID`,`SchoolYearID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `SchoolYearID` (`SchoolYearID`),
  KEY `FamilyID` (`FamilyID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `SchoolYearSessions`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `SchoolYearSessions` (
  `SYSID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `SchoolYearID` int(11) NOT NULL,
  `StartDate` int(11) NOT NULL,
  `EndDate` int(11) NOT NULL,
  `Sequence` int(11) NOT NULL,
  `Name` varchar(32) NOT NULL DEFAULT '',
  `Description` varchar(255) NOT NULL DEFAULT '',
  PRIMARY KEY (`SYSID`),
  KEY `CompanyID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `SchoolYearStudents`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `SchoolYearStudents` (
  `SchoolYearStudentID` 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',
  `SYGrade` int(11) NOT NULL,
  `EntryDate` date NOT NULL DEFAULT '0000-00-00',
  `EntryType` int(11) NOT NULL,
  `ExitDate` date DEFAULT '0000-00-00',
  `ExitType` int(11) NOT NULL,
  `Residency` int(11) NOT NULL,
  `PrimarySchool` int(11) NOT NULL COMMENT 'Primary Student Enrollment',
  `EdFiID` varchar(32) NOT NULL,
  `EdFiExtID` varchar(32) NOT NULL,
  `Current` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`SchoolYearStudentID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `SchoolYearID` (`SchoolYearID`),
  KEY `StudentID` (`StudentID`),
  KEY `FindStudent` (`SchoolYearID`,`StudentID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `SchoolYears`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `SchoolYears` (
  `SchoolYearID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `Q1Date` date NOT NULL DEFAULT '0000-00-00',
  `Q2Date` date NOT NULL DEFAULT '0000-00-00',
  `Q3Date` date NOT NULL DEFAULT '0000-00-00',
  `Q4Date` date NOT NULL DEFAULT '0000-00-00',
  `EndDate` date NOT NULL DEFAULT '0000-00-00',
  `Name` varchar(32) NOT NULL DEFAULT '',
  `Description` varchar(255) NOT NULL DEFAULT '',
  `AcademicYear` int(4) NOT NULL COMMENT 'Academic|Grad Year',
  `Current` int(11) NOT NULL DEFAULT '0',
  `CycleDays` int(11) DEFAULT NULL,
  `year_end_closeout` tinyint(1) NOT NULL DEFAULT '1',
  `created_at` datetime(6) NOT NULL,
  `updated_at` datetime(6) NOT NULL,
  PRIMARY KEY (`SchoolYearID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `Schools`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Schools` (
  `SchoolID` int(11) NOT NULL AUTO_INCREMENT,
  `SupportID` bigint(20) NOT NULL,
  `Active` int(11) NOT NULL DEFAULT '1',
  `Name` varchar(48) NOT NULL DEFAULT '',
  `ShortName` varchar(8) NOT NULL DEFAULT '',
  `Address1` varchar(40) NOT NULL DEFAULT '',
  `Address2` varchar(32) NOT NULL DEFAULT '',
  `City` varchar(32) NOT NULL,
  `State` varchar(32) DEFAULT NULL,
  `ZIP` varchar(10) NOT NULL DEFAULT '',
  `Country` varchar(56) NOT NULL,
  `country_id` bigint(20) DEFAULT NULL,
  `Longitude` varchar(16) NOT NULL,
  `Latitude` varchar(16) NOT NULL,
  `WeatherID` varchar(16) NOT NULL DEFAULT '',
  `WeatherFormat` varchar(1) NOT NULL DEFAULT 'F',
  `SchoolCode` varchar(32) DEFAULT NULL,
  `DistrictCode` varchar(32) DEFAULT NULL,
  `FederalCode` varchar(32) DEFAULT NULL,
  `Phone1` varchar(16) NOT NULL DEFAULT '',
  `Phone2` varchar(16) NOT NULL DEFAULT '',
  `USPhoneFormat` int(11) NOT NULL DEFAULT '1',
  `Color` varchar(10) NOT NULL DEFAULT '',
  `FontFamily` varchar(32) NOT NULL DEFAULT '',
  `FontSize` int(11) NOT NULL DEFAULT '0',
  `ContactEmail` varchar(64) NOT NULL DEFAULT '',
  `Fax` varchar(16) NOT NULL DEFAULT '',
  `FaxService` varchar(64) NOT NULL DEFAULT '',
  `FaxFrom` varchar(128) NOT NULL DEFAULT '',
  `Code` int(11) NOT NULL DEFAULT '0',
  `Motto` varchar(255) NOT NULL DEFAULT '',
  `FamilyCode` int(11) NOT NULL DEFAULT '1000',
  `ContactNumber` varchar(16) NOT NULL DEFAULT '1000',
  `DonorNumber` int(11) NOT NULL DEFAULT '1000',
  `PrincipalUID` int(11) NOT NULL DEFAULT '0',
  `AdminEmail` varchar(64) NOT NULL DEFAULT '',
  `BillingEmail` varchar(128) NOT NULL,
  `WebSite` varchar(64) NOT NULL DEFAULT '',
  `FBSite` varchar(128) NOT NULL,
  `TWSite` varchar(128) NOT NULL,
  `YTSite` varchar(128) NOT NULL,
  `SSASite` varchar(128) NOT NULL,
  `PintSite` varchar(128) NOT NULL,
  `LogOutRedirect` int(11) NOT NULL DEFAULT '1',
  `AttendanceType` int(11) NOT NULL DEFAULT '2',
  `ClassRoomHours` float(10,2) NOT NULL DEFAULT '0.00',
  `LastGradeOffered` int(11) NOT NULL DEFAULT '0',
  `FirstGradeOffered` int(11) NOT NULL DEFAULT '0',
  `SchoolType` int(11) NOT NULL DEFAULT '0',
  `SiteType` int(11) NOT NULL DEFAULT '0' COMMENT '0 = Customer, 1 = Demo, 2 = Report, 3 = Internal',
  `TZ` varchar(5) NOT NULL DEFAULT '0',
  `TimeZone` varchar(64) NOT NULL,
  `LanguageEncoding` varchar(16) NOT NULL,
  `FamilyEnrollmentGroup` int(11) NOT NULL DEFAULT '0',
  `StudentEnrollmentGroup` int(11) NOT NULL DEFAULT '0',
  `Trailer` varchar(255) NOT NULL DEFAULT '',
  `Ticket` int(11) NOT NULL DEFAULT '1000',
  `InvoiceNumber` int(11) NOT NULL DEFAULT '1000',
  `PerUser` float NOT NULL DEFAULT '0',
  `FlatRate` float NOT NULL DEFAULT '0',
  `MaxUsers` int(11) NOT NULL DEFAULT '0',
  `BillingType` int(11) NOT NULL DEFAULT '-1',
  `ExpireOn` date NOT NULL DEFAULT '0000-00-00',
  `DiskSpace` int(11) NOT NULL DEFAULT '100',
  `Signature` longtext NOT NULL,
  `CatholicSchool` int(11) NOT NULL DEFAULT '0',
  `CatholicDioceseOffice` int(11) NOT NULL DEFAULT '0',
  `SchoolDistrictOffice` int(11) NOT NULL,
  `SchoolStateOffice` int(11) NOT NULL,
  `EdFi` varchar(255) DEFAULT NULL COMMENT 'EdFi System',
  `US_School` int(11) NOT NULL DEFAULT '1',
  `SGID` int(11) NOT NULL DEFAULT '1' COMMENT 'Support Group ID',
  `HomePageView` int(11) NOT NULL DEFAULT '1',
  `WidgetOrder` varchar(64) NOT NULL,
  `County` varchar(32) NOT NULL,
  `StudentAddressOpt` tinyint(1) NOT NULL DEFAULT '0',
  `site_environment` int(11) NOT NULL DEFAULT '0',
  `created_at` datetime(6) DEFAULT NULL,
  `updated_at` datetime(6) DEFAULT NULL,
  PRIMARY KEY (`SchoolID`),
  KEY `Active` (`Active`),
  KEY `SupportID` (`SupportID`),
  KEY `index_Schools_on_country_id` (`country_id`),
  CONSTRAINT `fk_rails_8b9ea2797d` FOREIGN KEY (`country_id`) REFERENCES `iso_countries` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `ScripCategory`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ScripCategory` (
  `ScripCategoryID` int(11) NOT NULL AUTO_INCREMENT,
  `Name` varchar(24) NOT NULL DEFAULT '',
  PRIMARY KEY (`ScripCategoryID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `ServiceFamilyLogs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ServiceFamilyLogs` (
  `SLID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `FamilyID` int(11) NOT NULL DEFAULT '0',
  `school_year_id` int(11) DEFAULT NULL,
  `LogDateTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `AuthorID` int(11) DEFAULT '0',
  `CreatedDT` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `SOID` int(11) NOT NULL DEFAULT '0',
  `Hours` float NOT NULL DEFAULT '0',
  `Notes` text,
  `Approved` int(11) NOT NULL DEFAULT '0',
  `created_at` datetime(6) DEFAULT NULL,
  `updated_at` datetime(6) DEFAULT NULL,
  PRIMARY KEY (`SLID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `AuthorID` (`AuthorID`),
  KEY `FamilyID` (`FamilyID`),
  KEY `index_ServiceFamilyLogs_on_school_year_id` (`school_year_id`),
  CONSTRAINT `fk_rails_191735c403` 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 `ServiceOpGroups`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ServiceOpGroups` (
  `SOGID` int(11) NOT NULL AUTO_INCREMENT,
  `Name` varchar(16) NOT NULL DEFAULT '',
  `Description` varchar(64) DEFAULT '',
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `Sequence` int(11) NOT NULL DEFAULT '0',
  `created_at` datetime(6) DEFAULT NULL,
  `updated_at` datetime(6) DEFAULT NULL,
  PRIMARY KEY (`SOGID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `ServiceOps`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ServiceOps` (
  `SOID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `Name` varchar(32) NOT NULL DEFAULT '',
  `SOGID` int(11) NOT NULL DEFAULT '0',
  `Description` text,
  `archived` tinyint(1) DEFAULT '0',
  `created_at` datetime(6) DEFAULT NULL,
  `updated_at` datetime(6) DEFAULT NULL,
  PRIMARY KEY (`SOID`),
  KEY `MealID` (`SOID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `ServiceRequirements`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ServiceRequirements` (
  `SRID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `StudentHours` int(11) DEFAULT NULL,
  `FamilyHours` int(11) DEFAULT NULL,
  PRIMARY KEY (`SRID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `ServiceStudentHist`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ServiceStudentHist` (
  `SLID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `SchoolYearID` int(11) NOT NULL,
  `StudentID` int(11) NOT NULL DEFAULT '0',
  `Hours` float NOT NULL DEFAULT '0',
  `ApprovedHrs` float NOT NULL DEFAULT '0',
  `Grade` int(11) NOT NULL,
  `Updated` datetime NOT NULL,
  PRIMARY KEY (`SLID`),
  KEY `SDID` (`SLID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `StudentID` (`StudentID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `ServiceStudentLogs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ServiceStudentLogs` (
  `SLID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `StudentID` int(11) NOT NULL DEFAULT '0',
  `school_year_id` int(11) DEFAULT NULL,
  `LogDateTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `AuthorID` int(11) DEFAULT '0',
  `CreatedDT` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `SOID` int(11) NOT NULL DEFAULT '0',
  `Hours` float NOT NULL DEFAULT '0',
  `Notes` text,
  `Approved` int(11) NOT NULL DEFAULT '0',
  `created_at` datetime(6) DEFAULT NULL,
  `updated_at` datetime(6) DEFAULT NULL,
  PRIMARY KEY (`SLID`),
  KEY `SDID` (`SLID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `StudentID` (`StudentID`),
  KEY `DateTime` (`LogDateTime`),
  KEY `AuthorID` (`AuthorID`),
  KEY `index_ServiceStudentLogs_on_school_year_id` (`school_year_id`),
  CONSTRAINT `fk_rails_07241399fb` 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 `Sessions`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Sessions` (
  `SessionID` varchar(32) NOT NULL DEFAULT '',
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `UserName` varchar(16) NOT NULL DEFAULT '',
  `Secure` int(11) NOT NULL DEFAULT '0',
  `Started` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Updated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Completed` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `UserID` int(11) NOT NULL DEFAULT '0',
  `FamilyID` int(11) NOT NULL DEFAULT '0',
  `StudentID` int(11) NOT NULL DEFAULT '0',
  `Ended` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `IPAddress` varchar(16) NOT NULL DEFAULT '',
  `HostName` varchar(64) NOT NULL DEFAULT '',
  PRIMARY KEY (`SessionID`),
  KEY `SessionID` (`SessionID`),
  KEY `UserID` (`UserID`),
  KEY `Started` (`Started`),
  KEY `Updated` (`Updated`),
  KEY `FamilyID` (`FamilyID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `FamilyScan` (`SchoolID`,`FamilyID`,`Started`),
  KEY `UserName` (`UserName`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `SessionsData`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `SessionsData` (
  `sessionid` varchar(32) NOT NULL DEFAULT '',
  `expires` int(11) unsigned NOT NULL DEFAULT '0',
  `value` text NOT NULL,
  PRIMARY KEY (`sessionid`),
  KEY `expires` (`expires`),
  KEY `sessionid` (`sessionid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `ShoutBox`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ShoutBox` (
  `SBID` int(11) NOT NULL AUTO_INCREMENT,
  `SBPID` int(11) NOT NULL,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `ProjectID` int(11) NOT NULL,
  `PostedDT` datetime NOT NULL,
  `UserID` int(11) NOT NULL DEFAULT '0',
  `Time` varchar(24) NOT NULL,
  `PenColor` smallint(6) NOT NULL,
  `Message` text NOT NULL,
  `PhotoID` int(11) NOT NULL,
  `SBTypeID` int(11) NOT NULL,
  `SBTagID` int(11) NOT NULL,
  `Month` int(11) NOT NULL,
  `Day` int(11) NOT NULL,
  `Year` int(11) NOT NULL,
  `ClassID` int(11) NOT NULL,
  PRIMARY KEY (`SBID`),
  KEY `CompanyID` (`SchoolID`),
  KEY `UserID` (`UserID`),
  KEY `Month` (`Month`),
  KEY `Day` (`Day`),
  KEY `Year` (`Year`),
  KEY `SBPID` (`SBPID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `ShoutBoxLikes`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ShoutBoxLikes` (
  `SBLikeID` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Unique ID for likes',
  `SchoolID` int(11) NOT NULL,
  `SBID` int(11) NOT NULL COMMENT 'ShoutBoxID',
  `UserID` int(11) NOT NULL COMMENT 'UserID',
  PRIMARY KEY (`SBLikeID`),
  KEY `CompanyID` (`SchoolID`),
  KEY `SBID` (`SBID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `ShoutBoxTags`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ShoutBoxTags` (
  `SBTagID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `ShortDescription` varchar(26) NOT NULL,
  `Description` varchar(125) NOT NULL,
  PRIMARY KEY (`SBTagID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `ShoutBoxTypes`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ShoutBoxTypes` (
  `SBTypeID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `Date` date NOT NULL,
  `ShortDescription` varchar(25) NOT NULL,
  `LongDescription` varchar(128) NOT NULL,
  PRIMARY KEY (`SBTypeID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Types of posts in the Shout Box';
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `SiteMessages`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `SiteMessages` (
  `SMID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `ClassID` int(11) NOT NULL DEFAULT '0',
  `StartDate` date NOT NULL DEFAULT '0000-00-00',
  `StopDate` date NOT NULL DEFAULT '0000-00-00',
  `Subject` varchar(255) NOT NULL DEFAULT '',
  `Message` text NOT NULL,
  `AuthorID` int(11) NOT NULL DEFAULT '0',
  `PhotoID` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`SMID`),
  UNIQUE KEY `HomePageMsgID` (`SMID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `StartDate` (`StartDate`),
  KEY `StopDate` (`StopDate`),
  KEY `ClassID` (`ClassID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `SmartModules`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `SmartModules` (
  `SMID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `SRID` int(11) NOT NULL,
  `Name` varchar(64) NOT NULL,
  `Description` varchar(128) NOT NULL,
  `Layout` text NOT NULL,
  `Query` text NOT NULL,
  `Preview` text NOT NULL,
  PRIMARY KEY (`SMID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `SRID` (`SRID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `SmartReports`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `SmartReports` (
  `SRID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `Name` varchar(64) NOT NULL,
  `Description` varchar(128) NOT NULL,
  `Layout` text NOT NULL,
  `PageSize` varchar(16) NOT NULL,
  `Orientation` tinyint(4) NOT NULL COMMENT '0=Portrait, 1=Landscape',
  `MarginTop` smallint(6) NOT NULL,
  `MarginRight` smallint(6) NOT NULL,
  `MarginBottom` smallint(6) NOT NULL,
  `MarginLeft` smallint(6) NOT NULL,
  PRIMARY KEY (`SRID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `SocialMediaSites`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `SocialMediaSites` (
  `SMSID` int(11) NOT NULL AUTO_INCREMENT,
  `Name` varchar(32) NOT NULL,
  `Logo` varchar(64) NOT NULL,
  `Icon` varchar(64) NOT NULL,
  `Sequence` int(11) NOT NULL,
  PRIMARY KEY (`SMSID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `SparkPostConfigs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `SparkPostConfigs` (
  `SPCID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `Type` varchar(16) NOT NULL,
  `Domain` varchar(64) NOT NULL,
  `AccountID` int(11) NOT NULL,
  PRIMARY KEY (`SPCID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `SparkpostSuppressions`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `SparkpostSuppressions` (
  `SSID` bigint(20) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `TransmissionID` varchar(255) NOT NULL,
  `Email` varchar(255) NOT NULL,
  `Reason` varchar(255) DEFAULT NULL,
  `Type` int(11) NOT NULL,
  `CreateAt` datetime NOT NULL,
  PRIMARY KEY (`SSID`),
  KEY `fk_rails_e39e59e6c7` (`SchoolID`),
  CONSTRAINT `fk_rails_e39e59e6c7` FOREIGN KEY (`SchoolID`) REFERENCES `Schools` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `SpiritStoreItems`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `SpiritStoreItems` (
  `SSIID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `SSOID` int(11) NOT NULL,
  `Product` varchar(32) NOT NULL,
  `Quantity` int(11) NOT NULL,
  `Color` varchar(16) NOT NULL,
  `Size` varchar(6) NOT NULL,
  `Design` varchar(16) NOT NULL,
  `ImageUrl` varchar(255) NOT NULL,
  `Cost` decimal(10,2) NOT NULL,
  PRIMARY KEY (`SSIID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `SSOID` (`SSOID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `SpiritStoreOrders`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `SpiritStoreOrders` (
  `SSOID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `OrderCode` varchar(16) NOT NULL,
  `OrderDate` int(11) NOT NULL,
  `Name` varchar(32) NOT NULL,
  `Address` varchar(32) NOT NULL,
  `City` varchar(32) NOT NULL,
  `State` varchar(12) NOT NULL,
  `Zip` varchar(12) NOT NULL,
  `Cost` decimal(10,2) NOT NULL,
  `Shipping` decimal(10,2) NOT NULL,
  `Charged` decimal(10,2) NOT NULL,
  PRIMARY KEY (`SSOID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Spirit Store Orders';
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `SportScores`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `SportScores` (
  `SSID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `SchoolYearID` int(11) NOT NULL,
  `GameDate` date NOT NULL,
  `DisplayDate` date NOT NULL,
  `SportID` int(11) NOT NULL,
  `HomeGame` int(11) NOT NULL,
  `Team1` int(11) NOT NULL,
  `Team1Score1` int(11) NOT NULL,
  `Team1Score2` int(11) NOT NULL,
  `Team1Score3` int(11) NOT NULL,
  `Team1Score4` int(11) NOT NULL,
  `Team1Score5` int(11) NOT NULL,
  `Team2` int(11) NOT NULL,
  `Team2Score1` int(11) NOT NULL,
  `Team2Score2` int(11) NOT NULL,
  `Team2Score3` int(11) NOT NULL,
  `Team2Score4` int(11) NOT NULL,
  `Team2Score5` int(11) NOT NULL,
  `Win` int(11) NOT NULL,
  `Notes` tinytext NOT NULL,
  `HeadLine` varchar(64) NOT NULL,
  `Location` varchar(64) NOT NULL,
  `EventID` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`SSID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `SportID` (`SportID`),
  KEY `Team1` (`Team1`),
  KEY `Team2` (`Team2`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `SportTeams`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `SportTeams` (
  `STID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `SportID` int(11) NOT NULL,
  `Name` varchar(32) NOT NULL,
  `Description` varchar(64) NOT NULL,
  `ClassID` int(11) NOT NULL,
  PRIMARY KEY (`STID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `Sports`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Sports` (
  `SportID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `Name` varchar(32) NOT NULL,
  `Description` varchar(128) NOT NULL,
  `SponsorID` int(11) NOT NULL,
  PRIMARY KEY (`SportID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `StandardEntries`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StandardEntries` (
  `SEID` int(11) NOT NULL AUTO_INCREMENT,
  `StandardID` int(11) NOT NULL DEFAULT '0',
  `Grade` int(11) NOT NULL DEFAULT '0',
  `StandardTopicID` int(11) NOT NULL DEFAULT '0',
  `SectionNum` varchar(10) NOT NULL DEFAULT '',
  `Description` varchar(255) NOT NULL DEFAULT '',
  `Example` text NOT NULL,
  PRIMARY KEY (`SEID`),
  KEY `StandardID` (`StandardID`),
  KEY `Grade` (`Grade`),
  KEY `StandardTopicID` (`StandardTopicID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `StandardSchools`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StandardSchools` (
  `SSID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `StandardID` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`SSID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `StandardID` (`StandardID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `StandardTopics`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StandardTopics` (
  `StandardTopicID` int(11) NOT NULL DEFAULT '0',
  `StandardID` int(11) NOT NULL DEFAULT '0',
  `Topic` varchar(32) NOT NULL DEFAULT '',
  KEY `StandardID` (`StandardID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `StandardizedTestAttempts`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StandardizedTestAttempts` (
  `STAID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `StudentID` int(11) NOT NULL,
  `STID` int(11) NOT NULL,
  `Date` date NOT NULL,
  `Grade` int(11) NOT NULL DEFAULT '99',
  PRIMARY KEY (`STAID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `Grade` (`Grade`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `StandardizedTestSubjects`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StandardizedTestSubjects` (
  `STSID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `STID` int(11) NOT NULL COMMENT 'Standardized Test ID',
  `Name` varchar(32) NOT NULL,
  `Description` varchar(255) NOT NULL,
  `Possible` decimal(10,2) NOT NULL,
  `DistrictAvg` decimal(10,2) NOT NULL,
  `StateAvg` decimal(10,2) NOT NULL,
  `NationalAvg` decimal(10,2) NOT NULL,
  PRIMARY KEY (`STSID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `STID` (`STID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `StandardizedTestValues`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StandardizedTestValues` (
  `STVID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL COMMENT 'Zone Related',
  `SchoolYearID` int(11) NOT NULL COMMENT 'Zone related',
  `Year` int(11) NOT NULL COMMENT 'deprecated',
  `OrigSchoolID` int(11) NOT NULL,
  `StudentID` int(11) NOT NULL,
  `STAID` int(11) NOT NULL DEFAULT '0' COMMENT 'Standardized Test Attempt ID',
  `Grade` int(11) NOT NULL COMMENT 'deprecated',
  `Status` varchar(8) NOT NULL COMMENT 'deprecated',
  `STID` int(11) NOT NULL,
  `STSID` int(11) NOT NULL,
  `Number` decimal(10,2) NOT NULL,
  PRIMARY KEY (`STVID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `SchoolYearID` (`SchoolYearID`),
  KEY `Grade` (`Grade`),
  KEY `StudentID` (`StudentID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `StandardizedTests`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StandardizedTests` (
  `STID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `Name` varchar(32) NOT NULL,
  `Description` varchar(255) NOT NULL,
  `Grade` int(11) NOT NULL,
  `SchoolYearID` int(11) NOT NULL,
  `Standard` int(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`STID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `SchoolYearID` (`SchoolYearID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `Standards`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Standards` (
  `StandardID` int(11) NOT NULL AUTO_INCREMENT,
  `Name` varchar(64) NOT NULL DEFAULT '',
  `Description` varchar(128) NOT NULL DEFAULT '',
  PRIMARY KEY (`StandardID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `StudentActivities`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentActivities` (
  `SAID` 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 '',
  `Sequence` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`SAID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `Sequence` (`Sequence`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `StudentActivityStudents`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentActivityStudents` (
  `SASID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `SchoolYearID` int(11) NOT NULL,
  `StudentID` int(11) NOT NULL DEFAULT '0',
  `Grade` int(11) NOT NULL,
  `SAID` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`SASID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `StudentID` (`StudentID`),
  KEY `SCID` (`SAID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `StudentAssessmentCfg`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentAssessmentCfg` (
  `SAID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `SchoolYearID` int(11) NOT NULL,
  `Grade` int(11) NOT NULL,
  `ReadingNationalAvg` decimal(10,2) NOT NULL,
  `ReadingLocalAvg` decimal(10,2) NOT NULL,
  `ReadingPossible` int(11) NOT NULL,
  `WritingNationalAvg` decimal(10,2) NOT NULL,
  `WritingLocalAvg` decimal(10,2) NOT NULL,
  `WritingPossible` int(11) NOT NULL,
  `LanguageNationalAvg` decimal(10,2) NOT NULL,
  `LanguageLocalAvg` decimal(10,2) NOT NULL,
  `LanguagePossible` int(11) NOT NULL,
  `MathNationalAvg` decimal(10,2) NOT NULL,
  `MathLocalAvg` decimal(10,2) NOT NULL,
  `MathPossible` int(11) NOT NULL,
  `ScienceNationalAvg` decimal(10,2) NOT NULL,
  `ScienceLocalAvg` decimal(10,2) NOT NULL,
  `SciencePossible` int(11) NOT NULL,
  `SocialStudiesNationalAvg` decimal(10,2) NOT NULL,
  `SocialStudiesLocalAvg` decimal(10,2) NOT NULL,
  `SocialStudiesPossible` int(11) NOT NULL,
  `LogicalReasoningNationalAvg` decimal(10,2) NOT NULL,
  `LogicalReasoningLocalAvg` decimal(10,2) NOT NULL,
  `LogicalReasoningPossible` int(11) NOT NULL,
  PRIMARY KEY (`SAID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `SchoolYearID` (`SchoolYearID`),
  KEY `Grade` (`Grade`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `StudentAssessmentValues`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentAssessmentValues` (
  `SAID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `SchoolYearID` int(11) NOT NULL,
  `StudentID` int(11) NOT NULL,
  `Grade` int(11) NOT NULL,
  `Reading` decimal(10,2) NOT NULL,
  `Writing` decimal(10,2) NOT NULL,
  `Language` decimal(10,2) NOT NULL,
  `Math` decimal(10,2) NOT NULL,
  `Science` decimal(10,2) NOT NULL,
  `SocialStudies` decimal(10,2) NOT NULL,
  `LogicalReasoning` decimal(10,2) NOT NULL,
  PRIMARY KEY (`SAID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `SchoolYearID` (`SchoolYearID`),
  KEY `Grade` (`Grade`),
  KEY `StudentID` (`StudentID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `StudentAssessmentView`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentAssessmentView` (
  `SAVID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `Viewable` int(11) NOT NULL COMMENT 'bit wise',
  `Label1` varchar(32) NOT NULL,
  `Label2` varchar(32) NOT NULL,
  `Label3` varchar(32) NOT NULL,
  `Label4` varchar(32) NOT NULL,
  `Label5` varchar(32) NOT NULL,
  `Label6` varchar(32) NOT NULL,
  `Label7` varchar(32) NOT NULL,
  PRIMARY KEY (`SAVID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `StudentAssignments`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentAssignments` (
  `SAID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `StudentID` int(11) NOT NULL,
  `UserID` int(11) NOT NULL DEFAULT '0',
  `ClassID` int(11) NOT NULL,
  `CAID` int(11) NOT NULL,
  `Filename` varchar(255) NOT NULL DEFAULT '',
  `UFilename` varchar(32) NOT NULL DEFAULT '',
  `DateTimeOut` datetime NOT NULL,
  `DateTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Size` int(11) NOT NULL DEFAULT '0',
  `Comments` text NOT NULL,
  `TeacherComments` text NOT NULL,
  `Location` varchar(255) NOT NULL DEFAULT '',
  `Type` varchar(128) NOT NULL,
  `Grade` int(11) NOT NULL,
  `Letter` varchar(2) NOT NULL,
  `DocumentID` int(11) NOT NULL,
  `MyDocID` int(11) NOT NULL,
  `GoogleDownloadURL` varchar(254) NOT NULL,
  UNIQUE KEY `DocumentID_2` (`SAID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `UserID` (`UserID`),
  KEY `StudentID` (`StudentID`),
  KEY `ClassID` (`ClassID`),
  KEY `CAID` (`CAID`),
  KEY `Letter` (`Letter`),
  KEY `MyDocID` (`MyDocID`),
  KEY `DocumentID` (`DocumentID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `StudentCategories`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentCategories` (
  `SCID` 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 '',
  `SCGID` int(11) NOT NULL DEFAULT '0',
  `Sequence` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`SCID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `CCGID` (`SCGID`),
  KEY `Sequence` (`Sequence`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `StudentCategoryGroups`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentCategoryGroups` (
  `SCGID` 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 (`SCGID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `StudentCategoryStudents`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentCategoryStudents` (
  `SCSID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `StudentID` int(11) NOT NULL DEFAULT '0',
  `SCID` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`SCSID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `StudentID` (`StudentID`),
  KEY `SCID` (`SCID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `StudentCheckList`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentCheckList` (
  `SCLID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `Item` varchar(32) NOT NULL DEFAULT '',
  `Description` varchar(255) NOT NULL DEFAULT '',
  `Sequence` int(11) NOT NULL DEFAULT '0',
  `Internal` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`SCLID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `StudentCheckListChecks`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentCheckListChecks` (
  `SCLCID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `StudentID` int(11) NOT NULL,
  `SCLID` int(11) NOT NULL DEFAULT '0',
  `DateTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `UserID` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`SCLCID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `StudentID` (`StudentID`),
  KEY `SCLID` (`SCLID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `StudentConnectionIssues`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentConnectionIssues` (
  `SCIID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `Issue` varchar(64) NOT NULL,
  `IssueDesc` varchar(128) NOT NULL,
  PRIMARY KEY (`SCIID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `StudentConnectionLocations`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentConnectionLocations` (
  `SCLID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `Location` varchar(32) NOT NULL,
  `LocDesc` varchar(128) NOT NULL,
  PRIMARY KEY (`SCLID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `StudentConnectionResponses`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentConnectionResponses` (
  `SCRspID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `Response` varchar(64) NOT NULL,
  `RspDesc` varchar(128) NOT NULL,
  PRIMARY KEY (`SCRspID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `StudentConnectionRoles`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentConnectionRoles` (
  `SCRID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `Role` varchar(16) NOT NULL,
  `RoleDesc` text NOT NULL,
  PRIMARY KEY (`SCRID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `StudentConnections`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
