-- Table structure for table `EmployeeEvaluationFieldValues`
--

DROP TABLE IF EXISTS `EmployeeEvaluationFieldValues`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `EmployeeEvaluationFieldValues` (
  `EEFVID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `EEID` int(11) NOT NULL,
  `EEFID` int(11) NOT NULL,
  `Value` varchar(255) NOT NULL,
  `Score` int(11) NOT NULL,
  PRIMARY KEY (`EEFVID`),
  KEY `SchoolID` (`SchoolID`,`EEID`,`EEFID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `EmployeeEvaluationFields`
--

DROP TABLE IF EXISTS `EmployeeEvaluationFields`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `EmployeeEvaluationFields` (
  `EEFID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `Name` varchar(255) NOT NULL,
  `Scale` tinyint(1) NOT NULL,
  `Active` tinyint(1) NOT NULL,
  PRIMARY KEY (`EEFID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `EmployeeEvaluationStandardValues`
--

DROP TABLE IF EXISTS `EmployeeEvaluationStandardValues`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `EmployeeEvaluationStandardValues` (
  `EESVID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `EEID` int(11) NOT NULL,
  `EESID` int(11) NOT NULL,
  `Value` varchar(255) NOT NULL,
  PRIMARY KEY (`EESVID`),
  KEY `SchoolID` (`SchoolID`,`EEID`,`EESID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `EmployeeEvaluationStandards`
--

DROP TABLE IF EXISTS `EmployeeEvaluationStandards`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `EmployeeEvaluationStandards` (
  `EESID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `EEFID` int(11) NOT NULL,
  `Name` varchar(255) NOT NULL,
  PRIMARY KEY (`EESID`),
  KEY `SchoolID` (`SchoolID`,`EEFID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `EmployeeEvaluations`
--

DROP TABLE IF EXISTS `EmployeeEvaluations`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `EmployeeEvaluations` (
  `EEID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `UserID` int(11) NOT NULL,
  `AuthorID` int(11) NOT NULL,
  `Date` date NOT NULL,
  PRIMARY KEY (`EEID`),
  KEY `SchoolID` (`SchoolID`,`UserID`,`AuthorID`),
  KEY `SchoolID_2` (`SchoolID`,`AuthorID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `EmployeeLogs`
--

DROP TABLE IF EXISTS `EmployeeLogs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `EmployeeLogs` (
  `ELID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `AuthorName` varchar(64) NOT NULL,
  `AuthorID` int(11) NOT NULL,
  `UserID` int(11) NOT NULL,
  `UserName` varchar(64) NOT NULL,
  `DateTime` datetime NOT NULL,
  `Events` varchar(255) NOT NULL,
  PRIMARY KEY (`ELID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `FamilyID` (`UserID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Family Update Log Table';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `EndOfYearConfig`
--

DROP TABLE IF EXISTS `EndOfYearConfig`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `EndOfYearConfig` (
  `EOYCID` int(11) NOT NULL AUTO_INCREMENT,
  `Seq` int(11) NOT NULL DEFAULT '0',
  `ConfigType` int(11) NOT NULL DEFAULT '0' COMMENT '0-Token1-Prepare 2-Saving 3-Deleting',
  `Name` varchar(128) NOT NULL,
  `Description` text NOT NULL,
  `HelpURL` varchar(256) NOT NULL,
  `ColWidth` varchar(16) NOT NULL,
  `PanelStyle` varchar(64) NOT NULL,
  `PanelFooter` varchar(512) NOT NULL,
  PRIMARY KEY (`EOYCID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `EndOfYearWizard`
--

DROP TABLE IF EXISTS `EndOfYearWizard`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `EndOfYearWizard` (
  `EWID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `SchoolYearID` int(11) NOT NULL DEFAULT '0',
  `StartPage` varchar(12) NOT NULL,
  `StartID` int(4) NOT NULL DEFAULT '0',
  `UserID` int(11) NOT NULL DEFAULT '0',
  `DateCompleted` datetime NOT NULL,
  `SkipModal` int(4) NOT NULL DEFAULT '0',
  PRIMARY KEY (`EWID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `EnrollAgreementStamps`
--

DROP TABLE IF EXISTS `EnrollAgreementStamps`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `EnrollAgreementStamps` (
  `EASID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `EAID` int(11) NOT NULL,
  `FamilyID` int(11) NOT NULL,
  `SchoolYearID` int(11) NOT NULL,
  `AgreeDateTime` int(11) NOT NULL,
  `Value` int(11) NOT NULL,
  PRIMARY KEY (`EASID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `EAID` (`EAID`),
  KEY `FamilyID` (`FamilyID`),
  KEY `SchoolYearID` (`SchoolYearID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='When parent agrees to statement, date/time kept ';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `EnrollAgreements`
--

DROP TABLE IF EXISTS `EnrollAgreements`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `EnrollAgreements` (
  `EAID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `Published` int(11) NOT NULL DEFAULT '1',
  `Title` varchar(56) NOT NULL,
  `Statement` text NOT NULL,
  `Page` int(11) NOT NULL,
  `Sequence` int(11) NOT NULL DEFAULT '0',
  `Required` int(11) NOT NULL DEFAULT '1',
  `Current` int(1) NOT NULL DEFAULT '1',
  PRIMARY KEY (`EAID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `EnrollApplicationGrades`
--

DROP TABLE IF EXISTS `EnrollApplicationGrades`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `EnrollApplicationGrades` (
  `EAGID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `EAID` int(11) NOT NULL,
  `GradeID` int(11) NOT NULL,
  UNIQUE KEY `EAGID` (`EAGID`),
  UNIQUE KEY `EAGID_2` (`EAGID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `EAID` (`EAID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `EnrollApplicationStatistics`
--

DROP TABLE IF EXISTS `EnrollApplicationStatistics`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `EnrollApplicationStatistics` (
  `EASID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `EAID` int(11) NOT NULL,
  `SSID` int(11) NOT NULL,
  `Required` int(1) NOT NULL,
  `ParentSchoolID` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`EASID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `EAID` (`EAID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `EnrollApplications`
--

DROP TABLE IF EXISTS `EnrollApplications`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `EnrollApplications` (
  `EAID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `Title` varchar(64) NOT NULL,
  `SchoolYearID` int(11) NOT NULL,
  PRIMARY KEY (`EAID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `EnrollCheck`
--

DROP TABLE IF EXISTS `EnrollCheck`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `EnrollCheck` (
  `ECID` 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 '',
  `Status` tinyint(1) NOT NULL DEFAULT '0',
  `Type` int(11) NOT NULL DEFAULT '0',
  `Sequence` int(11) NOT NULL DEFAULT '0',
  `Internal` int(1) NOT NULL DEFAULT '0' COMMENT 'For use with Admissions Portal',
  PRIMARY KEY (`ECID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `Type` (`Type`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `EnrollClassPeriods`
--

DROP TABLE IF EXISTS `EnrollClassPeriods`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `EnrollClassPeriods` (
  `ECPID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `ClassID` int(11) NOT NULL DEFAULT '0',
  `Day` int(11) NOT NULL DEFAULT '0',
  `PeriodID` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`ECPID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ClassID` (`ClassID`),
  KEY `Day` (`Day`),
  KEY `PeriodID` (`PeriodID`),
  CONSTRAINT `EnrollClassPeriods_ibfk_1` FOREIGN KEY (`ClassID`) REFERENCES `Classes` (`ClassID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Class Period Table';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `EnrollClasses`
--

DROP TABLE IF EXISTS `EnrollClasses`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `EnrollClasses` (
  `ECID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `ClassID` int(11) NOT NULL DEFAULT '0',
  `TeacherID` int(11) NOT NULL DEFAULT '0',
  `PeriodID` int(11) NOT NULL DEFAULT '0',
  `FacilityID` int(11) NOT NULL DEFAULT '0',
  `Approved` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`ECID`),
  UNIQUE KEY `SchoolID_2` (`SchoolID`,`ClassID`),
  KEY `ClassID` (`ClassID`),
  CONSTRAINT `EnrollClasses_ibfk_1` FOREIGN KEY (`ClassID`) REFERENCES `Classes` (`ClassID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `EnrollConfig`
--

DROP TABLE IF EXISTS `EnrollConfig`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `EnrollConfig` (
  `EnrollInfoID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `SchoolYearID` int(11) NOT NULL DEFAULT '0',
  `NewReturning` tinyint(1) NOT NULL DEFAULT '0',
  `Enroll` int(11) NOT NULL DEFAULT '0',
  `ReEnroll` int(11) NOT NULL DEFAULT '0',
  `AddStudents` int(11) NOT NULL DEFAULT '0',
  `Classes` int(11) NOT NULL DEFAULT '0',
  `Medical` int(11) NOT NULL DEFAULT '0',
  `InquiryTitle` varchar(64) NOT NULL,
  `InquiryText` text NOT NULL,
  `InquiryURL` varchar(128) NOT NULL,
  `PreEnrollText` text NOT NULL,
  `PostEnrollText` text NOT NULL,
  `PreEnrollTextNew` text NOT NULL,
  `PostEnrollTextNew` text NOT NULL,
  `EmailText` text NOT NULL,
  `EMail` varchar(255) NOT NULL DEFAULT '',
  `Title` varchar(128) NOT NULL DEFAULT '',
  `FamilyAccountID` int(11) NOT NULL DEFAULT '0',
  `EnrollType` int(11) NOT NULL DEFAULT '1',
  `Verify` int(11) NOT NULL DEFAULT '0',
  `AppFamilyFee` float NOT NULL DEFAULT '0',
  `AppPerStudentFee` float NOT NULL DEFAULT '0',
  `PortalName` varchar(16) NOT NULL,
  `DisplayRace` int(1) NOT NULL DEFAULT '0',
  `RequireRace` int(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`EnrollInfoID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `EnrollDenied`
--

DROP TABLE IF EXISTS `EnrollDenied`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `EnrollDenied` (
  `EDID` int(12) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(12) NOT NULL,
  `FamilyID` int(12) NOT NULL,
  PRIMARY KEY (`EDID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `EnrollDocuments`
--

DROP TABLE IF EXISTS `EnrollDocuments`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `EnrollDocuments` (
  `DocumentID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `ClassID` int(11) NOT NULL DEFAULT '0',
  `FileName` varchar(255) NOT NULL DEFAULT '',
  `Sequence` int(11) NOT NULL DEFAULT '0',
  `UFileName` varchar(32) 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',
  `AuthorUID` int(11) NOT NULL DEFAULT '0',
  `SchoolDocument` int(11) NOT NULL DEFAULT '0',
  `Approved` int(11) NOT NULL DEFAULT '0',
  `FolderID` int(11) NOT NULL DEFAULT '0',
  `Online` int(11) NOT NULL DEFAULT '0',
  `Alert` int(11) NOT NULL DEFAULT '0',
  `VirusScan` int(11) NOT NULL DEFAULT '0',
  `VirusScanResults` varchar(128) NOT NULL DEFAULT '',
  UNIQUE KEY `DocumentID` (`DocumentID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ClassID` (`ClassID`),
  KEY `DateTime` (`DateTime`),
  KEY `FolderID` (`FolderID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `EnrollEssayAnswers`
--

DROP TABLE IF EXISTS `EnrollEssayAnswers`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `EnrollEssayAnswers` (
  `EQAID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `EQID` int(11) NOT NULL,
  `FamilyID` int(11) NOT NULL DEFAULT '0',
  `StudentID` int(11) NOT NULL DEFAULT '0',
  `Answer` text NOT NULL,
  `Created` datetime NOT NULL,
  PRIMARY KEY (`EQAID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `EnrollEssayQuestions`
--

DROP TABLE IF EXISTS `EnrollEssayQuestions`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `EnrollEssayQuestions` (
  `EQID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `Title` varchar(56) NOT NULL,
  `Question` text NOT NULL,
  `Sequence` int(11) NOT NULL DEFAULT '0',
  `Type` tinyint(1) NOT NULL DEFAULT '1' COMMENT '1=family 2=student',
  `Status` int(11) NOT NULL,
  PRIMARY KEY (`EQID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `EnrollEssentialDocUploads`
--

DROP TABLE IF EXISTS `EnrollEssentialDocUploads`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `EnrollEssentialDocUploads` (
  `EEDUID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `StudentID` int(11) NOT NULL,
  `EEDID` int(11) NOT NULL,
  `DocumentID` int(11) NOT NULL,
  `Created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`EEDUID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `EEDID` (`EEDID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `EnrollEssentialDocs`
--

DROP TABLE IF EXISTS `EnrollEssentialDocs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `EnrollEssentialDocs` (
  `EEDID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `Title` varchar(36) NOT NULL,
  `Description` varchar(128) NOT NULL,
  `Required` tinyint(1) NOT NULL,
  PRIMARY KEY (`EEDID`),
  UNIQUE KEY `EEDID` (`EEDID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `EnrollFamilies`
--

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 */;

--
-- Table structure for table `EnrollFamilyCheck`
--

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 */;

--
-- Table structure for table `EnrollFamilyProspects`
--

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 */;

--
-- Table structure for table `EnrollFamilyTransactions`
--

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 */;

--
-- Table structure for table `EnrollFees`
--

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 */;

--
-- Table structure for table `EnrollPayments`
--

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 */;

--
-- Table structure for table `EnrollStatus`
--

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 */;

--
-- Table structure for table `EnrollStudentCheck`
--

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 */;

--
-- Table structure for table `EnrollStudentClasses`
--

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 */;

--
-- Table structure for table `EnrollStudents`
--

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 */;

--
-- Table structure for table `Enrollment`
--

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 */;

--
-- Table structure for table `EquipmentCategories`
--

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 */;

--
-- Table structure for table `EquipmentInv`
--

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 */;

--
-- Table structure for table `EquipmentInvItems`
--

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 */;

--
-- Table structure for table `EquipmentTrans`
--

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 */;

--
-- Table structure for table `EventAlarms`
--

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 */;

--
-- Table structure for table `EventCalendars`
--

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 */;

--
-- Table structure for table `EventContacts`
--

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 */;

--
-- Table structure for table `EventEditors`
--

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 */;

--
-- Table structure for table `EventNotifications`
--

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 */;

--
-- Table structure for table `EventParticipants`
--

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 */;

--
-- Table structure for table `EventProperties`
--

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 */;

--
-- Table structure for table `EventRegistrations`
--

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 */;

--
-- Table structure for table `EventUsers`
--

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 */;

--
-- Table structure for table `EventUsersOld`
--

DROP TABLE IF EXISTS `EventUsersOld`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `EventUsersOld` (
  `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 */;

--
-- Table structure for table `EventVolunteerServiceLogs`
--

DROP TABLE IF EXISTS `EventVolunteerServiceLogs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `EventVolunteerServiceLogs` (
  `EVSLID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `EVID` int(11) NOT NULL,
  `SLID` int(11) NOT NULL,
  UNIQUE KEY `EVSLID` (`EVSLID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `EventVolunteers`
--

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 */;

--
-- Table structure for table `Events`
--

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) NOT NULL DEFAULT '0',
  `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 */;

--
-- Table structure for table `EventsOld`
--

DROP TABLE IF EXISTS `EventsOld`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `EventsOld` (
  `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` int(11) NOT NULL DEFAULT '0',
  `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',
  `SchoolCalendar` 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) NOT NULL DEFAULT '0',
  `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',
  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`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `Facility`
--

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) NOT NULL DEFAULT '0',
  `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) NOT NULL DEFAULT '0',
  `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 */;

--
-- Table structure for table `FacilityBuildings`
--

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) 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 '',
  `Capacity` int(11) NOT NULL DEFAULT '0',
  `Description` varchar(128) NOT NULL DEFAULT '',
  `PictureFile` varchar(128) NOT NULL DEFAULT '',
  `OwnerID` int(11) NOT NULL DEFAULT '0',
  `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 */;

--
-- Table structure for table `FacilityLocations`
--

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) NOT NULL DEFAULT '0',
  `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 */;

--
-- Table structure for table `FacilityMemos`
--

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 */;

--
-- Table structure for table `Families`
--

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 '',
  `State1` varchar(32) NOT NULL,
  `Zip1` varchar(10) NOT NULL DEFAULT '',
  `Country1` varchar(32) NOT NULL DEFAULT '',
  `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(32) NOT NULL DEFAULT '',
  `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`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `FamilyAccounts`
--

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 */;

--
-- Table structure for table `FamilyBillings`
--

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 */;

--
-- Table structure for table `FamilyChargeItems`
--

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 */;

--
-- Table structure for table `FamilyCharges`
--

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',
  PRIMARY KEY (`MBID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `FamilyID` (`FamilyID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `FamilyDeposits`
--

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 */;

--
-- Table structure for table `FamilyEnroll`
--

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 */;

--
-- Table structure for table `FamilyLogs`
--

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 */;

--
-- Table structure for table `FamilyMed`
--

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 '',
  `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 '',
  `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`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `FamilyNotes`
--

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 */;

--
-- Table structure for table `FamilyParents`
--

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 */;

--
-- Table structure for table `FamilyPaymentOptions`
--

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 */;

--
-- Table structure for table `FamilyStatisticChoices`
--

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 */;

--
-- Table structure for table `FamilyStatisticGroups`
--

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 */;

--
-- Table structure for table `FamilyStatisticValues`
--

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 NOT NULL,
  PRIMARY KEY (`FSVID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `FamilyID` (`FamilyID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `FamilyStatistics`
--

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 */;

--
-- Table structure for table `FamilyTransactions`
--

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 */;

--
-- Table structure for table `FinancialAid`
--

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 */;

--
-- Table structure for table `FinancialAidSources`
--

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 */;

--
-- Table structure for table `Flash`
--

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 */;

--
-- Table structure for table `FlashAds`
--

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 */;

--
-- Table structure for table `Form`
--

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 */;

--
-- Table structure for table `FormData`
--

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 */;

--
-- Table structure for table `FormEntry`
--

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 */;

--
-- Table structure for table `FormFieldTypes`
--

DROP TABLE IF EXISTS `FormFieldTypes`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `FormFieldTypes` (
  `TypeID` int(11) NOT NULL DEFAULT '0',
  `Description` varchar(16) NOT NULL DEFAULT ''
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `FormFields`
--

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 '',
  `Rows` 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 */;

--
-- Table structure for table `FormFolders`
--

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 */;

--
-- Table structure for table `Forum`
--

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 */;

--
-- Table structure for table `ForumBoard`
--

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 */;

--
-- Table structure for table `ForumCount`
--

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 */;

--
-- Table structure for table `Goals`
--

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 */;

--
-- Table structure for table `GoogleAssignments`
--

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 */;

--
-- Table structure for table `GoogleClassroomStudents`
--

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`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `GoogleClassrooms`
--

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 */;

--
-- Table structure for table `GoogleGroups`
--

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 */;

--
-- Table structure for table `GoogleOrgUnits`
--

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 */;

--
-- Table structure for table `GoogleProvisions`
--

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) NOT 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`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `GoogleSync`
--

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=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `GoogleUsers`
--

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) NOT 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`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `GradeSkillSubjects`
--

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 */;

--
-- Table structure for table `GradeSkills`
--

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 */;

--
-- Table structure for table `GradeStandardChanges`
--

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 */;

--
-- Table structure for table `GradeStandardCores`
--

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 */;

--
-- Table structure for table `GradeStandardMaster`
--

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 */;

--
-- Table structure for table `GradeStandardMasterSubjects`
--

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 */;

--
-- Table structure for table `GradeStandardSchools`
--

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 */;

--
-- Table structure for table `GradeStandardSubjects`
--

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 */;

--
-- Table structure for table `GradeStandards`
--

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 */;

--
-- Table structure for table `GradeVisitors`
--

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 */;

--
-- Table structure for table `Grades`
--

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 */;

--
-- Table structure for table `GroupFamily`
--

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 */;

--
-- Table structure for table `GroupFamilyBackup`
--

DROP TABLE IF EXISTS `GroupFamilyBackup`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `GroupFamilyBackup` (
  `GroupID` int(11) NOT NULL DEFAULT '0',
  `FamilyID` int(4) NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `GroupStaff`
--

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 */;

--
-- Table structure for table `GroupStudents`
--

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 */;

--
-- Table structure for table `Groups`
--

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 */;

--
-- Table structure for table `GuestBook`
--

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 */;

--
-- Table structure for table `GuestBookNotes`
--

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 */;

--
-- Table structure for table `IG_Pledges`
--

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 */;

--
-- Table structure for table `IG_Votes`
--

DROP TABLE IF EXISTS `IG_Votes`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `IG_Votes` (
  `IGVID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `SERID` int(11) NOT NULL,
  PRIMARY KEY (`IGVID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `SERID` (`SERID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ImportData`
--

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 */;

--
-- Table structure for table `InstantQueue`
--

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 */;

--
-- Table structure for table `IntegrationAssociations`
--

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=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `InvitedUsers`
--

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 */;

--
-- Table structure for table `Journal`
--

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 */;

--
-- Table structure for table `Kiosk_Access_Tokens`
--

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 */;

--
-- Table structure for table `KnowledgeBase`
--

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 */;

--
-- Table structure for table `KnowledgeBaseGroups`
--

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 */;

--
-- Table structure for table `KnowledgeRead`
--

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 */;

--
-- Table structure for table `LibraryBookSummaries`
--

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 */;

--
-- Table structure for table `LibraryBooks`
--

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 */;

--
-- Table structure for table `LibraryBooksChecked`
--

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 */;

--
-- Table structure for table `LibraryBooksImport`
--

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 */;

--
-- Table structure for table `LibraryBooksIndex`
--

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 */;

--
-- Table structure for table `LibraryBooksLocal`
--

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 */;

--
-- Table structure for table `LibraryClassBookClasses`
--

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 */;

--
-- Table structure for table `LibraryClassBooks`
--

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 */;

--
-- Table structure for table `LibraryGradeDays`
--

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 */;

--
-- Table structure for table `LibraryInventory`
--

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 */;

--
-- Table structure for table `LibraryLocations`
--

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 */;

--
-- Table structure for table `LibraryLogs`
--

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 */;

--
-- Table structure for table `LinkCatagories`
--

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 */;

--
-- Table structure for table `Links`
--

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 */;

--
-- Table structure for table `LinksOkd`
--

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 */;

--
-- Table structure for table `LunchAccounts`
--

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 */;

--
-- Table structure for table `LunchCalendarComments`
--

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 */;

--
-- Table structure for table `LunchCharges`
--

DROP TABLE IF EXISTS `LunchCharges`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `LunchCharges` (
  `LCID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `Sequence` int(11) NOT NULL DEFAULT '0',
  `Code` varchar(5) NOT NULL DEFAULT '',
  `Name` varchar(64) NOT NULL DEFAULT '',
  `Amount` float NOT NULL DEFAULT '0',
  PRIMARY KEY (`LCID`),
  KEY `CompanyID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `LunchConfig`
--

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 */;

--
-- Table structure for table `LunchCycles`
--

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 */;

--
-- Table structure for table `LunchDays`
--

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 */;

--
-- Table structure for table `LunchGroupSchools`
--

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 */;

--
-- Table structure for table `LunchGroups`
--

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 */;

--
-- Table structure for table `LunchItemOrdersStudents`
--

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 */;

--
-- Table structure for table `LunchItemOrdersTeachers`
--

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 */;

--
-- Table structure for table `LunchItems`
--

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 */;

--
-- Table structure for table `LunchMealGroups`
--

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 */;

--
-- Table structure for table `LunchMeals`
--

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 */;

--
-- Table structure for table `LunchMilk`
--

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 */;

--
-- Table structure for table `LunchMilkOrderTeachers`
--

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 */;

--
-- Table structure for table `LunchMilkOrders`
--

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 */;

--
-- Table structure for table `LunchNotes`
--

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 */;

--
-- Table structure for table `LunchNotifierResults`
--

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 */;

--
-- Table structure for table `LunchOrdersStudents`
--

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 */;

--
-- Table structure for table `LunchOrdersTeachers`
--

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 */;

--
-- Table structure for table `LunchPricePlans`
--

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 */;

--
-- Table structure for table `LunchTransactionsStudents`
--

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 */;

--
-- Table structure for table `LunchTransactionsTeachers`
--

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 */;

--
-- Table structure for table `Lunches`
--

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 */;

--
-- Table structure for table `MP_Account`
--

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 */;

--
-- Table structure for table `MP_Products`
--

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 */;

--
-- Table structure for table `MP_PurchaseCheckout`
--

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 */;

--
-- Table structure for table `MP_PurchasedItems`
--

DROP TABLE IF EXISTS `MP_PurchasedItems`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `MP_PurchasedItems` (
  `MPPIID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(12) NOT NULL,
  `UserID` int(12) NOT NULL,
  `MPPID` int(12) NOT NULL,
  PRIMARY KEY (`MPPIID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `MP_Questions`
--

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 */;

--
-- Table structure for table `MP_ResourceTypes`
--

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 */;

--
-- Table structure for table `MP_SubjectAreas`
--

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 */;

--
-- Table structure for table `MP_Transactions`
--

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 */;

--
-- Table structure for table `MaritalStatus`
--

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 */;

--
-- Table structure for table `MarkTmp`
--

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 */;

--
-- Table structure for table `Medications`
--

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 */;

--
-- Table structure for table `MessageOptions`
--

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 */;

--
-- Table structure for table `Messages`
--

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 */;

--
-- Table structure for table `Motd`
--

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 */;

--
-- Table structure for table `Multimedia`
--

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 */;

--
-- Table structure for table `MultimediaGroups`
--

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 */;

--
-- Table structure for table `MultimediaRead`
--

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 */;

--
-- Table structure for table `MyBlogComments`
--

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 */;

--
-- Table structure for table `MyBlogRead`
--

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 */;

--
-- Table structure for table `MyBlogs`
--

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 */;

--
-- Table structure for table `MyCategories`
--

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 */;

--
-- Table structure for table `MyCategoryContacts`
--

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 */;

--
-- Table structure for table `MyDocDownLoads`
--

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 */;

--
-- Table structure for table `MyDocFolderLinks`
--

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 */;

--
-- Table structure for table `MyDocFolders`
--

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 */;

--
-- Table structure for table `MyDocumentLinks`
--

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 */;

--
-- Table structure for table `MyDocuments`
--

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 */;

--
-- Table structure for table `MyLinkCatagories`
--

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 */;

--
-- Table structure for table `MyLinks`
--

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 */;

--
-- Table structure for table `MyNews`
--

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 */;

--
-- Table structure for table `MyNewsComments`
--

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 */;

--
-- Table structure for table `MyNewsLinks`
--

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 */;

--
-- Table structure for table `MyNewsRead`
--

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 */;

--
-- Table structure for table `MyPhotoFolders`
--

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 */;

--
-- Table structure for table `MyPhotoLinks`
--

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 */;

--
-- Table structure for table `MyPhotos`
--

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 */;

--
-- Table structure for table `MyTaskLists`
--

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 */;

--
-- Table structure for table `MyTaskLogs`
--

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 */;

--
-- Table structure for table `MyTasks`
--

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 */;

--
-- Table structure for table `MyTasksNew`
--

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 */;

--
-- Table structure for table `MyToDo`
--

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 */;

--
-- Table structure for table `MyToDoAlarms`
--

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 */;

--
-- Table structure for table `News`
--

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 */;

--
-- Table structure for table `NewsAttachments`
--

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 */;

--
-- Table structure for table `NewsComments`
--

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 */;

--
-- Table structure for table `NewsLikes`
--

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 */;

--
-- Table structure for table `NewsRead`
--

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 */;

--
-- Table structure for table `NewsSections`
--

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 */;

--
-- Table structure for table `Notepad`
--

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 */;

--
-- Table structure for table `OAuthLogs`
--

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=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `Occupation`
--

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 */;

--
-- Table structure for table `OneSignalPlayers`
--

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=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `OnlineEvaluationAnswers`
--

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 */;

--
-- Table structure for table `OnlineEvaluationLinks`
--

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 */;

--
-- Table structure for table `OnlineEvaluationQuestions`
--

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 */;

--
-- Table structure for table `OnlineEvaluationTaken`
--

DROP TABLE IF EXISTS `OnlineEvaluationTaken`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `OnlineEvaluationTaken` (
  `EVTID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `ClassID` int(11) NOT NULL,
  `EVID` 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 (`EVTID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ClassID` (`ClassID`),
  KEY `TID` (`EVID`),
  KEY `StudentID` (`StudentID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `OnlineEvaluations`
--

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 */;

--
-- Table structure for table `OnlineTestAnswers`
--

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 */;

--
-- Table structure for table `OnlineTestAssignments`
--

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 */;

--
-- Table structure for table `OnlineTestLinks`
--

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 */;

--
-- Table structure for table `OnlineTestLogs`
--

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 */;

--
-- Table structure for table `OnlineTestQuestions`
--

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 */;

--
-- Table structure for table `OnlineTestTaken`
--

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 */;

--
-- Table structure for table `OnlineTests`
--

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 */;

--
-- Table structure for table `PANMessages`
--

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 */;

--
-- Table structure for table `PANRecipients`
--

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 */;

--
-- Table structure for table `PTConfConfig`
--

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 */;

--
-- Table structure for table `PTConfDates`
--

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 */;

--
-- Table structure for table `PTConfFamilies`
--

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 */;

--
-- Table structure for table `PTConfMeetings`
--

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,
  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 */;

--
-- Table structure for table `PTConfUsers`
--

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 */;

--
-- Table structure for table `ParentEngagement`
--

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 */;

--
-- Table structure for table `ParentNotifyLog`
--

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 */;

--
-- Table structure for table `PartnerContacts`
--

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 */;

--
-- Table structure for table `PartnerDocFolders`
--

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 */;

--
-- Table structure for table `PartnerDocuments`
--

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 */;

--
-- Table structure for table `PartnerEvents`
--

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 */;

--
-- Table structure for table `PartnerForms`
--

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 */;

--
-- Table structure for table `PartnerForum`
--

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 */;

--
-- Table structure for table `PartnerForumBoard`
--

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 */;

--
-- Table structure for table `PartnerForumCount`
--

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 */;

--
-- Table structure for table `PartnerInvites`
--

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 */;

--
-- Table structure for table `PartnerMembers`
--

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 */;

--
-- Table structure for table `PartnerNews`
--

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 */;

--
-- Table structure for table `Partners`
--

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 */;

--
-- Table structure for table `PaymentPlans`
--

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 */;

--
-- Table structure for table `Payroll`
--

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 */;

--
-- Table structure for table `PayrollHistory`
--

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 */;

--
-- Table structure for table `PayrollPayments`
--

DROP TABLE IF EXISTS `PayrollPayments`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PayrollPayments` (
  `VTID` int(11) NOT NULL,
  `SchoolID` mediumint(8) unsigned NOT NULL,
  `PID` int(11) NOT NULL COMMENT 'Payroll ID',
  `ATID` int(11) NOT NULL COMMENT 'Account Transaction ID',
  `PayDate` date NOT NULL,
  `TDate` datetime NOT NULL,
  KEY `VTID` (`VTID`,`PID`),
  KEY `PayDate` (`PayDate`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `PdfForms`
--

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 */;

--
-- Table structure for table `Periods`
--

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 */;

--
-- Table structure for table `PhotoFolders`
--

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 */;

--
-- Table structure for table `Photos`
--

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 */;

--
-- Table structure for table `PollChoices`
--

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 */;

--
-- Table structure for table `PollQuestions`
--

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 */;

--
-- Table structure for table `PollUsers`
--

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 */;

--
-- Table structure for table `PopAccounts`
--

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 */;

--
-- Table structure for table `PopAddresses`
--

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 */;

--
-- Table structure for table `PopStatus`
--

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 */;

--
-- Table structure for table `ProjectContacts`
--

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 */;

--
-- Table structure for table `PushNotifications`
--

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=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `Race`
--

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 */;

--
-- Table structure for table `Relationships`
--

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 */;

--
-- Table structure for table `Religions`
--

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 */;

--
-- Table structure for table `RemittanceIdentifiers`
--

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 */;

--
-- Table structure for table `ReportArchives`
--

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 */;

--
-- Table structure for table `ReportCardPlus`
--

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 */;

--
-- Table structure for table `ReportCardText`
--

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 */;

--
-- Table structure for table `ReportCards`
--

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 */;

--
-- Table structure for table `ReportForms`
--

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 */;

--
-- Table structure for table `ReportJobs`
--

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 */;

--
-- Table structure for table `ReportLogs`
--

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 */;

--
-- Table structure for table `ReportSchools`
--

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 */;

--
-- Table structure for table `ReportTemplateRuns`
--

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 */;

--
-- Table structure for table `ReportTemplates`
--

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 */;

--
-- Table structure for table `ReportTypes`
--

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 */;

--
-- Table structure for table `Reports`
--

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',
  PRIMARY KEY (`ReportID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ReportType` (`ReportType`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `Request`
--

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 */;

--
-- Table structure for table `RequirementLabels`
--

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 */;

--
-- Table structure for table `RequirementSections`
--

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 */;

--
-- Table structure for table `Requirements`
--

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 */;

--
-- Table structure for table `Restores`
--

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',
  PRIMARY KEY (`RestoreID`),
  KEY `SchoolID` (`SchoolID`,`Class`,`PrimaryID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `SafetyAlertTypes`
--

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 */;

--
-- Table structure for table `SafetyAlertUsers`
--

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 */;

--
-- Table structure for table `SafetyAlerts`
--

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 */;

--
-- Table structure for table `SchedulerJobs`
--

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=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `SchedulerServers`
--

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=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `SchoolAlerts`
--

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 */;

--
-- Table structure for table `SchoolBilling`
--

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 */;

--
-- Table structure for table `SchoolBillingTransactions`
--

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 */;

--
-- Table structure for table `SchoolBlocks`
--

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 */;

--
-- Table structure for table `SchoolCleverIntegration`
--

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 */;

--
-- Table structure for table `SchoolConfig`
--

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',
  `Facility` int(11) NOT NULL DEFAULT '0',
  `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',
  `FacilityDirectory` int(11) NOT NULL DEFAULT '0',
  `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',
  `SpiritStore` 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',
  PRIMARY KEY (`CoCID`),
  UNIQUE KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `SchoolDays`
--

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',
  `Date` date NOT NULL DEFAULT '0000-00-00',
  `Quarter` int(11) NOT NULL DEFAULT '0',
  `HalfDays` int(11) NOT NULL DEFAULT '0',
  `Hours` float(10,2) NOT NULL DEFAULT '0.00',
  `CycleDay` int(11) NOT NULL,
  UNIQUE KEY `SchoolDaysID` (`SchoolDaysID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `SchoolYearID` (`SchoolYearID`),
  KEY `Date` (`Date`),
  KEY `Quarter` (`Quarter`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `SchoolDistrictConfig`
--

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 */;

--
-- Table structure for table `SchoolDistrictImport`
--

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 */;

--
-- Table structure for table `SchoolDistrictSchools`
--

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 */;

--
-- Table structure for table `SchoolDistrictStudents`
--

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 */;

--
-- Table structure for table `SchoolDistrictUsers`
--

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 */;

--
-- Table structure for table `SchoolDistricts`
--

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 */;

--
-- Table structure for table `SchoolFamilyChanges`
--

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',
  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 */;

--
-- Table structure for table `SchoolFamilyLogin`
--

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 */;

--
-- Table structure for table `SchoolGpaScale`
--

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 */;

--
-- Table structure for table `SchoolGpaScaleName`
--

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 */;

--
-- Table structure for table `SchoolGrades`
--

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 */;

--
-- Table structure for table `SchoolGradingScaleData`
--

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 */;

--
-- Table structure for table `SchoolGradingScales`
--

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 */;

--
-- Table structure for table `SchoolHomeCfg`
--

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 */;

--
-- Table structure for table `SchoolIntegrations`
--

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 */;

--
-- Table structure for table `SchoolKeys`
--

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 */;

--
-- Table structure for table `SchoolLoginMessage`
--

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 */;

--
-- Table structure for table `SchoolReportConfigs`
--

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=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `SchoolSocialMedia`
--

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 */;

--
-- Table structure for table `SchoolStateClasses`
--

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 */;

--
-- Table structure for table `SchoolStateSchools`
--

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 */;

--
-- Table structure for table `SchoolStateUsers`
--

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 */;

--
-- Table structure for table `SchoolStates`
--

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 */;

--
-- Table structure for table `SchoolStaticIP`
--

DROP TABLE IF EXISTS `SchoolStaticIP`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `SchoolStaticIP` (
  `SSTIP` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `StaticIP` varchar(16) NOT NULL,
  PRIMARY KEY (`SSTIP`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `SchoolSubstitutes`
--

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 */;

--
-- Table structure for table `SchoolTypes`
--

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 */;

--
-- Table structure for table `SchoolYearConfig`
--

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 */;

--
-- Table structure for table `SchoolYearFamilies`
--

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`),
  KEY `SchoolID` (`SchoolID`),
  KEY `SchoolYearID` (`SchoolYearID`),
  KEY `FamilyID` (`FamilyID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `SchoolYearSessions`
--

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 */;

--
-- Table structure for table `SchoolYearStudents`
--

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 NOT NULL 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 */;

--
-- Table structure for table `SchoolYears`
--

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',
  PRIMARY KEY (`SchoolYearID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `Schools`
--

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` char(2) NOT NULL DEFAULT '',
  `ZIP` varchar(10) NOT NULL DEFAULT '',
  `Country` varchar(32) NOT 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(16) NOT NULL DEFAULT '',
  `DistrictCode` varchar(16) NOT NULL DEFAULT '',
  `FederalCode` int(32) NOT 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',
  `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` text 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(16) NOT 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,
  PRIMARY KEY (`SchoolID`),
  KEY `Active` (`Active`),
  KEY `SupportID` (`SupportID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ScripCategory`
--

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 */;

--
-- Table structure for table `ServiceFamilyLogs`
--

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',
  `LogDateTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `AuthorID` int(11) NOT NULL 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 NOT NULL,
  `Approved` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`SLID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `AuthorID` (`AuthorID`),
  KEY `FamilyID` (`FamilyID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ServiceOpGroups`
--

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) NOT NULL DEFAULT '',
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `Sequence` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`SOGID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ServiceOps`
--

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 NOT NULL,
  PRIMARY KEY (`SOID`),
  KEY `MealID` (`SOID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ServiceRequirements`
--

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) NOT NULL,
  `FamilyHours` int(11) NOT NULL,
  PRIMARY KEY (`SRID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ServiceStudentHist`
--

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 */;

--
-- Table structure for table `ServiceStudentLogs`
--

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',
  `LogDateTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `AuthorID` int(11) NOT NULL 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 NOT NULL,
  `Approved` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`SLID`),
  KEY `SDID` (`SLID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `StudentID` (`StudentID`),
  KEY `DateTime` (`LogDateTime`),
  KEY `AuthorID` (`AuthorID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `Sessions`
--

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 */;

--
-- Table structure for table `SessionsData`
--

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 */;

--
-- Table structure for table `ShoutBox`
--

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 */;

--
-- Table structure for table `ShoutBoxLikes`
--

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 */;

--
-- Table structure for table `ShoutBoxTags`
--

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 */;

--
-- Table structure for table `ShoutBoxTypes`
--

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 */;

--
-- Table structure for table `SiteMessages`
--

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 */;

--
-- Table structure for table `SmartModules`
--

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 */;

--
-- Table structure for table `SmartReports`
--

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 */;

--
-- Table structure for table `SocialMediaSites`
--

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 */;

--
-- Table structure for table `SparkPostConfigs`
--

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=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `SpiritStoreItems`
--

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 */;

--
-- Table structure for table `SpiritStoreOrders`
--

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 */;

--
-- Table structure for table `SpiritStores`
--

DROP TABLE IF EXISTS `SpiritStores`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `SpiritStores` (
  `SSID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `StoreID` int(11) NOT NULL,
  `UpdateDT` datetime NOT NULL,
  PRIMARY KEY (`SSID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `StoreID` (`StoreID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `SportScores`
--

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 */;

--
-- Table structure for table `SportTeams`
--

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 */;

--
-- Table structure for table `Sports`
--

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 */;

--
-- Table structure for table `StandardEntries`
--

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 */;

--
-- Table structure for table `StandardSchools`
--

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 */;

--
-- Table structure for table `StandardTopics`
--

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 */;

--
-- Table structure for table `StandardizedTestAttempts`
--

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 */;

--
-- Table structure for table `StandardizedTestSubjects`
--

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 */;

--
-- Table structure for table `StandardizedTestValues`
--

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 */;

--
-- Table structure for table `StandardizedTests`
--

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 */;

--
-- Table structure for table `Standards`
--

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 */;

--
-- Table structure for table `StudentActivities`
--

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 */;

--
-- Table structure for table `StudentActivityStudents`
--

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 */;

--
-- Table structure for table `StudentAssessmentCfg`
--

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 */;

--
-- Table structure for table `StudentAssessmentValues`
--

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 */;

--
-- Table structure for table `StudentAssessmentView`
--

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 */;

--
-- Table structure for table `StudentAssignmentFolders`
--

DROP TABLE IF EXISTS `StudentAssignmentFolders`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentAssignmentFolders` (
  `SAFID` 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',
  `Name` varchar(32) NOT NULL DEFAULT '',
  `DateTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Comments` tinytext NOT NULL,
  `ParentFolderID` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`SAFID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `UserID` (`UserID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `StudentAssignmentLinks`
--

DROP TABLE IF EXISTS `StudentAssignmentLinks`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentAssignmentLinks` (
  `SALID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `StudentID` int(11) NOT NULL,
  `UserID` int(11) NOT NULL,
  `MyDocumentID` int(11) NOT NULL,
  `ClassID` int(11) NOT NULL,
  PRIMARY KEY (`SALID`),
  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 */;

--
-- Table structure for table `StudentAssignments`
--

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 */;

--
-- Table structure for table `StudentCategories`
--

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 */;

--
-- Table structure for table `StudentCategoryGroups`
--

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 */;

--
-- Table structure for table `StudentCategoryStudents`
--

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 */;

--
-- Table structure for table `StudentCheckList`
--

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 */;

--
-- Table structure for table `StudentCheckListChecks`
--

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 */;

--
-- Table structure for table `StudentConnectionIssues`
--

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 */;

--
-- Table structure for table `StudentConnectionLocations`
--

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 */;

--
-- Table structure for table `StudentConnectionResponses`
--

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 */;

--
-- Table structure for table `StudentConnectionRoles`
--

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 */;

--
-- Table structure for table `StudentConnections`
--

DROP TABLE IF EXISTS `StudentConnections`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentConnections` (
  `SCID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `SYID` int(11) NOT NULL,
  `StudentID` int(11) NOT NULL,
  `UserID` int(11) NOT NULL,
  `SCRID` varchar(16) NOT NULL,
  `CxnMedium` varchar(16) NOT NULL,
  `Date` datetime NOT NULL,
  `SCLID` int(11) NOT NULL,
  `Outcome` varchar(8) NOT NULL,
  `SCIID` int(11) NOT NULL,
  `SCRspID` int(11) NOT NULL,
  `Note` text NOT NULL,
  `Pending` tinyint(4) NOT NULL,
  PRIMARY KEY (`SCID`),
  KEY `StudentID` (`StudentID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `UserID` (`UserID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `StudentContacts`
--

DROP TABLE IF EXISTS `StudentContacts`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentContacts` (
  `SCID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `StudentID` int(11) NOT NULL DEFAULT '0',
  `ContactID` int(11) NOT NULL DEFAULT '0',
  `CreateDate` date NOT NULL DEFAULT '0000-00-00',
  PRIMARY KEY (`SCID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `StudentCountry`
--

DROP TABLE IF EXISTS `StudentCountry`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentCountry` (
  `SCID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `StudentID` int(11) NOT NULL,
  `SCOID` int(11) NOT NULL,
  PRIMARY KEY (`SCID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `StudentID` (`StudentID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `StudentCountryOrigin`
--

DROP TABLE IF EXISTS `StudentCountryOrigin`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentCountryOrigin` (
  `SCOID` int(11) NOT NULL AUTO_INCREMENT,
  `Name` varchar(32) NOT NULL,
  `Code1` varchar(12) NOT NULL COMMENT 'Indiana',
  PRIMARY KEY (`SCOID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Student Country of Origin ';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `StudentDetails`
--

DROP TABLE IF EXISTS `StudentDetails`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentDetails` (
  `SDID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `StudentID` int(11) NOT NULL DEFAULT '0',
  `Updated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `AuthorID` int(11) NOT NULL DEFAULT '0',
  `ForeignExchange` int(11) NOT NULL DEFAULT '0',
  `Honors` int(11) NOT NULL DEFAULT '0',
  `Gifted` int(11) NOT NULL DEFAULT '0',
  `GiftedParticipation` int(11) NOT NULL DEFAULT '0',
  `WardOfState` int(11) NOT NULL DEFAULT '0',
  `SpecialEducation` int(11) NOT NULL DEFAULT '0',
  `Challange` int(11) NOT NULL DEFAULT '0',
  `Immigrant` int(11) NOT NULL DEFAULT '0',
  `Migrant` int(11) NOT NULL DEFAULT '0',
  `ImmigrantStatus` int(11) NOT NULL DEFAULT '0',
  `EnteredUS` date NOT NULL,
  `Plan504` int(11) NOT NULL DEFAULT '0',
  `SingleParent` int(11) NOT NULL DEFAULT '0',
  `NonPublic` int(11) NOT NULL DEFAULT '2',
  `FoodProgram` int(11) NOT NULL DEFAULT '0',
  `EconomicDisadvantaged` int(11) NOT NULL,
  `EnglishProficiency` int(11) NOT NULL DEFAULT '0',
  `LEPEligible` int(11) NOT NULL DEFAULT '0',
  `LEPParticipation` int(11) NOT NULL DEFAULT '0',
  `LEPDuration` int(11) NOT NULL DEFAULT '6',
  `ResidenceStatus` int(11) NOT NULL DEFAULT '0',
  `NCEARace` int(11) NOT NULL DEFAULT '0',
  `Catholic` int(11) NOT NULL DEFAULT '0',
  `NCEARaceAutoupd` int(11) NOT NULL DEFAULT '0',
  `EdFiID` varchar(32) NOT NULL COMMENT 'Resource ID for Ed-Fi API',
  `EdFiDiplomaID` varchar(32) NOT NULL,
  PRIMARY KEY (`SDID`),
  UNIQUE KEY `StudentID` (`StudentID`),
  KEY `Search` (`SchoolID`,`StudentID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `StudentDiscipline`
--

DROP TABLE IF EXISTS `StudentDiscipline`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentDiscipline` (
  `SDID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `StudentID` int(11) NOT NULL DEFAULT '0',
  `DateTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `AuthorID` int(11) NOT NULL DEFAULT '0',
  `Description` varchar(128) NOT NULL DEFAULT '',
  PRIMARY KEY (`SDID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `StudentID` (`StudentID`),
  KEY `DateTime` (`DateTime`),
  KEY `AuthorID` (`AuthorID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `StudentDisciplineLogs`
--

DROP TABLE IF EXISTS `StudentDisciplineLogs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentDisciplineLogs` (
  `SDLID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `StudentID` int(11) NOT NULL DEFAULT '0',
  `ClassID` int(11) NOT NULL DEFAULT '0',
  `VictimID` int(11) NOT NULL,
  `LogDateTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Quarter` int(11) NOT NULL DEFAULT '0',
  `AuthorID` int(11) NOT NULL DEFAULT '0',
  `DVID` int(11) NOT NULL DEFAULT '0',
  `Points` float NOT NULL DEFAULT '0',
  `Description` text NOT NULL,
  `Resolution` text NOT NULL,
  `ManagerNotified` int(11) NOT NULL DEFAULT '0',
  `FamilyNotified` int(11) NOT NULL DEFAULT '0',
  `StudentNotified` int(11) NOT NULL DEFAULT '0',
  `Created` int(11) NOT NULL,
  `DDID` int(11) NOT NULL,
  PRIMARY KEY (`SDLID`),
  KEY `SDID` (`SDLID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `StudentID` (`StudentID`),
  KEY `DateTime` (`LogDateTime`),
  KEY `AuthorID` (`AuthorID`),
  KEY `ClassID` (`ClassID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `StudentDocuments`
--

DROP TABLE IF EXISTS `StudentDocuments`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentDocuments` (
  `StudentDocID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `SchoolYearID` int(11) NOT NULL DEFAULT '0',
  `StudentID` int(11) NOT NULL DEFAULT '0',
  `Name` varchar(64) NOT NULL DEFAULT '',
  `Date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Code` varchar(12) NOT NULL DEFAULT '',
  `Type` varchar(32) NOT NULL DEFAULT '',
  `FileName` varchar(64) NOT NULL DEFAULT '',
  `Size` int(11) NOT NULL DEFAULT '0',
  `SigRequired` int(11) NOT NULL DEFAULT '0',
  `DSIGID` int(11) NOT NULL DEFAULT '0',
  `Uploaded` tinyint(1) NOT NULL,
  PRIMARY KEY (`StudentDocID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `StudentID` (`StudentID`),
  KEY `Date` (`Date`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `StudentEnroll`
--

DROP TABLE IF EXISTS `StudentEnroll`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentEnroll` (
  `StudentEnrollID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `FamilyID` int(11) NOT NULL DEFAULT '0',
  `StudentID` int(11) NOT NULL DEFAULT '0',
  `Tscripts` int(11) NOT NULL DEFAULT '0',
  `TscriptsDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `TscriptsID` int(11) NOT NULL DEFAULT '0',
  `TscriptsTxt` varchar(32) NOT NULL DEFAULT '',
  `Shots` int(11) NOT NULL DEFAULT '0',
  `ShotsDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `ShotsID` int(11) NOT NULL DEFAULT '0',
  `ShotsTxt` varchar(32) NOT NULL DEFAULT '',
  `Salvation` int(11) NOT NULL DEFAULT '0',
  `SalvationDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `SalvationID` int(11) NOT NULL DEFAULT '0',
  `SalvationTxt` varchar(32) NOT NULL DEFAULT '',
  `Tylenol` int(11) NOT NULL DEFAULT '0',
  `TylenolDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `TylenolID` int(11) NOT NULL DEFAULT '0',
  `TylenolTxt` varchar(32) NOT NULL DEFAULT '',
  `Standard` int(11) NOT NULL DEFAULT '0',
  `StandardDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `StandardID` int(11) NOT NULL DEFAULT '0',
  `StandardTxt` varchar(32) NOT NULL DEFAULT '',
  PRIMARY KEY (`StudentEnrollID`),
  UNIQUE KEY `StudentEnrollID` (`StudentEnrollID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `FamilyID` (`FamilyID`),
  KEY `StudentID` (`StudentID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `StudentEnrollmentHistory`
--

DROP TABLE IF EXISTS `StudentEnrollmentHistory`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentEnrollmentHistory` (
  `SEHID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `StudentID` int(11) NOT NULL DEFAULT '0',
  `SchoolYearID` int(11) NOT NULL DEFAULT '0',
  `Grade` int(11) NOT NULL DEFAULT '99',
  `Date` date NOT NULL DEFAULT '0000-00-00',
  `Code` int(11) NOT NULL DEFAULT '0',
  `Notes` varchar(64) NOT NULL DEFAULT '',
  `AuthorID` int(11) NOT NULL DEFAULT '0',
  `Updated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `EdFiID` varchar(32) NOT NULL DEFAULT '',
  `EdFiExtID` varchar(32) NOT NULL COMMENT 'Extension ID',
  PRIMARY KEY (`SEHID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `StudentID` (`StudentID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `StudentGoals`
--

DROP TABLE IF EXISTS `StudentGoals`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentGoals` (
  `SGID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `ClassID` int(11) NOT NULL,
  `AuthorID` int(11) NOT NULL,
  `StudentID` int(11) NOT NULL,
  `GoalType` tinyint(3) unsigned NOT NULL,
  `GoalDate` date NOT NULL,
  `Complete` tinyint(3) unsigned NOT NULL DEFAULT '0',
  `CompleteDate` date NOT NULL,
  `Note` varchar(256) NOT NULL,
  PRIMARY KEY (`SGID`),
  KEY `SchoolID` (`SchoolID`,`AuthorID`,`StudentID`),
  KEY `ClassID` (`ClassID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `StudentGrades`
--

DROP TABLE IF EXISTS `StudentGrades`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentGrades` (
  `GradeID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `SchoolYearID` int(11) NOT NULL DEFAULT '0',
  `ClassID` int(11) NOT NULL DEFAULT '0',
  `SubjectID` int(11) NOT NULL DEFAULT '0',
  `StudentID` int(11) NOT NULL DEFAULT '0',
  `Quarter` int(11) NOT NULL DEFAULT '0',
  `Number` char(3) NOT NULL DEFAULT '0',
  `Comments` text NOT NULL,
  `AuthorID` int(11) NOT NULL DEFAULT '0',
  `Updated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  PRIMARY KEY (`GradeID`),
  UNIQUE KEY `ElemGradeID` (`GradeID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `SchoolYearID` (`SchoolYearID`),
  KEY `ClassID` (`ClassID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `StudentHabitGroups`
--

DROP TABLE IF EXISTS `StudentHabitGroups`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentHabitGroups` (
  `SHGID` int(11) NOT NULL AUTO_INCREMENT,
  `Name` varchar(64) NOT NULL,
  `Description` varchar(64) NOT NULL DEFAULT '',
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `DepartmentID` int(11) NOT NULL,
  `Sequence` int(11) NOT NULL DEFAULT '0',
  `Page` int(11) NOT NULL DEFAULT '1',
  `Side` int(11) NOT NULL DEFAULT '0',
  `ReportCardBlock` tinyint(2) NOT NULL DEFAULT '0',
  PRIMARY KEY (`SHGID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `Page` (`Page`),
  KEY `Side` (`Side`),
  KEY `Sequence` (`Sequence`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `StudentHabitScores`
--

DROP TABLE IF EXISTS `StudentHabitScores`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentHabitScores` (
  `SHSID` int(11) NOT NULL AUTO_INCREMENT,
  `KeyID` int(11) NOT NULL,
  `Name` varchar(128) NOT NULL DEFAULT '',
  `Value` varchar(7) NOT NULL DEFAULT '',
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `Sequence` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`SHSID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `StudentHabitValues`
--

DROP TABLE IF EXISTS `StudentHabitValues`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentHabitValues` (
  `SHVID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `StudentID` int(11) NOT NULL DEFAULT '0',
  `SHID` int(11) NOT NULL DEFAULT '0',
  `Q1` varchar(6) NOT NULL,
  `Q2` varchar(6) NOT NULL,
  `Q3` varchar(6) NOT NULL,
  `Q4` varchar(6) NOT NULL,
  `Q5` varchar(6) NOT NULL,
  `Q6` varchar(6) NOT NULL,
  `Q7` varchar(6) NOT NULL,
  `Q8` varchar(6) NOT NULL,
  `Q9` varchar(6) NOT NULL,
  `Q10` varchar(6) NOT NULL,
  `Q11` varchar(6) NOT NULL,
  `Q12` varchar(6) NOT NULL,
  `Final` varchar(6) NOT NULL,
  PRIMARY KEY (`SHVID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `FamilyID` (`StudentID`),
  KEY `SHID` (`SHID`),
  KEY `Q2` (`Q2`),
  KEY `Q1` (`Q1`),
  KEY `Q3` (`Q3`),
  KEY `Q4` (`Q4`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `StudentHabits`
--

DROP TABLE IF EXISTS `StudentHabits`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentHabits` (
  `SHID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `DepartmentID` int(11) NOT NULL,
  `Name` varchar(128) NOT NULL DEFAULT '',
  `Grade` int(11) NOT NULL DEFAULT '0',
  `SHGID` int(11) NOT NULL DEFAULT '0',
  `Sequence` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`SHID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `CCGID` (`SHGID`),
  KEY `Sequence` (`Sequence`),
  KEY `Grade` (`Grade`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `StudentIEP`
--

DROP TABLE IF EXISTS `StudentIEP`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentIEP` (
  `SIEPID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `StudentID` int(11) NOT NULL,
  `AdvisorID` int(11) NOT NULL,
  `StartDate` date NOT NULL,
  `StopDate` date NOT NULL,
  `Label` varchar(48) NOT NULL,
  `Comments` varchar(254) NOT NULL,
  `Current` int(11) NOT NULL,
  `AuthorID` int(11) NOT NULL,
  `UpdateDT` datetime NOT NULL,
  PRIMARY KEY (`SIEPID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `StudentID` (`StudentID`),
  KEY `Current` (`Current`),
  KEY `StaffID` (`AdvisorID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `StudentIEPAdvisors`
--

DROP TABLE IF EXISTS `StudentIEPAdvisors`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentIEPAdvisors` (
  `SIEPAID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `UserID` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`SIEPAID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `StudentIEPConfig`
--

DROP TABLE IF EXISTS `StudentIEPConfig`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentIEPConfig` (
  `SIEPCID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `Header` varchar(255) NOT NULL,
  `Footer` varchar(255) NOT NULL,
  PRIMARY KEY (`SIEPCID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `StudentIEPEvals`
--

DROP TABLE IF EXISTS `StudentIEPEvals`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentIEPEvals` (
  `SIEPTID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `StudentID` int(11) NOT NULL,
  `SIEPID` int(11) NOT NULL,
  `SIEPGID` int(11) NOT NULL,
  `SIEPOID` int(11) NOT NULL,
  `Quarter` int(11) NOT NULL,
  `Comments` text NOT NULL,
  `NumberGrade` decimal(10,2) NOT NULL,
  `LetterGrade` varchar(6) NOT NULL,
  `AuthorID` int(11) NOT NULL,
  `EnteredDT` datetime NOT NULL,
  PRIMARY KEY (`SIEPTID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `StudentID` (`StudentID`),
  KEY `SIEPID` (`SIEPID`),
  KEY `SIEPGID` (`SIEPGID`),
  KEY `SIEPOID` (`SIEPOID`),
  KEY `Quarter` (`Quarter`),
  KEY `Quarter_2` (`Quarter`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `StudentIEPGoals`
--

DROP TABLE IF EXISTS `StudentIEPGoals`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentIEPGoals` (
  `SIEPGID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `StudentID` int(11) NOT NULL,
  `SIEPID` int(11) NOT NULL,
  `Sequence` varchar(8) NOT NULL,
  `Label` varchar(128) NOT NULL,
  `Goal` text NOT NULL,
  `AuthorID` int(11) NOT NULL,
  `UpdateDT` datetime NOT NULL,
  PRIMARY KEY (`SIEPGID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `StudentIEPObjectives`
--

DROP TABLE IF EXISTS `StudentIEPObjectives`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentIEPObjectives` (
  `SIEPOID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `StudentID` int(11) NOT NULL,
  `SIEPID` int(11) NOT NULL,
  `SIEPGID` int(11) NOT NULL,
  `Sequence` int(11) NOT NULL,
  `Label` varchar(128) NOT NULL,
  `Objective` text NOT NULL,
  `AuthorID` int(11) NOT NULL,
  `UpdateDT` datetime NOT NULL,
  PRIMARY KEY (`SIEPOID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `StudentIEPStudents`
--

DROP TABLE IF EXISTS `StudentIEPStudents`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentIEPStudents` (
  `SIEPID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `StudentID` int(11) NOT NULL,
  `AuthorID` int(11) NOT NULL,
  `UpdateDT` datetime NOT NULL,
  PRIMARY KEY (`SIEPID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `StudentID` (`StudentID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `StudentIEPTrials`
--

DROP TABLE IF EXISTS `StudentIEPTrials`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentIEPTrials` (
  `SIEPTID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `StudentID` int(11) NOT NULL,
  `SIEPID` int(11) NOT NULL,
  `SIEPGID` int(11) NOT NULL,
  `SIEPOID` int(11) NOT NULL,
  `Quarter` int(11) NOT NULL,
  `TrialDT` datetime NOT NULL,
  `Points` int(11) NOT NULL,
  `OutOf` int(11) NOT NULL,
  `Comments` varchar(64) NOT NULL,
  `AuthorID` int(11) NOT NULL,
  `EnteredDT` datetime NOT NULL,
  PRIMARY KEY (`SIEPTID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `StudentID` (`StudentID`),
  KEY `SIEPID` (`SIEPID`),
  KEY `SIEPGID` (`SIEPGID`),
  KEY `SIEPOID` (`SIEPOID`),
  KEY `Quarter` (`Quarter`),
  KEY `Quarter_2` (`Quarter`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `StudentLanguages`
--

DROP TABLE IF EXISTS `StudentLanguages`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentLanguages` (
  `SLID` int(11) NOT NULL AUTO_INCREMENT,
  `Name` varchar(32) NOT NULL,
  `Code0` varchar(12) NOT NULL COMMENT 'Default',
  `Code1` varchar(12) NOT NULL COMMENT 'Indiana',
  `Code2` varchar(12) NOT NULL COMMENT 'Nebraska',
  `Code3` varchar(12) NOT NULL COMMENT 'New Jersey',
  `Code4` varchar(12) NOT NULL COMMENT 'California',
  `Code5` varchar(12) NOT NULL COMMENT 'Iowa',
  `Code6` varchar(12) NOT NULL COMMENT 'Michigan',
  `Code7` varchar(12) NOT NULL COMMENT 'New York',
  `Code8` varchar(12) NOT NULL COMMENT 'Pennsylvania',
  `Code9` varchar(12) NOT NULL COMMENT 'Colorado',
  `Code10` varchar(12) NOT NULL COMMENT 'Kansas',
  `Code11` varchar(12) NOT NULL COMMENT 'Illinois',
  `Code12` varchar(12) NOT NULL COMMENT 'Florida',
  `Code14` varchar(12) NOT NULL COMMENT 'New Mexico',
  PRIMARY KEY (`SLID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Student Country of Origin ';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `StudentMed`
--

DROP TABLE IF EXISTS `StudentMed`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentMed` (
  `StudentMedID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `StudentID` int(11) NOT NULL DEFAULT '0',
  `UpdateDT` datetime NOT NULL,
  `Asthma` int(11) NOT NULL DEFAULT '0',
  `Diabetes` int(11) NOT NULL DEFAULT '0',
  `Seizures` int(11) NOT NULL DEFAULT '0',
  `Hearing` int(11) NOT NULL DEFAULT '0',
  `Sight` int(11) NOT NULL DEFAULT '0',
  `Allergies` varchar(256) NOT NULL DEFAULT '',
  `Others` text NOT NULL,
  `Tylenol` int(11) NOT NULL DEFAULT '0',
  `Ibuprofen` int(11) NOT NULL DEFAULT '0',
  `Comments` text NOT NULL,
  `AlertComments` text NOT NULL,
  `Medication` varchar(64) NOT NULL DEFAULT '',
  `Heart` int(11) NOT NULL DEFAULT '0',
  `AddAdhd` int(11) NOT NULL DEFAULT '0',
  `Bladder` int(11) NOT NULL DEFAULT '0',
  `Sicklecell` int(11) NOT NULL DEFAULT '0',
  `Hemophiliac` int(11) NOT NULL DEFAULT '0',
  `Exempt` int(11) NOT NULL DEFAULT '0',
  `Healthy` int(11) NOT NULL,
  PRIMARY KEY (`StudentMedID`),
  UNIQUE KEY `StudentID` (`StudentID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `StudentMedicalComplaints`
--

DROP TABLE IF EXISTS `StudentMedicalComplaints`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentMedicalComplaints` (
  `SMCID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `Sequence` int(11) NOT NULL DEFAULT '0',
  `Code` varchar(5) NOT NULL DEFAULT '',
  `Name` varchar(64) NOT NULL DEFAULT '',
  PRIMARY KEY (`SMCID`),
  KEY `CompanyID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `StudentMedicalLogs`
--

DROP TABLE IF EXISTS `StudentMedicalLogs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentMedicalLogs` (
  `SMLID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `StudentID` int(11) NOT NULL DEFAULT '0',
  `LogDateTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `AuthorID` int(11) NOT NULL DEFAULT '0',
  `SMCID` int(11) NOT NULL,
  `Complaint` text NOT NULL,
  `Treatment` text NOT NULL,
  `FamilyNotified` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`SMLID`),
  KEY `SDID` (`SMLID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `StudentID` (`StudentID`),
  KEY `DateTime` (`LogDateTime`),
  KEY `AuthorID` (`AuthorID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `StudentMedicalScreening`
--

DROP TABLE IF EXISTS `StudentMedicalScreening`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentMedicalScreening` (
  `SMSID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `SchoolYearID` int(11) NOT NULL,
  `StudentID` int(11) NOT NULL,
  `Updated` date NOT NULL,
  `Height` decimal(10,2) NOT NULL,
  `Weight` int(11) NOT NULL,
  `Hearing` date NOT NULL,
  `HearingPass` int(11) NOT NULL,
  `Sight` date NOT NULL,
  `SightPass` int(11) NOT NULL,
  `Age` int(11) NOT NULL,
  `Grade` int(11) NOT NULL,
  PRIMARY KEY (`SMSID`),
  KEY `SchoolID` (`SchoolID`,`StudentID`),
  KEY `Age` (`Age`),
  KEY `Grade` (`Grade`),
  KEY `StudentID` (`StudentID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `StudentMedicationData`
--

DROP TABLE IF EXISTS `StudentMedicationData`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentMedicationData` (
  `StudentMedID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `StudentID` int(11) NOT NULL DEFAULT '0',
  `Notes` text NOT NULL,
  `MEDID` int(11) NOT NULL,
  PRIMARY KEY (`StudentMedID`),
  KEY `StudentMedID` (`StudentMedID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `StudentID` (`StudentID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `StudentMedicationGiven`
--

DROP TABLE IF EXISTS `StudentMedicationGiven`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentMedicationGiven` (
  `GivenID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `StudentID` int(11) NOT NULL DEFAULT '0',
  `SMSCHID` int(11) NOT NULL,
  `DateGiven` date NOT NULL,
  `TimeGiven` time NOT NULL,
  `DateUpdated` datetime NOT NULL,
  PRIMARY KEY (`GivenID`),
  KEY `StudentMedID` (`GivenID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `StudentID` (`StudentID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `StudentMedicationSched`
--

DROP TABLE IF EXISTS `StudentMedicationSched`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentMedicationSched` (
  `SMSCHID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `StudentID` int(11) NOT NULL DEFAULT '0',
  `Medication` varchar(64) NOT NULL,
  `Notes` text NOT NULL,
  `Dose` varchar(32) NOT NULL,
  `Route` varchar(64) NOT NULL,
  `SelfAdm` int(11) NOT NULL DEFAULT '0',
  `StartDate` date NOT NULL,
  `StopDate` date NOT NULL,
  `DailySchedule` varchar(128) NOT NULL,
  PRIMARY KEY (`SMSCHID`),
  KEY `StudentMedID` (`SMSCHID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `StudentID` (`StudentID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `StudentMedications`
--

DROP TABLE IF EXISTS `StudentMedications`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentMedications` (
  `MEDID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `Sequence` int(11) NOT NULL DEFAULT '0',
  `Name` varchar(64) NOT NULL DEFAULT '',
  `Description` varchar(128) NOT NULL,
  PRIMARY KEY (`MEDID`),
  KEY `CompanyID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `StudentNarratives`
--

DROP TABLE IF EXISTS `StudentNarratives`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentNarratives` (
  `SNID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `ClassID` int(11) NOT NULL,
  `Quarter` int(11) NOT NULL,
  `StudentID` int(11) NOT NULL,
  `Comments` text NOT NULL,
  PRIMARY KEY (`SNID`),
  UNIQUE KEY `SchoolID_2` (`SchoolID`,`ClassID`,`StudentID`,`Quarter`),
  KEY `ClassID` (`ClassID`),
  KEY `StudentID` (`StudentID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `StudentNotes`
--

DROP TABLE IF EXISTS `StudentNotes`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentNotes` (
  `StudentNotesID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `FamilyID` int(11) NOT NULL DEFAULT '0',
  `StudentID` int(11) NOT NULL DEFAULT '0',
  `Date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `UpdateDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `AuthorID` int(11) NOT NULL DEFAULT '0',
  `Private` int(11) NOT NULL DEFAULT '0',
  `UpdateAuthorID` int(11) NOT NULL DEFAULT '0',
  `Comments` text NOT NULL,
  `Subject` varchar(32) NOT NULL DEFAULT '',
  `Exposure` int(11) NOT NULL DEFAULT '0',
  `Flagged` int(11) NOT NULL DEFAULT '0',
  `Expire` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  PRIMARY KEY (`StudentNotesID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `FamilyID` (`FamilyID`),
  KEY `StudentID` (`StudentID`),
  KEY `Date` (`Date`),
  KEY `Flagged` (`Flagged`),
  KEY `Expire` (`Expire`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `StudentRace`
--

DROP TABLE IF EXISTS `StudentRace`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentRace` (
  `SRID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `StudentID` int(11) NOT NULL,
  `RaceID` int(11) NOT NULL,
  PRIMARY KEY (`SRID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `StudentID` (`StudentID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `StudentRaces`
--

DROP TABLE IF EXISTS `StudentRaces`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentRaces` (
  `SRID` int(11) NOT NULL AUTO_INCREMENT,
  `Name` varchar(32) NOT NULL,
  `USA` int(11) NOT NULL,
  `Code0` varchar(12) NOT NULL,
  `Code1` varchar(12) NOT NULL COMMENT 'Indiana',
  `Code2` varchar(12) NOT NULL COMMENT 'Nebraska',
  `Code3` varchar(12) NOT NULL COMMENT 'New Jersey',
  `Code4` varchar(12) NOT NULL COMMENT 'California',
  `Code5` varchar(12) NOT NULL COMMENT 'Iowa',
  `Code6` varchar(12) NOT NULL COMMENT 'Michigan',
  `Code7` varchar(12) NOT NULL COMMENT 'New York',
  `Code8` varchar(12) NOT NULL COMMENT 'Pennslyvania',
  `Code9` varchar(12) NOT NULL COMMENT 'Colorado',
  `Code10` varchar(12) NOT NULL COMMENT 'Kansas',
  `Code11` varchar(12) NOT NULL COMMENT 'Illinois',
  `Code12` varchar(12) NOT NULL COMMENT 'Florida',
  `Code13` varchar(12) NOT NULL COMMENT 'Wisconsin',
  `Code14` varchar(12) NOT NULL COMMENT 'New Mexico',
  PRIMARY KEY (`SRID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Student Country of Origin ';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `StudentRanking`
--

DROP TABLE IF EXISTS `StudentRanking`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentRanking` (
  `SRID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `StudentID` int(11) NOT NULL DEFAULT '0',
  `Ranking` varchar(10) NOT NULL DEFAULT '',
  `Date` date NOT NULL DEFAULT '0000-00-00',
  PRIMARY KEY (`SRID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `StudentRawAvgs`
--

DROP TABLE IF EXISTS `StudentRawAvgs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentRawAvgs` (
  `SRAID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `StudentID` int(11) NOT NULL,
  `Updated` date NOT NULL,
  `RawAvg` int(11) NOT NULL,
  PRIMARY KEY (`SRAID`),
  KEY `StudentID` (`StudentID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `StudentRequirements`
--

DROP TABLE IF EXISTS `StudentRequirements`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentRequirements` (
  `SRID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `StudentID` int(11) NOT NULL,
  `RLID` int(11) NOT NULL,
  PRIMARY KEY (`SRID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `StudentID` (`StudentID`),
  KEY `RLID` (`RLID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Student Requirement Label ID mapping';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `StudentSchedule`
--

DROP TABLE IF EXISTS `StudentSchedule`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentSchedule` (
  `SSID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `StudentID` int(11) NOT NULL,
  `Day1` int(11) NOT NULL,
  `Day1Start` time NOT NULL,
  `Day1Stop` time NOT NULL,
  `Day2` int(11) NOT NULL,
  `Day2Start` time NOT NULL,
  `Day2Stop` time NOT NULL,
  `Day3` int(11) NOT NULL,
  `Day3Start` time NOT NULL,
  `Day3Stop` time NOT NULL,
  `Day4` int(11) NOT NULL,
  `Day4Start` time NOT NULL,
  `Day4Stop` time NOT NULL,
  `Day5` int(11) NOT NULL,
  `Day5Start` time NOT NULL,
  `Day5Stop` time NOT NULL,
  `Day6` int(11) NOT NULL,
  `Day6Start` time NOT NULL,
  `Day6Stop` time NOT NULL,
  `Day7` int(11) NOT NULL,
  `Day7Start` time NOT NULL,
  `Day7Stop` time NOT NULL,
  PRIMARY KEY (`SSID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `StudentID` (`StudentID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `StudentScores`
--

DROP TABLE IF EXISTS `StudentScores`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentScores` (
  `SSID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `StudentID` int(11) NOT NULL,
  `Grade` int(11) NOT NULL,
  `SubjectID` int(11) NOT NULL,
  `Score` int(11) NOT NULL,
  PRIMARY KEY (`SSID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `StudentStatisticChoices`
--

DROP TABLE IF EXISTS `StudentStatisticChoices`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentStatisticChoices` (
  `SSCID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `SSID` int(11) NOT NULL,
  `Sequence` int(11) NOT NULL,
  `Value` varchar(16) NOT NULL,
  `Label` varchar(72) NOT NULL,
  PRIMARY KEY (`SSCID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `SSID` (`SSID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `StudentStatisticGroups`
--

DROP TABLE IF EXISTS `StudentStatisticGroups`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentStatisticGroups` (
  `SSGID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `Name` varchar(16) NOT NULL DEFAULT '',
  `Description` varchar(64) NOT NULL DEFAULT '',
  `Sequence` int(11) NOT NULL DEFAULT '0',
  `RPBlock` tinyint(2) NOT NULL DEFAULT '0',
  PRIMARY KEY (`SSGID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `StudentStatisticValues`
--

DROP TABLE IF EXISTS `StudentStatisticValues`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentStatisticValues` (
  `SSVID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `StudentID` int(11) NOT NULL DEFAULT '0',
  `SSID` int(11) NOT NULL DEFAULT '0',
  `RPID` int(11) NOT NULL DEFAULT '0',
  `Value` varchar(255) NOT NULL DEFAULT '',
  `ValueDate` date NOT NULL,
  PRIMARY KEY (`SSVID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `StudentID` (`StudentID`),
  KEY `SSID` (`SSID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `StudentStatistics`
--

DROP TABLE IF EXISTS `StudentStatistics`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentStatistics` (
  `SSID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `SSGID` int(11) NOT NULL,
  `Sequence` int(11) NOT NULL DEFAULT '0',
  `Type` int(11) NOT NULL DEFAULT '1',
  `Name` varchar(32) NOT NULL DEFAULT '',
  `Description` varchar(255) NOT NULL DEFAULT '',
  `Public` int(11) NOT NULL DEFAULT '0',
  `Admissions` int(11) NOT NULL DEFAULT '0',
  `RPID` int(11) NOT NULL DEFAULT '0',
  `ValidationType` int(11) NOT NULL DEFAULT '0' COMMENT ' 0=None, 1=Number, 2=Email, 3=Min Length, 4=Max Length, 5=Custom Regex',
  `ValidationPattern` varchar(64) NOT NULL,
  `Required` int(11) NOT NULL DEFAULT '0' COMMENT '0=Not Required, 1=Required',
  PRIMARY KEY (`SSID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `Sequence` (`Sequence`),
  KEY `RPID` (`RPID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `StudentTranscriptACT`
--

DROP TABLE IF EXISTS `StudentTranscriptACT`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentTranscriptACT` (
  `STTID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `StudentID` int(11) NOT NULL DEFAULT '0',
  `English` int(11) DEFAULT NULL,
  `Math` int(11) DEFAULT NULL,
  `Reading` int(11) DEFAULT NULL,
  `Science` int(11) DEFAULT NULL,
  `Writing` int(11) DEFAULT NULL,
  `Composite` int(11) DEFAULT NULL,
  `National` int(11) DEFAULT NULL,
  `TestMonth` int(11) NOT NULL DEFAULT '0',
  `TestYear` int(11) NOT NULL DEFAULT '0',
  `PreTest` int(11) NOT NULL DEFAULT '0',
  `STEM` int(11) DEFAULT NULL,
  PRIMARY KEY (`STTID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `StudentID` (`StudentID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `StudentTranscriptCustom`
--

DROP TABLE IF EXISTS `StudentTranscriptCustom`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentTranscriptCustom` (
  `STTID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `StudentID` int(11) NOT NULL DEFAULT '0',
  `TestMonth` int(11) NOT NULL DEFAULT '0',
  `TestYear` int(11) NOT NULL DEFAULT '0',
  `Score` int(11) DEFAULT NULL,
  `Location` varchar(64) NOT NULL,
  `Name` varchar(64) NOT NULL,
  `PreTest` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`STTID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `StudentID` (`StudentID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `StudentTranscriptNotes`
--

DROP TABLE IF EXISTS `StudentTranscriptNotes`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentTranscriptNotes` (
  `STNID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `StudentID` int(11) NOT NULL DEFAULT '0',
  `Level` int(11) NOT NULL DEFAULT '0',
  `Comments` text NOT NULL,
  PRIMARY KEY (`STNID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `StudentID` (`StudentID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `StudentTranscriptPostings`
--

DROP TABLE IF EXISTS `StudentTranscriptPostings`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentTranscriptPostings` (
  `STPID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `Grade` int(11) NOT NULL DEFAULT '0',
  `Semester` int(11) NOT NULL DEFAULT '0',
  `Posted` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  PRIMARY KEY (`STPID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Date / Time Transcript info was posted';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `StudentTranscriptSAT`
--

DROP TABLE IF EXISTS `StudentTranscriptSAT`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentTranscriptSAT` (
  `STTID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `StudentID` int(11) NOT NULL DEFAULT '0',
  `Reading` float DEFAULT NULL,
  `Math` float DEFAULT NULL,
  `Writing` float DEFAULT NULL,
  `Essay` int(11) DEFAULT NULL,
  `Verbal` int(11) DEFAULT NULL,
  `MultipleChoice` int(11) DEFAULT NULL,
  `National` int(11) DEFAULT NULL,
  `TestMonth` int(11) NOT NULL DEFAULT '0',
  `TestYear` int(11) NOT NULL DEFAULT '0',
  `PreTest` int(11) NOT NULL DEFAULT '0',
  `Total` float DEFAULT NULL,
  `ReadWriteSec` float DEFAULT NULL,
  `MathSec` float DEFAULT NULL,
  `Post2015` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`STTID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `StudentID` (`StudentID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `StudentTranscripts`
--

DROP TABLE IF EXISTS `StudentTranscripts`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentTranscripts` (
  `STID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `ClassID` int(11) NOT NULL DEFAULT '0',
  `SubjectID` int(11) NOT NULL DEFAULT '0',
  `StudentID` int(11) NOT NULL DEFAULT '0',
  `Local` int(11) NOT NULL DEFAULT '0',
  `SchoolYearID` int(11) NOT NULL,
  `SchoolName` varchar(32) NOT NULL DEFAULT '',
  `CourseTitle` varchar(48) NOT NULL DEFAULT '',
  `CourseCode` varchar(10) NOT NULL,
  `RequireID` int(11) NOT NULL DEFAULT '0',
  `Grade` int(11) NOT NULL DEFAULT '0',
  `Quarter` int(11) NOT NULL DEFAULT '0',
  `Semester` int(11) NOT NULL DEFAULT '0',
  `LetterGrade` char(2) NOT NULL DEFAULT '0',
  `PointGrade` float NOT NULL DEFAULT '0',
  `CreditsAttempted` float NOT NULL DEFAULT '0',
  `CreditsEarned` float NOT NULL DEFAULT '0',
  `Weight` float NOT NULL DEFAULT '0',
  `Honor` int(11) NOT NULL DEFAULT '0' COMMENT 'Depreciated (now using GPAScale)',
  `Honors` float NOT NULL DEFAULT '0',
  `HrsPossible` int(11) NOT NULL DEFAULT '0',
  `HrsReceived` int(11) NOT NULL DEFAULT '0',
  `Scale` float NOT NULL DEFAULT '0',
  `Points` float NOT NULL DEFAULT '0',
  `AuthorID` int(11) NOT NULL DEFAULT '0',
  `Updated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Imported` int(11) NOT NULL DEFAULT '0',
  `Colleges` float NOT NULL DEFAULT '0',
  `College` int(11) NOT NULL DEFAULT '0' COMMENT 'Depreciated (now using GPAScale)',
  `CollegeCredit` int(11) NOT NULL DEFAULT '0',
  `ClassDCID` int(11) NOT NULL COMMENT 'Class District Category ID',
  `SGSID` int(11) NOT NULL COMMENT 'Student Grade Scale ID',
  `AcademicLevel` tinyint(4) NOT NULL DEFAULT '0',
  `HSCredit` tinyint(4) NOT NULL DEFAULT '0',
  `GPAScale` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`STID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `StudentID` (`StudentID`),
  KEY `Grade` (`Grade`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `StudentTuition`
--

DROP TABLE IF EXISTS `StudentTuition`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentTuition` (
  `STID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `StudentID` int(11) NOT NULL DEFAULT '0',
  `TuitionID` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`STID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `StudentID` (`StudentID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `StudentTypes`
--

DROP TABLE IF EXISTS `StudentTypes`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentTypes` (
  `STID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `Name` char(32) NOT NULL DEFAULT '',
  `Description` char(128) NOT NULL DEFAULT '',
  `Sequence` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`STID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `StudentUpdateLogs`
--

DROP TABLE IF EXISTS `StudentUpdateLogs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentUpdateLogs` (
  `SULID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `StudentID` int(11) NOT NULL,
  `UserID` int(11) NOT NULL,
  `DateTime` datetime NOT NULL,
  PRIMARY KEY (`SULID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `StudentID` (`StudentID`),
  KEY `UserID` (`UserID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `StudentVaccineConfig`
--

DROP TABLE IF EXISTS `StudentVaccineConfig`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentVaccineConfig` (
  `SVCID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `SVID` int(11) NOT NULL DEFAULT '0',
  `Grade` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`SVCID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `SVID` (`SVID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `StudentVaccineRecords`
--

DROP TABLE IF EXISTS `StudentVaccineRecords`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentVaccineRecords` (
  `SVRID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `StudentID` int(11) NOT NULL DEFAULT '0',
  `SVID` int(11) NOT NULL DEFAULT '0',
  `VaccineDate` date NOT NULL DEFAULT '0000-00-00',
  `RecordedDate` date NOT NULL DEFAULT '0000-00-00',
  `Notes` varchar(64) NOT NULL DEFAULT '',
  `Exempt` int(11) NOT NULL DEFAULT '0',
  `Imported` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`SVRID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `StudentID` (`StudentID`),
  KEY `SVID` (`SVID`),
  KEY `VaccineDate` (`VaccineDate`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `StudentVaccines`
--

DROP TABLE IF EXISTS `StudentVaccines`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `StudentVaccines` (
  `SVID` int(11) NOT NULL AUTO_INCREMENT,
  `Vaccine` varchar(64) NOT NULL DEFAULT '',
  `Description` varchar(64) NOT NULL DEFAULT '',
  PRIMARY KEY (`SVID`),
  KEY `Vaccine` (`Vaccine`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `Students`
--

DROP TABLE IF EXISTS `Students`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Students` (
  `StudentID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `FamilyID` int(11) NOT NULL DEFAULT '0',
  `Family2ID` int(11) NOT NULL DEFAULT '0',
  `UserID` int(11) NOT NULL DEFAULT '0',
  `FirstName` varchar(36) NOT NULL DEFAULT '',
  `LastName` varchar(36) NOT NULL DEFAULT '',
  `MiddleName` varchar(24) NOT NULL DEFAULT '',
  `Suffix` varchar(8) NOT NULL DEFAULT '',
  `DOB` date NOT NULL DEFAULT '0000-00-00',
  `Grade` int(11) NOT NULL DEFAULT '99',
  `Type` int(11) NOT NULL,
  `FTN` int(11) NOT NULL DEFAULT '100',
  `GradYear` int(11) NOT NULL DEFAULT '0',
  `GradMonth` int(11) NOT NULL DEFAULT '5',
  `GradDay` int(11) NOT NULL DEFAULT '0',
  `Graduated` int(11) NOT NULL DEFAULT '0',
  `District` varchar(16) NOT NULL DEFAULT '',
  `SchoolCode` varchar(16) NOT NULL DEFAULT '',
  `TeacherID` int(11) NOT NULL DEFAULT '0',
  `CounselorID` int(11) NOT NULL DEFAULT '0',
  `NickName` varchar(24) NOT NULL DEFAULT '',
  `Gender` char(1) NOT NULL DEFAULT '',
  `MedInfo` text NOT NULL,
  `Tylenol` int(11) NOT NULL DEFAULT '0',
  `Ethnicity` int(11) NOT NULL,
  `RaceID` int(11) NOT NULL DEFAULT '0',
  `LanguageID` int(11) NOT NULL DEFAULT '0',
  `LEP_Eligible` int(11) NOT NULL DEFAULT '0',
  `LEP_Enrolled` int(11) NOT NULL DEFAULT '0',
  `FamilyCode` varchar(8) NOT NULL DEFAULT '',
  `SSN` varchar(9) NOT NULL DEFAULT '',
  `Current` int(11) NOT NULL DEFAULT '0' COMMENT 'Not Used - See SchoolYearStudents',
  `StudentCode` varchar(10) NOT NULL DEFAULT '',
  `PictureFile` varchar(64) NOT NULL,
  `Email` varchar(128) NOT NULL DEFAULT '',
  `URL` varchar(128) NOT NULL,
  `Cell` varchar(16) NOT NULL DEFAULT '',
  `Work` varchar(16) NOT NULL,
  `SMS` varchar(128) NOT NULL DEFAULT '',
  `ExtID` varchar(16) NOT NULL DEFAULT '0',
  `StateID` varchar(16) NOT NULL DEFAULT '',
  `StuLink` int(11) NOT NULL DEFAULT '0',
  `New` int(11) NOT NULL DEFAULT '0',
  `Deleted` int(11) NOT NULL DEFAULT '0',
  `DCPPID` int(11) NOT NULL DEFAULT '0',
  `LPPID` int(11) DEFAULT NULL,
  `BPPID` int(11) DEFAULT NULL,
  `LunchPeriod` int(11) NOT NULL DEFAULT '1',
  `LocationID` int(11) NOT NULL,
  `LockerNum` varchar(8) NOT NULL DEFAULT '',
  `ComboNum` varchar(12) NOT NULL DEFAULT '',
  `GPA` float NOT NULL DEFAULT '0',
  `NumericAvg` float NOT NULL DEFAULT '0',
  `Ranked` int(11) NOT NULL DEFAULT '1',
  `Ranking` int(11) NOT NULL DEFAULT '0',
  `OutOf` int(11) NOT NULL DEFAULT '0',
  `AlertComments` text NOT NULL,
  PRIMARY KEY (`StudentID`),
  KEY `Grade` (`Grade`),
  KEY `DOB` (`DOB`),
  KEY `LastName` (`LastName`),
  KEY `Ranking` (`Ranking`),
  KEY `GPA` (`GPA`),
  KEY `FamilyID` (`FamilyID`),
  KEY `Family2ID` (`Family2ID`),
  KEY `TeacherID` (`TeacherID`),
  KEY `CounselorID` (`CounselorID`),
  KEY `FindStudent` (`SchoolID`,`StudentID`,`Grade`),
  KEY `LPPID` (`LPPID`),
  KEY `BPPID` (`BPPID`),
  CONSTRAINT `Students_ibfk_1` FOREIGN KEY (`LPPID`) REFERENCES `LunchPricePlans` (`LPPID`) ON DELETE SET NULL,
  CONSTRAINT `Students_ibfk_2` FOREIGN KEY (`BPPID`) REFERENCES `LunchPricePlans` (`LPPID`) ON DELETE SET NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `SupportGroups`
--

DROP TABLE IF EXISTS `SupportGroups`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `SupportGroups` (
  `SGID` int(11) NOT NULL AUTO_INCREMENT,
  `Name` varchar(32) NOT NULL,
  `Code` varchar(5) NOT NULL,
  `LeaderID` int(11) NOT NULL,
  PRIMARY KEY (`SGID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `SupportTicketComments`
--

DROP TABLE IF EXISTS `SupportTicketComments`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `SupportTicketComments` (
  `STCID` int(11) NOT NULL AUTO_INCREMENT,
  `STID` int(11) NOT NULL DEFAULT '0',
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `UserID` int(11) NOT NULL DEFAULT '0',
  `Comments` text NOT NULL,
  `CreatedDT` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `WorkTime` int(11) NOT NULL,
  `Private` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`STCID`),
  KEY `STID` (`STID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `UserID` (`UserID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `SupportTickets`
--

DROP TABLE IF EXISTS `SupportTickets`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `SupportTickets` (
  `STID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `Summary` varchar(64) NOT NULL DEFAULT '',
  `StatusID` int(11) NOT NULL DEFAULT '0',
  `Level` int(11) NOT NULL DEFAULT '1',
  `Closed` int(11) NOT NULL DEFAULT '0',
  `Enhancement` int(11) NOT NULL DEFAULT '0',
  `UserID` int(11) NOT NULL DEFAULT '0',
  `TicketCode` varchar(16) NOT NULL DEFAULT '',
  `CreatedDT` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `UpdatedDT` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `OwnerID` int(11) NOT NULL DEFAULT '0',
  `Severity` int(11) NOT NULL DEFAULT '0',
  `Flagged` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`STID`),
  KEY `AuthorID` (`UserID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `TicketCode` (`TicketCode`),
  KEY `CreatedDT` (`CreatedDT`),
  KEY `OwnerID` (`OwnerID`),
  KEY `Closed` (`Closed`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `SystemAlertUsers`
--

DROP TABLE IF EXISTS `SystemAlertUsers`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `SystemAlertUsers` (
  `SAUID` int(11) NOT NULL AUTO_INCREMENT,
  `SAID` int(11) NOT NULL DEFAULT '0',
  `UserID` int(11) NOT NULL DEFAULT '0',
  `DateTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  PRIMARY KEY (`SAUID`),
  KEY `UserID` (`UserID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `SystemAlerts`
--

DROP TABLE IF EXISTS `SystemAlerts`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `SystemAlerts` (
  `SAID` int(11) NOT NULL AUTO_INCREMENT,
  `Title` varchar(64) NOT NULL DEFAULT '',
  `Content` text NOT NULL,
  `ExpireDate` date NOT NULL DEFAULT '0000-00-00',
  `Level` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`SAID`),
  KEY `ExpireDate` (`ExpireDate`),
  KEY `Level` (`Level`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `SystemBookChapters`
--

DROP TABLE IF EXISTS `SystemBookChapters`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `SystemBookChapters` (
  `SBCID` int(11) NOT NULL AUTO_INCREMENT,
  `SBID` int(11) NOT NULL,
  `Title` varchar(32) NOT NULL,
  `Description` varchar(128) NOT NULL,
  `ChapterNumber` int(11) NOT NULL,
  `Published` int(11) NOT NULL,
  `Content` text NOT NULL,
  `VideoURL` varchar(255) NOT NULL,
  PRIMARY KEY (`SBCID`),
  KEY `SBID` (`SBID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `SystemBooks`
--

DROP TABLE IF EXISTS `SystemBooks`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `SystemBooks` (
  `SBID` int(11) NOT NULL AUTO_INCREMENT,
  `BookIndex` int(11) NOT NULL,
  `Title` varchar(32) NOT NULL,
  `Description` varchar(128) NOT NULL,
  `Content` text NOT NULL,
  `Published` int(11) NOT NULL,
  `Level` int(11) NOT NULL DEFAULT '1',
  `SectionID` int(11) NOT NULL,
  PRIMARY KEY (`SBID`),
  KEY `BookIndex` (`BookIndex`),
  KEY `Published` (`Published`),
  KEY `Title` (`Title`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `SystemLeafNoteSchools`
--

DROP TABLE IF EXISTS `SystemLeafNoteSchools`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `SystemLeafNoteSchools` (
  `SLNSID` int(11) NOT NULL AUTO_INCREMENT,
  `SLNID` int(11) NOT NULL,
  `SchoolID` int(11) NOT NULL,
  PRIMARY KEY (`SLNSID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `SystemLeafNoteUsers`
--

DROP TABLE IF EXISTS `SystemLeafNoteUsers`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `SystemLeafNoteUsers` (
  `SLNUID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `DateTime` datetime NOT NULL,
  `UserID` int(11) NOT NULL,
  `SLNID` int(11) NOT NULL,
  PRIMARY KEY (`SLNUID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `UserID` (`UserID`),
  KEY `SLNID` (`SLNID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `SystemLeafNotes`
--

DROP TABLE IF EXISTS `SystemLeafNotes`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `SystemLeafNotes` (
  `SLNID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `Date` date NOT NULL,
  `Title` varchar(128) NOT NULL,
  `Color` varchar(8) NOT NULL,
  `Content` text NOT NULL,
  `ExpireDate` date NOT NULL,
  `Limited` int(1) NOT NULL DEFAULT '0',
  `Viewable` int(11) NOT NULL DEFAULT '1',
  PRIMARY KEY (`SLNID`),
  KEY `Date` (`Date`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `SystemLog`
--

DROP TABLE IF EXISTS `SystemLog`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `SystemLog` (
  `SLID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `UserID` int(11) NOT NULL DEFAULT '0',
  `DateTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Message` varchar(128) NOT NULL DEFAULT '',
  PRIMARY KEY (`SLID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `SystemMessageUsers`
--

DROP TABLE IF EXISTS `SystemMessageUsers`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `SystemMessageUsers` (
  `SAUID` int(11) NOT NULL AUTO_INCREMENT,
  `SAID` int(11) NOT NULL DEFAULT '0',
  `UserID` int(11) NOT NULL DEFAULT '0',
  `DateTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  PRIMARY KEY (`SAUID`),
  KEY `SAID` (`SAID`),
  KEY `UserID` (`UserID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `SystemMessages`
--

DROP TABLE IF EXISTS `SystemMessages`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `SystemMessages` (
  `SAID` int(11) NOT NULL AUTO_INCREMENT,
  `Title` varchar(64) NOT NULL DEFAULT '',
  `Content` text NOT NULL,
  `ExpireDate` date NOT NULL DEFAULT '0000-00-00',
  `Level` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`SAID`),
  KEY `Level` (`Level`),
  KEY `ExpireDate` (`ExpireDate`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `SystemVideos`
--

DROP TABLE IF EXISTS `SystemVideos`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `SystemVideos` (
  `SVID` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `URL` varchar(255) NOT NULL DEFAULT '',
  `Name` varchar(32) NOT NULL DEFAULT '',
  `Source` varchar(32) NOT NULL,
  `Comments` text NOT NULL,
  `AuthorID` int(11) NOT NULL DEFAULT '0',
  `Updated` datetime NOT NULL,
  `Embed` text NOT NULL,
  `Parent` int(11) NOT NULL,
  `Student` int(11) NOT NULL,
  PRIMARY KEY (`SVID`),
  KEY `MediaID` (`SVID`),
  KEY `Parent` (`Parent`),
  KEY `Student` (`Student`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `SystemVideosRead`
--

DROP TABLE IF EXISTS `SystemVideosRead`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `SystemVideosRead` (
  `SVRID` int(11) NOT NULL AUTO_INCREMENT,
  `SVID` int(11) NOT NULL DEFAULT '0',
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `UserID` int(11) NOT NULL DEFAULT '0',
  `DateTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  PRIMARY KEY (`SVRID`),
  KEY `MID` (`SVID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `UserID` (`UserID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `TM_BusRoute`
--

DROP TABLE IF EXISTS `TM_BusRoute`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `TM_BusRoute` (
  `BRID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `Time` int(11) NOT NULL,
  `Days` int(11) NOT NULL,
  `Title` varchar(128) NOT NULL,
  `Description` varchar(128) NOT NULL,
  PRIMARY KEY (`BRID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `TM_BusRouteStudents`
--

DROP TABLE IF EXISTS `TM_BusRouteStudents`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `TM_BusRouteStudents` (
  `BRSID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `StudentID` int(11) NOT NULL,
  `BRID` int(11) NOT NULL,
  `Days` int(11) NOT NULL DEFAULT '0',
  `Notes` varchar(128) NOT NULL,
  PRIMARY KEY (`BRSID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `TM_Carpool`
--

DROP TABLE IF EXISTS `TM_Carpool`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `TM_Carpool` (
  `CPID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `FamilyID` int(11) NOT NULL,
  `Notes` varchar(128) NOT NULL,
  `AMPM` tinyint(1) NOT NULL,
  `Days` tinyint(2) NOT NULL,
  `Seats` tinyint(1) NOT NULL,
  `Status` tinyint(1) NOT NULL COMMENT '1=need 2=give',
  PRIMARY KEY (`CPID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `TM_FieldTrip`
--

DROP TABLE IF EXISTS `TM_FieldTrip`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `TM_FieldTrip` (
  `FTID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `ClassID` int(11) NOT NULL,
  `Teacher` varchar(128) NOT NULL,
  `Destination` varchar(128) NOT NULL,
  `Departure` time NOT NULL,
  `ArriveDest` time NOT NULL,
  `DepartDest` time NOT NULL,
  `Arrival` time NOT NULL,
  `Date` date NOT NULL,
  `Description` varchar(128) NOT NULL,
  PRIMARY KEY (`FTID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ClassID` (`ClassID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `TM_FieldTripDriver`
--

DROP TABLE IF EXISTS `TM_FieldTripDriver`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `TM_FieldTripDriver` (
  `FTDID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `FTID` int(11) NOT NULL,
  `UserID` int(11) NOT NULL,
  `ContactID` int(11) NOT NULL,
  PRIMARY KEY (`FTDID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `TM_FieldTripStudents`
--

DROP TABLE IF EXISTS `TM_FieldTripStudents`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `TM_FieldTripStudents` (
  `FTSID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `FTID` int(11) NOT NULL,
  `StudentID` int(11) NOT NULL,
  `FTDID` int(11) NOT NULL,
  PRIMARY KEY (`FTSID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `TM_ParkingPass`
--

DROP TABLE IF EXISTS `TM_ParkingPass`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `TM_ParkingPass` (
  `PPID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `StudentID` int(11) NOT NULL,
  `Make` varchar(64) NOT NULL,
  `Model` varchar(64) NOT NULL,
  `License` varchar(32) NOT NULL,
  `PassID` varchar(64) NOT NULL,
  PRIMARY KEY (`PPID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `TicketAlarms`
--

DROP TABLE IF EXISTS `TicketAlarms`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `TicketAlarms` (
  `TAlarmID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `UserID` int(11) NOT NULL DEFAULT '0',
  `TicketID` int(11) NOT NULL DEFAULT '0',
  KEY `TicketAlarmID` (`TAlarmID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `UserID` (`UserID`),
  KEY `EventID` (`TicketID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `TicketCatagories`
--

DROP TABLE IF EXISTS `TicketCatagories`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `TicketCatagories` (
  `CatagoryID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `Description` varchar(128) NOT NULL DEFAULT '',
  `Name` varchar(32) NOT NULL DEFAULT '',
  PRIMARY KEY (`CatagoryID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `TicketContacts`
--

DROP TABLE IF EXISTS `TicketContacts`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `TicketContacts` (
  `TicketContactID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `TicketID` int(11) NOT NULL DEFAULT '0',
  `ContactID` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`TicketContactID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `TicketLogs`
--

DROP TABLE IF EXISTS `TicketLogs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `TicketLogs` (
  `TicketLogID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `TicketID` int(11) NOT NULL DEFAULT '0',
  `Date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Subject` varchar(128) NOT NULL DEFAULT '',
  `Description` longtext NOT NULL,
  `UserID` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`TicketLogID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `TicketID` (`TicketID`),
  KEY `UserID` (`UserID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `TicketNotifications`
--

DROP TABLE IF EXISTS `TicketNotifications`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `TicketNotifications` (
  `TNID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `UserID` int(11) NOT NULL DEFAULT '0',
  `TicketID` int(11) NOT NULL DEFAULT '0',
  KEY `EventAlarmID` (`TNID`),
  KEY `CompanyID` (`SchoolID`),
  KEY `UserID` (`UserID`),
  KEY `TicketID` (`TicketID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `TicketTmp`
--

DROP TABLE IF EXISTS `TicketTmp`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `TicketTmp` (
  `TicketID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `Date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `ProjectID` int(11) NOT NULL DEFAULT '0',
  `Summary` varchar(64) NOT NULL DEFAULT '',
  `Description` longtext NOT NULL,
  `StatusID` int(11) NOT NULL DEFAULT '0',
  `AssignID` int(11) NOT NULL DEFAULT '0',
  `PriorityID` int(11) NOT NULL DEFAULT '0',
  `AuthorID` int(11) NOT NULL DEFAULT '0',
  `TicketCode` varchar(16) NOT NULL DEFAULT '',
  `Type` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`TicketID`),
  UNIQUE KEY `IssueID_2` (`TicketID`),
  KEY `IssueID` (`TicketID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `Tickets`
--

DROP TABLE IF EXISTS `Tickets`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Tickets` (
  `TicketID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `Date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `DueDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `ClosedDate` datetime NOT NULL,
  `ClassID` int(11) NOT NULL DEFAULT '0',
  `Summary` varchar(64) NOT NULL DEFAULT '',
  `Attachment` varchar(64) NOT NULL DEFAULT '',
  `Description` longtext NOT NULL,
  `Resolution` longtext NOT NULL,
  `StatusID` int(11) NOT NULL DEFAULT '0',
  `AssignID` int(11) NOT NULL DEFAULT '0',
  `PriorityID` int(11) NOT NULL DEFAULT '0',
  `AuthorID` int(11) NOT NULL DEFAULT '0',
  `ClosedID` int(11) NOT NULL,
  `TicketCode` varchar(16) NOT NULL DEFAULT '',
  `Type` int(11) NOT NULL DEFAULT '0',
  `CatagoryID` int(11) NOT NULL DEFAULT '0',
  `ChangeOfStatus` datetime DEFAULT NULL,
  PRIMARY KEY (`TicketID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `StatusID` (`StatusID`),
  KEY `AssignID` (`AssignID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `TimeCard`
--

DROP TABLE IF EXISTS `TimeCard`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `TimeCard` (
  `TCID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `ClassID` int(11) NOT NULL DEFAULT '0',
  `TCTID` int(11) NOT NULL DEFAULT '0',
  `UserID` int(11) NOT NULL DEFAULT '0',
  `Date` date NOT NULL DEFAULT '0000-00-00',
  `Start` bigint(20) NOT NULL DEFAULT '0',
  `Stop` bigint(20) NOT NULL DEFAULT '0',
  `Hours` int(11) NOT NULL DEFAULT '0',
  `Minutes` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`TCID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ClassID` (`ClassID`),
  KEY `Date` (`Date`),
  KEY `UserID` (`UserID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `TimeCardConfig`
--

DROP TABLE IF EXISTS `TimeCardConfig`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `TimeCardConfig` (
  `TCCID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `TimePeriods` int(11) NOT NULL DEFAULT '1' COMMENT '1=Week, 2=Cycles',
  `Label` varchar(16) NOT NULL,
  `AllowEmpAdjust` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`TCCID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `TimeCardCycles`
--

DROP TABLE IF EXISTS `TimeCardCycles`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `TimeCardCycles` (
  `TCCID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `Name` varchar(64) NOT NULL DEFAULT '',
  `StartDate` date NOT NULL DEFAULT '0000-00-00',
  `EndDate` date NOT NULL DEFAULT '0000-00-00',
  `Open` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`TCCID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `StartDate` (`StartDate`),
  KEY `EndDate` (`EndDate`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `TimeCardSubmissions`
--

DROP TABLE IF EXISTS `TimeCardSubmissions`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `TimeCardSubmissions` (
  `TCSID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `UserID` int(11) NOT NULL,
  `Year` int(11) NOT NULL,
  `Week` int(11) NOT NULL,
  `CycleID` int(11) NOT NULL,
  `SubmittedDT` datetime NOT NULL,
  `ApprovedDT` datetime NOT NULL,
  `ApprovedUID` int(11) NOT NULL,
  PRIMARY KEY (`TCSID`),
  KEY `CompanyID` (`SchoolID`),
  KEY `UserID` (`UserID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Timecard Weekly submissions';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `TimeCardTask`
--

DROP TABLE IF EXISTS `TimeCardTask`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `TimeCardTask` (
  `TCTID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `Code` varchar(5) NOT NULL,
  `Name` varchar(64) NOT NULL DEFAULT '',
  `Description` text NOT NULL,
  `TimeOff` int(11) NOT NULL,
  PRIMARY KEY (`TCTID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `TimeOffRequest`
--

DROP TABLE IF EXISTS `TimeOffRequest`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `TimeOffRequest` (
  `TORID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `UserID` int(11) NOT NULL,
  `Date` date NOT NULL,
  `Days` int(11) NOT NULL,
  `Hours` decimal(10,2) NOT NULL,
  `TCTID` int(11) NOT NULL,
  `Comments` varchar(128) NOT NULL,
  `Status` int(11) NOT NULL DEFAULT '1' COMMENT '1=Pending, 2=Approved, 3=Denied',
  `AuthorID` int(11) NOT NULL,
  `CreateDate` datetime NOT NULL,
  PRIMARY KEY (`TORID`),
  KEY `CompanyID` (`SchoolID`),
  KEY `UserID` (`UserID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `TimeTracker`
--

DROP TABLE IF EXISTS `TimeTracker`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `TimeTracker` (
  `TimeTrackerID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolId` int(11) NOT NULL DEFAULT '0',
  `UserID` int(11) NOT NULL DEFAULT '0',
  `ClassID` int(11) NOT NULL DEFAULT '0',
  `TaskID` int(11) NOT NULL DEFAULT '0',
  `StartTime` bigint(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`TimeTrackerID`),
  KEY `SchoolId` (`SchoolId`),
  KEY `UserID` (`UserID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `Titles`
--

DROP TABLE IF EXISTS `Titles`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Titles` (
  `TitleID` int(11) NOT NULL AUTO_INCREMENT,
  `TitleName` varchar(15) NOT NULL,
  PRIMARY KEY (`TitleID`),
  UNIQUE KEY `TitleID` (`TitleID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `TranscriptConfig`
--

DROP TABLE IF EXISTS `TranscriptConfig`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `TranscriptConfig` (
  `TCID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `TCTID` int(11) NOT NULL COMMENT 'TranscriptConfigTemplateID',
  `Template` int(11) NOT NULL DEFAULT '1',
  `Legend` int(11) NOT NULL DEFAULT '0',
  `FontSize` int(11) NOT NULL DEFAULT '0',
  `FontFamily` varchar(32) NOT NULL,
  `Notes` varchar(255) NOT NULL DEFAULT '',
  `Weighted` int(11) NOT NULL DEFAULT '1',
  `GPA` int(11) NOT NULL DEFAULT '1',
  `GradeYears` int(11) NOT NULL DEFAULT '1',
  `NumAvg` int(11) NOT NULL DEFAULT '1',
  `WorkInProgress` int(11) NOT NULL DEFAULT '0',
  `IncludeSAT` int(11) NOT NULL DEFAULT '1',
  `IncludeACT` int(11) NOT NULL DEFAULT '1',
  `IncludeCustom` int(11) NOT NULL,
  `IncludeRanking` int(11) NOT NULL DEFAULT '1',
  `FullYearLines` int(11) NOT NULL DEFAULT '1',
  `Rounding` int(11) NOT NULL DEFAULT '2',
  `GPARounding` int(11) NOT NULL DEFAULT '4',
  `TransferGrade` int(11) NOT NULL DEFAULT '2',
  `IncludeSigAll` int(11) NOT NULL DEFAULT '0',
  `RequireOfficial` int(11) NOT NULL DEFAULT '1',
  `IncludeCourseCode` int(11) NOT NULL DEFAULT '0',
  `DisplayGrade` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`TCID`),
  UNIQUE KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `TranscriptConfigTemplates`
--

DROP TABLE IF EXISTS `TranscriptConfigTemplates`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `TranscriptConfigTemplates` (
  `TCTID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `Name` varchar(36) NOT NULL,
  `Description` varchar(128) NOT NULL,
  PRIMARY KEY (`TCTID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `TranscriptTemplates`
--

DROP TABLE IF EXISTS `TranscriptTemplates`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `TranscriptTemplates` (
  `TTID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `Name` varchar(32) NOT NULL,
  `Description` varchar(255) NOT NULL,
  `HelpURL` varchar(255) NOT NULL,
  `Content` text NOT NULL,
  `Filename` varchar(32) NOT NULL,
  `Count` int(11) NOT NULL DEFAULT '0',
  `Format` int(11) NOT NULL COMMENT '1=Landscape 2=Portrait',
  `Margins` varchar(16) NOT NULL DEFAULT '15,15,16,16' COMMENT 'L,R,T,B',
  `PSize` varchar(20) NOT NULL,
  `Seq` int(11) NOT NULL,
  `Config` varchar(255) NOT NULL,
  PRIMARY KEY (`TTID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `TranscriptText`
--

DROP TABLE IF EXISTS `TranscriptText`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `TranscriptText` (
  `TRTXTID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `SDID` int(11) NOT NULL,
  `TokenNum` int(11) NOT NULL,
  `Label` varchar(32) NOT NULL,
  `Content` text NOT NULL,
  `Locked` tinyint(4) NOT NULL DEFAULT '0',
  PRIMARY KEY (`TRTXTID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `SDID` (`SDID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `Transcripts`
--

DROP TABLE IF EXISTS `Transcripts`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Transcripts` (
  `TranscriptID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `StudentID` int(11) NOT NULL DEFAULT '0',
  `Year` int(11) NOT NULL DEFAULT '0',
  `Semester` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`TranscriptID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `StudentID` (`StudentID`),
  KEY `Year` (`Year`),
  KEY `Semester` (`Semester`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `Tuition`
--

DROP TABLE IF EXISTS `Tuition`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Tuition` (
  `TuitionID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `Code` varchar(8) NOT NULL DEFAULT '',
  `Description` varchar(48) NOT NULL DEFAULT '',
  `Amount` float(10,2) NOT NULL DEFAULT '0.00',
  PRIMARY KEY (`TuitionID`),
  UNIQUE KEY `TuitionID` (`TuitionID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `UpdateFamilyLog`
--

DROP TABLE IF EXISTS `UpdateFamilyLog`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `UpdateFamilyLog` (
  `UFLID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `FamilyID` int(11) NOT NULL,
  `AuthorID` int(11) NOT NULL,
  `DateTime` datetime NOT NULL,
  `Comments` varchar(255) NOT NULL,
  PRIMARY KEY (`UFLID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `FamilyID` (`FamilyID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Family Update Log Table';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `UpdateSchoolLog`
--

DROP TABLE IF EXISTS `UpdateSchoolLog`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `UpdateSchoolLog` (
  `USLID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `AuthorID` int(11) NOT NULL,
  `DateTime` datetime NOT NULL,
  `Comments` varchar(255) NOT NULL,
  PRIMARY KEY (`USLID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Student Update Log Table';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `UpdateSiteAdminLog`
--

DROP TABLE IF EXISTS `UpdateSiteAdminLog`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `UpdateSiteAdminLog` (
  `USALID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `AuthorID` int(11) NOT NULL,
  `DateTime` datetime NOT NULL,
  `Comments` varchar(255) NOT NULL,
  `UserID` int(11) NOT NULL,
  PRIMARY KEY (`USALID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Student Update Log Table';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `UpdateStudentLog`
--

DROP TABLE IF EXISTS `UpdateStudentLog`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `UpdateStudentLog` (
  `USLID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `StudentID` int(11) NOT NULL,
  `AuthorID` int(11) NOT NULL,
  `DateTime` datetime NOT NULL,
  `Event` int(11) NOT NULL,
  `Comments` varchar(255) NOT NULL,
  `Notes` varchar(255) NOT NULL,
  PRIMARY KEY (`USLID`),
  KEY `SchoolID` (`SchoolID`,`StudentID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Student Update Log Table';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `UserActivity`
--

DROP TABLE IF EXISTS `UserActivity`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `UserActivity` (
  `UAID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `UserID` int(11) NOT NULL,
  `DateTime` datetime NOT NULL,
  `Comment` varchar(128) NOT NULL,
  PRIMARY KEY (`UAID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `UserCategories`
--

DROP TABLE IF EXISTS `UserCategories`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `UserCategories` (
  `CategoryID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `UCGID` int(11) NOT NULL DEFAULT '0',
  `Sequence` int(11) NOT NULL DEFAULT '0',
  `Description` varchar(128) NOT NULL DEFAULT '',
  `Name` varchar(32) NOT NULL DEFAULT '',
  PRIMARY KEY (`CategoryID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `Name` (`Name`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `UserCategoryGroups`
--

DROP TABLE IF EXISTS `UserCategoryGroups`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `UserCategoryGroups` (
  `UCGID` int(11) NOT NULL AUTO_INCREMENT,
  `Name` varchar(16) NOT NULL DEFAULT '',
  `Description` varchar(64) NOT NULL DEFAULT '',
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `Sequence` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`UCGID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `UserCategoryUsers`
--

DROP TABLE IF EXISTS `UserCategoryUsers`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `UserCategoryUsers` (
  `UCUID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `UserID` int(11) NOT NULL DEFAULT '0',
  `CategoryID` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`UCUID`),
  KEY `UserID` (`UserID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `UserConfig`
--

DROP TABLE IF EXISTS `UserConfig`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `UserConfig` (
  `UserConfigID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `UserID` int(11) NOT NULL DEFAULT '0',
  `FreshchatID` varchar(255) NOT NULL,
  `Updated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `WorkDayStart` int(11) NOT NULL DEFAULT '0',
  `WorkDayStop` int(11) NOT NULL DEFAULT '0',
  `WeekEndColor` varchar(8) NOT NULL DEFAULT '',
  `WeekDayColor` varchar(8) NOT NULL DEFAULT '',
  `DisplayToDo` int(11) NOT NULL DEFAULT '0',
  `DisplayWorkflow` int(11) NOT NULL DEFAULT '0',
  `DisplayCallNotes` int(11) NOT NULL DEFAULT '0',
  `DisplayEmailLogs` int(11) NOT NULL DEFAULT '0',
  `DisplayCheckListItems` int(11) NOT NULL DEFAULT '0',
  `MyDesk` varchar(8) NOT NULL DEFAULT '11111111',
  `MyDeskHide` varchar(8) NOT NULL DEFAULT '00000000',
  `MyDeskView` varchar(12) NOT NULL DEFAULT 'events',
  `Associates` int(11) NOT NULL DEFAULT '0',
  `Weather` int(11) NOT NULL DEFAULT '0',
  `Email` int(11) NOT NULL DEFAULT '1',
  `PAN` int(11) NOT NULL DEFAULT '1',
  `Workflow` int(11) NOT NULL DEFAULT '0',
  `Reminders` int(11) NOT NULL DEFAULT '0',
  `Memo` int(11) NOT NULL DEFAULT '0',
  `Links` int(11) NOT NULL DEFAULT '0',
  `EventNotification` int(11) NOT NULL DEFAULT '0',
  `EventNotificationTime` int(11) NOT NULL DEFAULT '0',
  `EventEmail` varchar(128) NOT NULL DEFAULT '',
  `ICSExport` int(11) NOT NULL DEFAULT '0',
  `ICSImport` int(11) NOT NULL DEFAULT '0',
  `ICSImportURL` varchar(128) NOT NULL,
  `Google` int(11) NOT NULL,
  PRIMARY KEY (`UserConfigID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `UserID` (`UserID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `UserDenied`
--

DROP TABLE IF EXISTS `UserDenied`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `UserDenied` (
  `DeniedID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `UserID` int(11) NOT NULL,
  `LoginID` varchar(16) NOT NULL DEFAULT '0',
  `DateTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Comments` text NOT NULL,
  `Accepted` tinyint(4) NOT NULL DEFAULT '0',
  PRIMARY KEY (`DeniedID`),
  KEY `DeniedID` (`DeniedID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `UserDeposits`
--

DROP TABLE IF EXISTS `UserDeposits`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `UserDeposits` (
  `UDID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `UserID` int(11) NOT NULL DEFAULT '0',
  `Date` date NOT NULL DEFAULT '0000-00-00',
  `AcctCCID` int(11) NOT NULL,
  `Amount` float(10,2) NOT NULL DEFAULT '0.00',
  `Comments` varchar(255) NOT NULL DEFAULT '',
  `PaymentMethod` int(11) NOT NULL,
  `CheckNum` varchar(10) NOT NULL,
  `AuthorID` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`UDID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `UserID` (`UserID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `UserDevelopers`
--

DROP TABLE IF EXISTS `UserDevelopers`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `UserDevelopers` (
  `UDID` int(11) NOT NULL AUTO_INCREMENT,
  `DeveloperID` int(11) NOT NULL COMMENT 'UserID from SchoolID -1',
  `UserID` int(11) NOT NULL COMMENT 'UserID from SchoolID 1337',
  `Created` datetime NOT NULL,
  PRIMARY KEY (`UDID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Connection between developers and users in the Sandbox School';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `UserDocuments`
--

DROP TABLE IF EXISTS `UserDocuments`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `UserDocuments` (
  `UDID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `UserID` int(11) NOT NULL DEFAULT '0',
  `Name` varchar(64) NOT NULL DEFAULT '',
  `Date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Code` varchar(7) NOT NULL,
  `Type` varchar(32) NOT NULL DEFAULT '',
  `FileName` varchar(64) NOT NULL,
  `Size` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`UDID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `StudentID` (`UserID`),
  KEY `Date` (`Date`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `UserLevel`
--

DROP TABLE IF EXISTS `UserLevel`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `UserLevel` (
  `UserLevel` int(11) NOT NULL AUTO_INCREMENT,
  `Description` varchar(32) NOT NULL DEFAULT '',
  PRIMARY KEY (`UserLevel`),
  UNIQUE KEY `UserLevel_2` (`UserLevel`),
  KEY `UserLevel` (`UserLevel`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `UserLoggedIn`
--

DROP TABLE IF EXISTS `UserLoggedIn`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `UserLoggedIn` (
  `ULIID` int(11) NOT NULL AUTO_INCREMENT,
  `EntityID` int(11) NOT NULL DEFAULT '0',
  `UserID` int(11) NOT NULL DEFAULT '0',
  `UserName` varchar(32) NOT NULL DEFAULT '',
  `Level` int(11) NOT NULL DEFAULT '0',
  `DateTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Working` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `SessionID` varchar(32) NOT NULL DEFAULT '',
  `Invisible` int(11) NOT NULL DEFAULT '0',
  `Status` varchar(16) NOT NULL DEFAULT '',
  `URL` varchar(32) NOT NULL,
  PRIMARY KEY (`ULIID`),
  KEY `UserID` (`UserID`),
  KEY `EntityID` (`EntityID`),
  KEY `Level` (`Level`),
  KEY `DateTime` (`DateTime`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `UserLoginFailures`
--

DROP TABLE IF EXISTS `UserLoginFailures`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `UserLoginFailures` (
  `ULFID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `UserID` int(11) NOT NULL,
  `DateTime` datetime NOT NULL,
  `IPAddress` varchar(16) NOT NULL,
  `HostName` varchar(64) NOT NULL,
  `Notes` varchar(255) NOT NULL,
  PRIMARY KEY (`ULFID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `DateTime` (`DateTime`),
  KEY `UserID` (`UserID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `UserLunchPeriods`
--

DROP TABLE IF EXISTS `UserLunchPeriods`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `UserLunchPeriods` (
  `ULPPID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `UserID` int(11) NOT NULL,
  `LunchPeriod` int(11) NOT NULL,
  PRIMARY KEY (`ULPPID`),
  KEY `SchoolID` (`SchoolID`,`UserID`,`LunchPeriod`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `UserNotes`
--

DROP TABLE IF EXISTS `UserNotes`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `UserNotes` (
  `UserNoteID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `UserID` int(11) NOT NULL DEFAULT '0',
  `AuthorID` int(11) NOT NULL DEFAULT '0',
  `DateTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Subject` varchar(64) NOT NULL DEFAULT '',
  `Message` text NOT NULL,
  PRIMARY KEY (`UserNoteID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `UserID` (`UserID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `UserOAuth`
--

DROP TABLE IF EXISTS `UserOAuth`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `UserOAuth` (
  `UOAID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `UserID` int(11) NOT NULL,
  `VendorID` varchar(126) NOT NULL,
  `Vendor` varchar(16) NOT NULL,
  `Type` varchar(32) NOT NULL,
  `Token` varchar(255) NOT NULL,
  `RefreshToken` varchar(100) NOT NULL,
  `AccessToken` varchar(100) NOT NULL,
  `Scope` int(11) NOT NULL DEFAULT '0',
  `Created` int(11) NOT NULL,
  `Expires` int(11) NOT NULL,
  PRIMARY KEY (`UOAID`),
  KEY `CompanyID` (`SchoolID`),
  KEY `UserID` (`UserID`),
  KEY `Vendor` (`Vendor`),
  KEY `GoogleID` (`VendorID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `UserOAuthLogin`
--

DROP TABLE IF EXISTS `UserOAuthLogin`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `UserOAuthLogin` (
  `UOALID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `UserID` int(11) NOT NULL,
  `Username` varchar(16) NOT NULL,
  `Vendor` varchar(16) NOT NULL,
  `LoginDateTime` datetime NOT NULL,
  `Success` smallint(6) NOT NULL,
  PRIMARY KEY (`UOALID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `UserID` (`UserID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `UserPasswordRequest`
--

DROP TABLE IF EXISTS `UserPasswordRequest`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `UserPasswordRequest` (
  `UPRID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `UserID` int(11) NOT NULL,
  `PWKey` varchar(16) NOT NULL,
  `Email` varchar(254) NOT NULL,
  PRIMARY KEY (`UPRID`),
  KEY `SchoolID` (`SchoolID`,`UserID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `UserPermissions`
--

DROP TABLE IF EXISTS `UserPermissions`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `UserPermissions` (
  `PermissionID` int(11) NOT NULL AUTO_INCREMENT,
  `GroupID` int(11) NOT NULL,
  `Seq` int(11) NOT NULL DEFAULT '0',
  `ColumnName` varchar(32) NOT NULL DEFAULT '',
  `Description` varchar(32) NOT NULL DEFAULT '',
  `Explaination` varchar(255) NOT NULL,
  `HelpID` varchar(6) NOT NULL,
  PRIMARY KEY (`PermissionID`),
  KEY `Seq` (`Seq`),
  KEY `GroupID` (`GroupID`),
  KEY `ColumnName` (`ColumnName`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `UserPositions`
--

DROP TABLE IF EXISTS `UserPositions`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `UserPositions` (
  `UPID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `Code` varchar(10) NOT NULL DEFAULT '',
  `Name` varchar(32) NOT NULL DEFAULT '',
  `Description` varchar(128) NOT NULL DEFAULT '',
  `High` float NOT NULL DEFAULT '0',
  `Low` float NOT NULL DEFAULT '0',
  `Management` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`UPID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `UserPreferences`
--

DROP TABLE IF EXISTS `UserPreferences`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `UserPreferences` (
  `UPID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `StaffID` int(11) NOT NULL DEFAULT '0',
  `UserName` varchar(16) NOT NULL DEFAULT '',
  `PassWord` varchar(16) NOT NULL DEFAULT '',
  `CompWidth` int(11) NOT NULL DEFAULT '0',
  `MsgWidth` int(11) NOT NULL DEFAULT '0',
  `MsgFontSize` int(11) NOT NULL DEFAULT '0',
  `MsgHeaders` int(11) NOT NULL DEFAULT '0',
  `MsgCount` int(11) NOT NULL DEFAULT '0',
  `MsgOrder` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`UPID`),
  UNIQUE KEY `UPID_2` (`UPID`),
  KEY `UPID` (`UPID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `UserResolutions`
--

DROP TABLE IF EXISTS `UserResolutions`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `UserResolutions` (
  `URID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `UserID` int(11) NOT NULL,
  `ScreenRes` varchar(11) NOT NULL DEFAULT '0',
  `WindowRes` varchar(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`URID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `UserID` (`UserID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Window and Screen resolution of users';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `UserSecurity`
--

DROP TABLE IF EXISTS `UserSecurity`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `UserSecurity` (
  `USID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `UserID` int(11) NOT NULL DEFAULT '0',
  `PermissionID` int(11) NOT NULL DEFAULT '0',
  `Permission` varchar(32) NOT NULL DEFAULT '',
  PRIMARY KEY (`USID`),
  KEY `UserID` (`UserID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `UserSessions`
--

DROP TABLE IF EXISTS `UserSessions`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `UserSessions` (
  `USID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `UserID` int(11) NOT NULL DEFAULT '0',
  `SessionID` varchar(32) NOT NULL DEFAULT '',
  PRIMARY KEY (`USID`),
  KEY `SchoolIID` (`SchoolID`),
  KEY `UserID` (`UserID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `UserShortcuts`
--

DROP TABLE IF EXISTS `UserShortcuts`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `UserShortcuts` (
  `USID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `UserID` int(11) NOT NULL,
  `URL` varchar(128) NOT NULL,
  `Icon` varchar(32) NOT NULL,
  `Title` varchar(32) NOT NULL,
  `Sequence` int(11) NOT NULL,
  PRIMARY KEY (`USID`),
  KEY `UserID` (`UserID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `UserSignature`
--

DROP TABLE IF EXISTS `UserSignature`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `UserSignature` (
  `USIGID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `UserID` int(11) NOT NULL,
  `Signature` text NOT NULL,
  PRIMARY KEY (`USIGID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `UserID` (`UserID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `UserStatisticChoices`
--

DROP TABLE IF EXISTS `UserStatisticChoices`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `UserStatisticChoices` (
  `USCID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `USID` int(11) NOT NULL,
  `Sequence` int(11) NOT NULL,
  `Value` varchar(16) NOT NULL,
  `Label` varchar(48) NOT NULL,
  PRIMARY KEY (`USCID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `USID` (`USID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `UserStatisticGroups`
--

DROP TABLE IF EXISTS `UserStatisticGroups`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `UserStatisticGroups` (
  `USGID` int(11) NOT NULL AUTO_INCREMENT,
  `Name` varchar(16) NOT NULL DEFAULT '',
  `Description` varchar(64) NOT NULL DEFAULT '',
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `Sequence` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`USGID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `UserStatisticValues`
--

DROP TABLE IF EXISTS `UserStatisticValues`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `UserStatisticValues` (
  `USVID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `UserID` int(11) NOT NULL DEFAULT '0',
  `USID` int(11) NOT NULL DEFAULT '0',
  `Value` varchar(255) NOT NULL DEFAULT '',
  `ValueDate` date NOT NULL,
  PRIMARY KEY (`USVID`),
  KEY `CompanyID` (`SchoolID`),
  KEY `UserID` (`UserID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `UserStatistics`
--

DROP TABLE IF EXISTS `UserStatistics`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `UserStatistics` (
  `USID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `USGID` int(11) NOT NULL DEFAULT '0',
  `Sequence` int(11) NOT NULL DEFAULT '0',
  `Type` int(11) NOT NULL DEFAULT '1',
  `Name` varchar(32) NOT NULL DEFAULT '',
  `Description` varchar(255) NOT NULL DEFAULT '',
  `Public` int(11) NOT NULL DEFAULT '0',
  `ValidationType` int(11) NOT NULL DEFAULT '0' COMMENT ' 0=None, 1=Number, 2=Email, 3=Min Length, 4=Max Length, 5=Custom Regex',
  `ValidationPattern` varchar(64) NOT NULL,
  `Required` int(11) NOT NULL DEFAULT '0' COMMENT '0=Not Required, 1=Required',
  PRIMARY KEY (`USID`),
  KEY `CompanyID` (`SchoolID`),
  KEY `USGID` (`USGID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `UserSupport`
--

DROP TABLE IF EXISTS `UserSupport`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `UserSupport` (
  `USID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `USUID` int(11) NOT NULL,
  `UserID` int(11) NOT NULL,
  `DateTime` datetime NOT NULL,
  `IPAddress` varchar(64) NOT NULL,
  PRIMARY KEY (`USID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Track usage of Support ';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `UserSupportUsers`
--

DROP TABLE IF EXISTS `UserSupportUsers`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `UserSupportUsers` (
  `USUID` int(11) NOT NULL AUTO_INCREMENT,
  `Token` varchar(32) NOT NULL,
  `Username` varchar(128) NOT NULL,
  UNIQUE KEY `USIPID` (`USUID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `UserTextMsg`
--

DROP TABLE IF EXISTS `UserTextMsg`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `UserTextMsg` (
  `UTMID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `UserID` int(11) NOT NULL DEFAULT '0',
  `Email` varchar(64) NOT NULL DEFAULT '',
  `Email2` varchar(64) NOT NULL,
  `Pan2Text` int(11) NOT NULL DEFAULT '0',
  `Pan2Email` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`UTMID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `UserID` (`UserID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `UserTypes`
--

DROP TABLE IF EXISTS `UserTypes`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `UserTypes` (
  `UTID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `Name` char(32) NOT NULL DEFAULT '',
  `Description` char(128) NOT NULL DEFAULT '',
  `Sequence` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`UTID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `UserUpdateLogs`
--

DROP TABLE IF EXISTS `UserUpdateLogs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `UserUpdateLogs` (
  `UULID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `UserID` int(11) NOT NULL,
  `DateTime` datetime NOT NULL,
  `AuthorID` int(11) NOT NULL,
  `Notes` varchar(255) NOT NULL,
  PRIMARY KEY (`UULID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `UserID` (`UserID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `UserWeeklyStatus`
--

DROP TABLE IF EXISTS `UserWeeklyStatus`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `UserWeeklyStatus` (
  `UWSID` int(11) NOT NULL AUTO_INCREMENT,
  `CompanyID` int(11) NOT NULL,
  `UserID` int(11) NOT NULL,
  `Year` int(11) NOT NULL,
  `Week` int(11) NOT NULL,
  `Monday` text NOT NULL,
  `Tuesday` text NOT NULL,
  `Wednesday` text NOT NULL,
  `Thursday` text NOT NULL,
  `Friday` text NOT NULL,
  `Saturday` text NOT NULL,
  `Sunday` int(11) NOT NULL,
  PRIMARY KEY (`UWSID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `Users`
--

DROP TABLE IF EXISTS `Users`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Users` (
  `UserID` int(11) NOT NULL AUTO_INCREMENT,
  `PeopleID` int(11) NOT NULL DEFAULT '0',
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `UserTypeID` int(11) NOT NULL,
  `SupportID` bigint(20) NOT NULL,
  `Title` varchar(32) NOT NULL DEFAULT '',
  `Directory` int(11) NOT NULL DEFAULT '1',
  `TitleID` int(11) NOT NULL DEFAULT '0',
  `PayStatus` int(11) NOT NULL COMMENT '1=salary, 2=hourly',
  `PositionID` int(11) NOT NULL DEFAULT '0',
  `ManagerID` int(11) NOT NULL DEFAULT '0',
  `BuildingID` int(11) NOT NULL DEFAULT '0',
  `LocationID` int(11) NOT NULL DEFAULT '0',
  `FirstName` varchar(32) NOT NULL,
  `MiddleName` char(2) NOT NULL DEFAULT '',
  `LastName` varchar(32) NOT NULL DEFAULT '',
  `Suffix` varchar(5) NOT NULL,
  `NickName` varchar(16) NOT NULL,
  `Address1` varchar(64) NOT NULL,
  `Address2` varchar(64) NOT NULL,
  `City` varchar(32) NOT NULL DEFAULT '',
  `State` varchar(32) NOT NULL,
  `Zip` varchar(10) NOT NULL DEFAULT '',
  `HomeAddress1` varchar(24) NOT NULL DEFAULT '',
  `HomeAddress2` varchar(24) NOT NULL DEFAULT '',
  `HomeCity` varchar(24) NOT NULL DEFAULT '',
  `HomeState` varchar(24) NOT NULL,
  `HomeZip` varchar(10) NOT NULL DEFAULT '',
  `Spouse` varchar(32) NOT NULL DEFAULT '',
  `Dependants` varchar(255) NOT NULL DEFAULT '',
  `Country` varchar(24) NOT NULL DEFAULT '',
  `HomePhone` varchar(16) NOT NULL DEFAULT '',
  `WorkPhone1` varchar(16) NOT NULL DEFAULT '',
  `WorkExt1` varchar(5) NOT NULL DEFAULT '',
  `WorkPhone2` varchar(16) NOT NULL DEFAULT '',
  `WorkExt2` varchar(5) NOT NULL DEFAULT '',
  `TextPhone` varchar(16) NOT NULL DEFAULT '',
  `CellPhone` varchar(16) NOT NULL DEFAULT '',
  `FaxPhone` varchar(16) NOT NULL DEFAULT '',
  `Pager` varchar(16) NOT NULL DEFAULT '',
  `EMail1` varchar(64) NOT NULL DEFAULT '',
  `EMail1Verified` tinyint(1) NOT NULL,
  `EMail2` varchar(64) NOT NULL DEFAULT '',
  `EMail3` varchar(64) NOT NULL DEFAULT '',
  `EMail4` varchar(64) NOT NULL DEFAULT '',
  `EMail5` varchar(64) NOT NULL DEFAULT '',
  `Updated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Password` varchar(16) NOT NULL DEFAULT '',
  `EPassword` varchar(64) NOT NULL,
  `PWScheme` tinyint(4) NOT NULL DEFAULT '0' COMMENT '0=DES, 1=bcrypt',
  `PWChanged` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `PWAlert` int(11) NOT NULL DEFAULT '0',
  `XPassWord` varchar(32) NOT NULL DEFAULT '',
  `UserName` varchar(32) NOT NULL DEFAULT '',
  `LastLogin` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `LastURL` varchar(32) NOT NULL DEFAULT '',
  `Working` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Logout` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `UserLevel` int(11) NOT NULL DEFAULT '0',
  `MiddleInitial` char(1) NOT NULL DEFAULT '',
  `SuperUser` int(11) NOT NULL DEFAULT '0',
  `Current` int(11) NOT NULL DEFAULT '1',
  `Active` int(11) NOT NULL DEFAULT '0',
  `StaffCode` varchar(8) NOT NULL DEFAULT '',
  `Biography` text NOT NULL,
  `Subject` varchar(26) NOT NULL DEFAULT '',
  `PictureFile` varchar(64) NOT NULL DEFAULT '',
  `LoginCount` int(11) NOT NULL DEFAULT '0',
  `EMailLimit` int(11) NOT NULL DEFAULT '10000000',
  `Gender` int(11) NOT NULL,
  `DOB` date NOT NULL DEFAULT '0000-00-00',
  `Height` float NOT NULL DEFAULT '0',
  `Weight` int(11) NOT NULL DEFAULT '0',
  `RaceID` int(11) NOT NULL DEFAULT '0',
  `ReligionID` int(11) NOT NULL DEFAULT '0',
  `TZ` varchar(5) NOT NULL DEFAULT '',
  `TimeZone` varchar(64) NOT NULL,
  `UserStatus` varchar(16) NOT NULL DEFAULT '',
  `Expression` int(11) NOT NULL DEFAULT '0',
  `Staff` int(11) NOT NULL DEFAULT '0',
  `FamilyID` int(11) NOT NULL DEFAULT '0',
  `StudentID` int(11) NOT NULL DEFAULT '0',
  `EmployeeID` varchar(16) NOT NULL DEFAULT '0',
  `PIN` smallint(4) NOT NULL DEFAULT '1234',
  `StateID` varchar(32) NOT NULL,
  `ContactID` int(11) NOT NULL DEFAULT '0',
  `Level` int(11) NOT NULL DEFAULT '0',
  `ClassColumns` varchar(255) NOT NULL DEFAULT '',
  `Tchnum` int(11) NOT NULL DEFAULT '0',
  `Invisible` int(11) NOT NULL DEFAULT '0',
  `SSN` varchar(12) NOT NULL DEFAULT '',
  `LPPID` int(11) DEFAULT NULL,
  `ParentUserID` int(11) NOT NULL,
  `ParentSchoolID` int(11) NOT NULL,
  `ToSDate` date NOT NULL DEFAULT '0000-00-00',
  PRIMARY KEY (`UserID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `FamilyID` (`FamilyID`),
  KEY `StudentID` (`StudentID`),
  KEY `LastName` (`LastName`),
  KEY `Active` (`Active`),
  KEY `TZ` (`TZ`),
  KEY `Password` (`Password`),
  KEY `UserName` (`UserName`),
  KEY `ManagerID` (`ManagerID`),
  KEY `SupportID` (`SupportID`),
  KEY `EMail1` (`EMail1`),
  KEY `LPPID` (`LPPID`),
  CONSTRAINT `Users_ibfk_1` FOREIGN KEY (`LPPID`) REFERENCES `LunchPricePlans` (`LPPID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `VendorTypes`
--

DROP TABLE IF EXISTS `VendorTypes`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `VendorTypes` (
  `VenType` int(11) NOT NULL AUTO_INCREMENT,
  `VenTypeCode` varchar(16) NOT NULL DEFAULT '',
  `Description` varchar(32) NOT NULL DEFAULT '',
  PRIMARY KEY (`VenType`),
  UNIQUE KEY `VenType_2` (`VenType`),
  KEY `VenType` (`VenType`,`VenTypeCode`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `Visitors`
--

DROP TABLE IF EXISTS `Visitors`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Visitors` (
  `VisitorID` int(11) NOT NULL AUTO_INCREMENT,
  `Date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `LastSite` varchar(64) NOT NULL DEFAULT '',
  `SessionID` varchar(32) NOT NULL DEFAULT '0',
  `IPAddress` varchar(15) NOT NULL DEFAULT '',
  `HostName` varchar(50) NOT NULL DEFAULT '',
  PRIMARY KEY (`VisitorID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `WebSyncLogs`
--

DROP TABLE IF EXISTS `WebSyncLogs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `WebSyncLogs` (
  `WebSyncLogID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `UserID` int(11) NOT NULL DEFAULT '0',
  `SyncTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `IPAddress` varchar(16) NOT NULL DEFAULT '',
  `Hostname` varchar(128) NOT NULL DEFAULT '',
  `Comments` varchar(255) NOT NULL DEFAULT '',
  PRIMARY KEY (`WebSyncLogID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `UserID` (`UserID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `WebhookLogs`
--

DROP TABLE IF EXISTS `WebhookLogs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `WebhookLogs` (
  `WLID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `WHID` int(11) NOT NULL,
  `RequestHeaders` text NOT NULL,
  `RequestPayload` text NOT NULL,
  `ResponseHeaders` text NOT NULL,
  `ResponseBody` text NOT NULL,
  `Created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`WLID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `WHID` (`WHID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `Webhooks`
--

DROP TABLE IF EXISTS `Webhooks`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Webhooks` (
  `WHID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `UserID` int(11) NOT NULL,
  `FamilyID` int(11) NOT NULL,
  `StudentID` int(11) NOT NULL,
  `Title` varchar(48) NOT NULL,
  `URL` varchar(256) NOT NULL,
  `Event` varchar(36) NOT NULL,
  `Secret` varchar(36) NOT NULL,
  `Logging` tinyint(1) NOT NULL DEFAULT '0',
  `Type` varchar(10) NOT NULL,
  `Enabled` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`WHID`),
  KEY `Event` (`Event`),
  KEY `SchoolID` (`SchoolID`),
  KEY `UserID` (`UserID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `admission_additional_fields`
--

DROP TABLE IF EXISTS `admission_additional_fields`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `admission_additional_fields` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `application_id` bigint(20) NOT NULL,
  `student_additional_field_id` int(11) NOT NULL,
  `required` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `index_unique_admission_additional_fields` (`application_id`,`student_additional_field_id`),
  KEY `index_admission_additional_fields_on_application_id` (`application_id`),
  KEY `index_admission_additional_fields_on_student_additional_field_id` (`student_additional_field_id`),
  CONSTRAINT `fk_rails_7f8df46f97` FOREIGN KEY (`student_additional_field_id`) REFERENCES `StudentStatistics` (`SSID`),
  CONSTRAINT `fk_rails_a7ebb4e5dc` FOREIGN KEY (`application_id`) REFERENCES `admission_applications` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `admission_additional_values`
--

DROP TABLE IF EXISTS `admission_additional_values`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `admission_additional_values` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `applicant_id` bigint(20) NOT NULL,
  `student_additional_field_id` int(11) NOT NULL,
  `value` varchar(255) NOT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `index_unique_admission_additional_values` (`applicant_id`,`student_additional_field_id`),
  KEY `index_admission_additional_values_on_applicant_id` (`applicant_id`),
  KEY `index_admission_additional_values_on_student_additional_field_id` (`student_additional_field_id`),
  CONSTRAINT `fk_rails_667a643c7c` FOREIGN KEY (`applicant_id`) REFERENCES `admission_applicants` (`id`),
  CONSTRAINT `fk_rails_af9c7cd59b` FOREIGN KEY (`student_additional_field_id`) REFERENCES `StudentStatistics` (`SSID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `admission_agreement_versions`
--

DROP TABLE IF EXISTS `admission_agreement_versions`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `admission_agreement_versions` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `agreement_id` bigint(20) NOT NULL,
  `body` text,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index_admission_agreement_versions_on_agreement_id` (`agreement_id`),
  CONSTRAINT `fk_rails_2cbabb6c8d` FOREIGN KEY (`agreement_id`) REFERENCES `admission_agreements` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `admission_agreements`
--

DROP TABLE IF EXISTS `admission_agreements`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `admission_agreements` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `school_id` int(11) NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  `body` text,
  `archived` tinyint(1) NOT NULL DEFAULT '0',
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index_admission_agreements_on_school_id` (`school_id`),
  CONSTRAINT `fk_rails_e6cf82787d` FOREIGN KEY (`school_id`) REFERENCES `Schools` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `admission_applicant_agreements`
--

DROP TABLE IF EXISTS `admission_applicant_agreements`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `admission_applicant_agreements` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `applicant_id` bigint(20) NOT NULL,
  `agreement_id` bigint(20) NOT NULL,
  `response` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `index_unique_admission_applicant_agreements` (`applicant_id`,`agreement_id`),
  KEY `index_admission_applicant_agreements_on_applicant_id` (`applicant_id`),
  KEY `index_admission_applicant_agreements_on_agreement_id` (`agreement_id`),
  CONSTRAINT `fk_rails_222c95f4b9` FOREIGN KEY (`applicant_id`) REFERENCES `admission_applicants` (`id`),
  CONSTRAINT `fk_rails_ab34604e32` FOREIGN KEY (`agreement_id`) REFERENCES `admission_agreements` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `admission_applicant_checkboxes`
--

DROP TABLE IF EXISTS `admission_applicant_checkboxes`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `admission_applicant_checkboxes` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `applicant_id` bigint(20) NOT NULL,
  `checkbox_id` bigint(20) NOT NULL,
  `user_id` int(11) DEFAULT NULL,
  `checked` tinyint(1) NOT NULL DEFAULT '0',
  `feedback` text,
  `checked_at` date DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `index_unique_admission_applicant_checkboxes` (`applicant_id`,`checkbox_id`),
  KEY `index_admission_applicant_checkboxes_on_applicant_id` (`applicant_id`),
  KEY `index_admission_applicant_checkboxes_on_checkbox_id` (`checkbox_id`),
  KEY `index_admission_applicant_checkboxes_on_user_id` (`user_id`),
  CONSTRAINT `fk_rails_3de93a72b5` FOREIGN KEY (`checkbox_id`) REFERENCES `admission_checkboxes` (`id`),
  CONSTRAINT `fk_rails_83afd0a77c` FOREIGN KEY (`user_id`) REFERENCES `Users` (`UserID`),
  CONSTRAINT `fk_rails_e342c164be` FOREIGN KEY (`applicant_id`) REFERENCES `admission_applicants` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `admission_applicant_documents`
--

DROP TABLE IF EXISTS `admission_applicant_documents`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `admission_applicant_documents` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `applicant_id` bigint(20) NOT NULL,
  `document_id` bigint(20) NOT NULL,
  `filename` varchar(255) DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `index_unique_admission_applicant_documents` (`applicant_id`,`document_id`),
  KEY `index_admission_applicant_documents_on_applicant_id` (`applicant_id`),
  KEY `index_admission_applicant_documents_on_document_id` (`document_id`),
  CONSTRAINT `fk_rails_2d44b3f4bc` FOREIGN KEY (`document_id`) REFERENCES `admission_documents` (`id`),
  CONSTRAINT `fk_rails_5a0da09d81` FOREIGN KEY (`applicant_id`) REFERENCES `admission_applicants` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `admission_applicant_essays`
--

DROP TABLE IF EXISTS `admission_applicant_essays`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `admission_applicant_essays` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `applicant_id` bigint(20) NOT NULL,
  `essay_id` bigint(20) NOT NULL,
  `body` text,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `index_unique_admission_applicant_essays` (`applicant_id`,`essay_id`),
  KEY `index_admission_applicant_essays_on_applicant_id` (`applicant_id`),
  KEY `index_admission_applicant_essays_on_essay_id` (`essay_id`),
  CONSTRAINT `fk_rails_5c680315db` FOREIGN KEY (`essay_id`) REFERENCES `admission_essays` (`id`),
  CONSTRAINT `fk_rails_cbe9268650` FOREIGN KEY (`applicant_id`) REFERENCES `admission_applicants` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `admission_applicant_medicals`
--

DROP TABLE IF EXISTS `admission_applicant_medicals`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `admission_applicant_medicals` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `applicant_id` bigint(20) NOT NULL,
  `allergies` text,
  `alerts` text,
  `comments` text,
  `healthy` tinyint(1) NOT NULL DEFAULT '0',
  `asthma` tinyint(1) NOT NULL DEFAULT '0',
  `diabetes` tinyint(1) NOT NULL DEFAULT '0',
  `seizures` tinyint(1) NOT NULL DEFAULT '0',
  `deafness` tinyint(1) NOT NULL DEFAULT '0',
  `add` tinyint(1) NOT NULL DEFAULT '0',
  `bladder` tinyint(1) NOT NULL DEFAULT '0',
  `hemophiliac` tinyint(1) NOT NULL DEFAULT '0',
  `sicklecell` tinyint(1) NOT NULL DEFAULT '0',
  `sight_impairment` tinyint(1) NOT NULL DEFAULT '0',
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `index_unique_admission_applicant_medicals` (`applicant_id`),
  KEY `index_admission_applicant_medicals_on_applicant_id` (`applicant_id`),
  CONSTRAINT `fk_rails_50f29d45b8` FOREIGN KEY (`applicant_id`) REFERENCES `admission_applicants` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `admission_applicant_races`
--

DROP TABLE IF EXISTS `admission_applicant_races`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `admission_applicant_races` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `applicant_id` bigint(20) NOT NULL,
  `race_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `index_unique_admission_applicant_races` (`applicant_id`,`race_id`),
  KEY `index_admission_applicant_races_on_applicant_id` (`applicant_id`),
  KEY `index_admission_applicant_races_on_race_id` (`race_id`),
  CONSTRAINT `fk_rails_89cc95c3ef` FOREIGN KEY (`applicant_id`) REFERENCES `admission_applicants` (`id`),
  CONSTRAINT `fk_rails_be47c57793` FOREIGN KEY (`race_id`) REFERENCES `StudentRaces` (`SRID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `admission_applicants`
--

DROP TABLE IF EXISTS `admission_applicants`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `admission_applicants` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `application_id` bigint(20) NOT NULL,
  `family_id` int(11) NOT NULL,
  `student_id` int(11) DEFAULT NULL,
  `first_name` varchar(255) NOT NULL,
  `middle_name` varchar(255) DEFAULT NULL,
  `last_name` varchar(255) NOT NULL,
  `suffix` varchar(255) DEFAULT NULL,
  `date_of_birth` date NOT NULL,
  `grade` int(11) NOT NULL,
  `nickname` varchar(255) DEFAULT NULL,
  `gender` varchar(255) DEFAULT NULL,
  `ethnicity` varchar(255) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `cell_phone` varchar(255) DEFAULT NULL,
  `work_phone` varchar(255) DEFAULT NULL,
  `returning` tinyint(1) NOT NULL DEFAULT '0',
  `state` int(11) NOT NULL DEFAULT '0',
  `submitted_at` datetime DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  `status_id` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `index_unique_admission_applicants` (`application_id`,`family_id`,`student_id`),
  KEY `index_admission_applicants_on_application_id` (`application_id`),
  KEY `index_admission_applicants_on_family_id` (`family_id`),
  KEY `index_admission_applicants_on_student_id` (`student_id`),
  KEY `index_admission_applicants_on_status_id` (`status_id`),
  CONSTRAINT `fk_rails_2d29ad1573` FOREIGN KEY (`family_id`) REFERENCES `Families` (`FamilyID`),
  CONSTRAINT `fk_rails_484850a0c8` FOREIGN KEY (`application_id`) REFERENCES `admission_applications` (`id`),
  CONSTRAINT `fk_rails_6a5003d576` FOREIGN KEY (`status_id`) REFERENCES `admission_statuses` (`id`),
  CONSTRAINT `fk_rails_6ecea045fb` FOREIGN KEY (`student_id`) REFERENCES `Students` (`StudentID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `admission_application_agreements`
--

DROP TABLE IF EXISTS `admission_application_agreements`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `admission_application_agreements` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `application_id` bigint(20) NOT NULL,
  `agreement_id` bigint(20) NOT NULL,
  `required` tinyint(1) NOT NULL DEFAULT '0',
  `position` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `index_unique_admission_application_agreements` (`application_id`,`agreement_id`),
  KEY `index_admission_application_agreements_on_application_id` (`application_id`),
  KEY `index_admission_application_agreements_on_agreement_id` (`agreement_id`),
  CONSTRAINT `fk_rails_3b8045da7b` FOREIGN KEY (`application_id`) REFERENCES `admission_applications` (`id`),
  CONSTRAINT `fk_rails_becc9df04a` FOREIGN KEY (`agreement_id`) REFERENCES `admission_agreements` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `admission_application_attachments`
--

DROP TABLE IF EXISTS `admission_application_attachments`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `admission_application_attachments` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `application_id` bigint(20) NOT NULL,
  `attachment_id` bigint(20) NOT NULL,
  `position` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `index_unique_admission_application_attachments` (`application_id`,`attachment_id`),
  KEY `index_admission_application_attachments_on_application_id` (`application_id`),
  KEY `index_admission_application_attachments_on_attachment_id` (`attachment_id`),
  CONSTRAINT `fk_rails_26c1386137` FOREIGN KEY (`application_id`) REFERENCES `admission_applications` (`id`),
  CONSTRAINT `fk_rails_7a462e3581` FOREIGN KEY (`attachment_id`) REFERENCES `admission_attachments` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `admission_application_checkboxes`
--

DROP TABLE IF EXISTS `admission_application_checkboxes`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `admission_application_checkboxes` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `application_id` bigint(20) NOT NULL,
  `checkbox_id` bigint(20) NOT NULL,
  `internal` tinyint(1) NOT NULL DEFAULT '0',
  `position` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `index_unique_admission_application_checkboxes` (`application_id`,`checkbox_id`),
  KEY `index_admission_application_checkboxes_on_application_id` (`application_id`),
  KEY `index_admission_application_checkboxes_on_checkbox_id` (`checkbox_id`),
  CONSTRAINT `fk_rails_5df2ba6553` FOREIGN KEY (`application_id`) REFERENCES `admission_applications` (`id`),
  CONSTRAINT `fk_rails_cc2a4ca1e7` FOREIGN KEY (`checkbox_id`) REFERENCES `admission_checkboxes` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `admission_application_documents`
--

DROP TABLE IF EXISTS `admission_application_documents`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `admission_application_documents` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `application_id` bigint(20) NOT NULL,
  `document_id` bigint(20) NOT NULL,
  `required` tinyint(1) NOT NULL DEFAULT '0',
  `position` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `index_unique_admission_application_documents` (`application_id`,`document_id`),
  KEY `index_admission_application_documents_on_application_id` (`application_id`),
  KEY `index_admission_application_documents_on_document_id` (`document_id`),
  CONSTRAINT `fk_rails_9c3140de98` FOREIGN KEY (`document_id`) REFERENCES `admission_documents` (`id`),
  CONSTRAINT `fk_rails_c531e4733a` FOREIGN KEY (`application_id`) REFERENCES `admission_applications` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `admission_application_essays`
--

DROP TABLE IF EXISTS `admission_application_essays`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `admission_application_essays` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `application_id` bigint(20) NOT NULL,
  `essay_id` bigint(20) NOT NULL,
  `required` tinyint(1) NOT NULL DEFAULT '0',
  `position` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `index_unique_admission_application_essays` (`application_id`,`essay_id`),
  KEY `index_admission_application_essays_on_application_id` (`application_id`),
  KEY `index_admission_application_essays_on_essay_id` (`essay_id`),
  CONSTRAINT `fk_rails_18075ba59a` FOREIGN KEY (`essay_id`) REFERENCES `admission_essays` (`id`),
  CONSTRAINT `fk_rails_9378b9971b` FOREIGN KEY (`application_id`) REFERENCES `admission_applications` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `admission_application_grades`
--

DROP TABLE IF EXISTS `admission_application_grades`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `admission_application_grades` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `application_id` bigint(20) NOT NULL,
  `grade` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `index_unique_admission_application_grades` (`application_id`,`grade`),
  KEY `index_admission_application_grades_on_application_id` (`application_id`),
  CONSTRAINT `fk_rails_6757aad271` FOREIGN KEY (`application_id`) REFERENCES `admission_applications` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `admission_applications`
--

DROP TABLE IF EXISTS `admission_applications`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `admission_applications` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `school_id` int(11) NOT NULL,
  `school_year_id` int(11) NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  `enrollment` tinyint(1) NOT NULL DEFAULT '0',
  `open` tinyint(1) NOT NULL DEFAULT '0',
  `new_students` tinyint(1) NOT NULL DEFAULT '0',
  `returning_students` tinyint(1) NOT NULL DEFAULT '0',
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  `welcome_message` text,
  `completion_message` text,
  `require_medical` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `index_admission_applications_on_school_id` (`school_id`),
  KEY `index_admission_applications_on_school_year_id` (`school_year_id`),
  CONSTRAINT `fk_rails_2a40973a23` FOREIGN KEY (`school_id`) REFERENCES `Schools` (`SchoolID`),
  CONSTRAINT `fk_rails_692a52f0bf` FOREIGN KEY (`school_year_id`) REFERENCES `SchoolYears` (`SchoolYearID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `admission_attachments`
--

DROP TABLE IF EXISTS `admission_attachments`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `admission_attachments` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `school_id` int(11) NOT NULL,
  `filename` varchar(255) DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `description` varchar(255) DEFAULT NULL,
  `archived` tinyint(1) NOT NULL DEFAULT '0',
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`id`),
  KEY `fk_rails_71a870b58f` (`school_id`),
  CONSTRAINT `fk_rails_71a870b58f` FOREIGN KEY (`school_id`) REFERENCES `Schools` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `admission_checkboxes`
--

DROP TABLE IF EXISTS `admission_checkboxes`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `admission_checkboxes` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `school_id` int(11) NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  `description` varchar(255) DEFAULT NULL,
  `archived` tinyint(1) NOT NULL DEFAULT '0',
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index_admission_checkboxes_on_school_id` (`school_id`),
  CONSTRAINT `fk_rails_af273e4d61` FOREIGN KEY (`school_id`) REFERENCES `Schools` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `admission_configs`
--

DROP TABLE IF EXISTS `admission_configs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `admission_configs` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `school_id` int(11) NOT NULL,
  `school_year_id` int(11) DEFAULT NULL,
  `welcome_message` text,
  `registration` tinyint(1) NOT NULL DEFAULT '0',
  `portal` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `index_admission_configs_on_school_id` (`school_id`),
  KEY `index_admission_configs_on_school_year_id` (`school_year_id`),
  CONSTRAINT `fk_rails_0205643132` FOREIGN KEY (`school_year_id`) REFERENCES `SchoolYears` (`SchoolYearID`),
  CONSTRAINT `fk_rails_9234b9e78d` FOREIGN KEY (`school_id`) REFERENCES `Schools` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `admission_contact_revisions`
--

DROP TABLE IF EXISTS `admission_contact_revisions`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `admission_contact_revisions` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `school_year_id` int(11) NOT NULL,
  `family_id` int(11) NOT NULL,
  `contact_family_id` int(11) DEFAULT NULL,
  `title_id` int(11) DEFAULT NULL,
  `relationship_id` int(11) DEFAULT NULL,
  `first_name` varchar(24) NOT NULL DEFAULT '',
  `last_name` varchar(32) NOT NULL DEFAULT '',
  `address` varchar(64) NOT NULL DEFAULT '',
  `address_ext` varchar(64) NOT NULL DEFAULT '',
  `city` varchar(32) NOT NULL DEFAULT '',
  `state` varchar(32) NOT NULL DEFAULT '',
  `zip` varchar(10) NOT NULL DEFAULT '',
  `work_phone` varchar(24) NOT NULL DEFAULT '',
  `home_phone` varchar(24) NOT NULL DEFAULT '',
  `cell_phone` varchar(24) NOT NULL DEFAULT '',
  `email` varchar(128) NOT NULL DEFAULT '',
  `primary` tinyint(1) DEFAULT NULL,
  `emergency` tinyint(1) DEFAULT NULL,
  `pickup` tinyint(1) DEFAULT NULL,
  `applied` tinyint(1) NOT NULL DEFAULT '0',
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `index_unique_admission_contact_revisions` (`school_year_id`,`family_id`,`contact_family_id`),
  KEY `index_admission_contact_revisions_on_school_year_id` (`school_year_id`),
  KEY `index_admission_contact_revisions_on_family_id` (`family_id`),
  KEY `index_admission_contact_revisions_on_contact_family_id` (`contact_family_id`),
  KEY `index_admission_contact_revisions_on_title_id` (`title_id`),
  KEY `index_admission_contact_revisions_on_relationship_id` (`relationship_id`),
  CONSTRAINT `fk_rails_0a3e5a3a15` FOREIGN KEY (`title_id`) REFERENCES `Titles` (`TitleID`),
  CONSTRAINT `fk_rails_1a67874053` FOREIGN KEY (`contact_family_id`) REFERENCES `FamilyParents` (`FamilyParentID`),
  CONSTRAINT `fk_rails_599f5a4ac7` FOREIGN KEY (`school_year_id`) REFERENCES `SchoolYears` (`SchoolYearID`),
  CONSTRAINT `fk_rails_695338c125` FOREIGN KEY (`family_id`) REFERENCES `Families` (`FamilyID`),
  CONSTRAINT `fk_rails_696bb3f6ab` FOREIGN KEY (`relationship_id`) REFERENCES `Relationships` (`RelationshipID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `admission_documents`
--

DROP TABLE IF EXISTS `admission_documents`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `admission_documents` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `school_id` int(11) NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  `description` varchar(255) DEFAULT NULL,
  `archived` tinyint(1) NOT NULL DEFAULT '0',
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index_admission_documents_on_school_id` (`school_id`),
  CONSTRAINT `fk_rails_674978eb6e` FOREIGN KEY (`school_id`) REFERENCES `Schools` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `admission_essay_versions`
--

DROP TABLE IF EXISTS `admission_essay_versions`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `admission_essay_versions` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `essay_id` bigint(20) NOT NULL,
  `body` text,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index_admission_essay_versions_on_essay_id` (`essay_id`),
  CONSTRAINT `fk_rails_85074d154c` FOREIGN KEY (`essay_id`) REFERENCES `admission_essays` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `admission_essays`
--

DROP TABLE IF EXISTS `admission_essays`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `admission_essays` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `school_id` int(11) NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  `body` text,
  `archived` tinyint(1) NOT NULL DEFAULT '0',
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index_admission_essays_on_school_id` (`school_id`),
  CONSTRAINT `fk_rails_c92f25ac7b` FOREIGN KEY (`school_id`) REFERENCES `Schools` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `admission_family_revisions`
--

DROP TABLE IF EXISTS `admission_family_revisions`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `admission_family_revisions` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `school_year_id` int(11) NOT NULL,
  `family_id` int(11) NOT NULL,
  `address` varchar(64) NOT NULL DEFAULT '',
  `address_ext` varchar(64) NOT NULL DEFAULT '',
  `city` varchar(32) NOT NULL DEFAULT '',
  `state` varchar(32) NOT NULL DEFAULT '',
  `zip` varchar(10) NOT NULL DEFAULT '',
  `address_2` varchar(64) NOT NULL DEFAULT '',
  `address_ext_2` varchar(64) NOT NULL DEFAULT '',
  `city_2` varchar(32) NOT NULL DEFAULT '',
  `state_2` varchar(32) NOT NULL DEFAULT '',
  `zip_2` varchar(10) NOT NULL DEFAULT '',
  `directory` tinyint(1) NOT NULL DEFAULT '0',
  `directory_address` tinyint(1) NOT NULL DEFAULT '0',
  `directory_phone` tinyint(1) NOT NULL DEFAULT '0',
  `directory_email` tinyint(1) NOT NULL DEFAULT '0',
  `directory_cell` tinyint(1) NOT NULL DEFAULT '0',
  `applied` tinyint(1) NOT NULL DEFAULT '0',
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index_admission_family_revisions_on_school_year_id` (`school_year_id`),
  KEY `index_admission_family_revisions_on_family_id` (`family_id`),
  CONSTRAINT `fk_rails_6f1d8419fc` FOREIGN KEY (`school_year_id`) REFERENCES `SchoolYears` (`SchoolYearID`),
  CONSTRAINT `fk_rails_9eac8937c1` FOREIGN KEY (`family_id`) REFERENCES `Families` (`FamilyID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `admission_medical_revisions`
--

DROP TABLE IF EXISTS `admission_medical_revisions`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `admission_medical_revisions` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `school_year_id` int(11) NOT NULL,
  `family_id` int(11) NOT NULL,
  `physician` varchar(64) NOT NULL DEFAULT '',
  `physician_phone` varchar(16) NOT NULL DEFAULT '',
  `physician_address` varchar(128) NOT NULL DEFAULT '',
  `physician_address_ext` varchar(128) NOT NULL DEFAULT '',
  `physician_city` varchar(32) NOT NULL DEFAULT '',
  `physician_state` varchar(32) NOT NULL DEFAULT '',
  `physician_zip` varchar(10) NOT NULL DEFAULT '',
  `dentist` varchar(64) NOT NULL DEFAULT '',
  `dentist_phone` varchar(16) NOT NULL DEFAULT '',
  `dentist_address` varchar(128) NOT NULL DEFAULT '',
  `dentist_address_ext` varchar(128) NOT NULL DEFAULT '',
  `dentist_city` varchar(32) NOT NULL DEFAULT '',
  `dentist_state` varchar(32) NOT NULL DEFAULT '',
  `dentist_zip` varchar(10) NOT NULL DEFAULT '',
  `insurance_company` varchar(32) NOT NULL DEFAULT '',
  `insurance_plan` varchar(128) NOT NULL DEFAULT '',
  `insurance_group` varchar(24) NOT NULL DEFAULT '',
  `hospital` varchar(64) NOT NULL DEFAULT '',
  `comments` text,
  `applied` tinyint(1) NOT NULL DEFAULT '0',
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index_admission_medical_revisions_on_school_year_id` (`school_year_id`),
  KEY `index_admission_medical_revisions_on_family_id` (`family_id`),
  CONSTRAINT `fk_rails_74c7c57625` FOREIGN KEY (`family_id`) REFERENCES `Families` (`FamilyID`),
  CONSTRAINT `fk_rails_fbb70cfe8a` FOREIGN KEY (`school_year_id`) REFERENCES `SchoolYears` (`SchoolYearID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `admission_profile_fields`
--

DROP TABLE IF EXISTS `admission_profile_fields`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `admission_profile_fields` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `application_id` bigint(20) NOT NULL,
  `field` int(11) NOT NULL,
  `required` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `index_unique_admission_profile_fields` (`application_id`,`field`),
  KEY `index_admission_profile_fields_on_application_id` (`application_id`),
  CONSTRAINT `fk_rails_b9bb440bdf` FOREIGN KEY (`application_id`) REFERENCES `admission_applications` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `admission_registration_fields`
--

DROP TABLE IF EXISTS `admission_registration_fields`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `admission_registration_fields` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `school_id` int(11) NOT NULL,
  `field` int(11) NOT NULL,
  `required` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `index_unique_admission_registration_fields` (`school_id`,`field`),
  KEY `index_admission_registration_fields_on_school_id` (`school_id`),
  CONSTRAINT `fk_rails_afe3dea354` FOREIGN KEY (`school_id`) REFERENCES `Schools` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `admission_statuses`
--

DROP TABLE IF EXISTS `admission_statuses`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `admission_statuses` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `school_id` int(11) NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  `archived` tinyint(1) NOT NULL DEFAULT '0',
  `position` int(11) DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index_admission_statuses_on_school_id` (`school_id`),
  CONSTRAINT `fk_rails_e7a05350a2` FOREIGN KEY (`school_id`) REFERENCES `Schools` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ar_internal_metadata`
--

DROP TABLE IF EXISTS `ar_internal_metadata`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ar_internal_metadata` (
  `key` varchar(255) NOT NULL,
  `value` varchar(255) DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`key`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `metars`
--

DROP TABLE IF EXISTS `metars`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `metars` (
  `metar` varchar(255) NOT NULL DEFAULT '',
  `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `station` varchar(4) NOT NULL DEFAULT '',
  PRIMARY KEY (`station`),
  UNIQUE KEY `station` (`station`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `oauth_access_tokens`
--

DROP TABLE IF EXISTS `oauth_access_tokens`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `oauth_access_tokens` (
  `token_id` int(11) NOT NULL AUTO_INCREMENT,
  `access_token` varchar(40) NOT NULL,
  `client_id` varchar(80) NOT NULL,
  `school_id` int(11) DEFAULT NULL,
  `user_id` int(11) DEFAULT NULL,
  `family_id` int(11) DEFAULT NULL,
  `student_id` int(11) DEFAULT NULL,
  `expires` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `scope` varchar(100) DEFAULT NULL,
  `description` varchar(128) NOT NULL,
  PRIMARY KEY (`token_id`),
  KEY `user_id` (`user_id`),
  KEY `access_token` (`access_token`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `oauth_authorization_codes`
--

DROP TABLE IF EXISTS `oauth_authorization_codes`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `oauth_authorization_codes` (
  `authorization_code` varchar(40) NOT NULL,
  `client_id` varchar(80) NOT NULL,
  `user_id` int(11) NOT NULL DEFAULT '0',
  `school_id` int(11) NOT NULL DEFAULT '0',
  `family_id` int(11) NOT NULL DEFAULT '0',
  `student_id` int(11) NOT NULL DEFAULT '0',
  `redirect_uri` varchar(2000) DEFAULT NULL,
  `expires` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `scope` varchar(2000) DEFAULT NULL,
  PRIMARY KEY (`authorization_code`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `oauth_clients`
--

DROP TABLE IF EXISTS `oauth_clients`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `oauth_clients` (
  `client_id` varchar(80) NOT NULL,
  `client_secret` varchar(80) NOT NULL,
  `redirect_uri` varchar(2000) NOT NULL,
  `grant_types` varchar(80) DEFAULT NULL,
  `user_id` varchar(80) DEFAULT NULL,
  `name` varchar(64) NOT NULL,
  `description` varchar(256) NOT NULL,
  `website` varchar(128) NOT NULL,
  `photo` varchar(256) NOT NULL,
  `public` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`client_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `oauth_refresh_tokens`
--

DROP TABLE IF EXISTS `oauth_refresh_tokens`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `oauth_refresh_tokens` (
  `token_id` int(11) NOT NULL AUTO_INCREMENT,
  `refresh_token` varchar(40) NOT NULL,
  `client_id` varchar(80) NOT NULL,
  `user_id` int(11) NOT NULL DEFAULT '0',
  `school_id` int(11) NOT NULL DEFAULT '0',
  `family_id` int(11) NOT NULL DEFAULT '0',
  `student_id` int(11) NOT NULL DEFAULT '0',
  `expires` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `scope` varchar(2000) DEFAULT NULL,
  PRIMARY KEY (`token_id`),
  KEY `refresh_token` (`refresh_token`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `oauth_users`
--

DROP TABLE IF EXISTS `oauth_users`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `oauth_users` (
  `username` varchar(255) NOT NULL,
  `password` varchar(2000) DEFAULT NULL,
  `first_name` varchar(255) DEFAULT NULL,
  `last_name` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`username`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `phinxlog`
--

DROP TABLE IF EXISTS `phinxlog`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `phinxlog` (
  `version` bigint(20) NOT NULL,
  `migration_name` varchar(100) DEFAULT NULL,
  `start_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `end_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `breakpoint` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`version`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `rc_cache`
--

DROP TABLE IF EXISTS `rc_cache`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `rc_cache` (
  `cache_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `cache_key` varchar(128) CHARACTER SET ascii NOT NULL,
  `created` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
  `data` longtext NOT NULL,
  `user_id` int(10) unsigned NOT NULL DEFAULT '0',
  `expires` datetime DEFAULT NULL,
  PRIMARY KEY (`cache_id`),
  KEY `user_cache_index` (`user_id`,`cache_key`),
  KEY `expires_index` (`expires`),
  CONSTRAINT `rc_cache_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `rc_users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `rc_cache_index`
--

DROP TABLE IF EXISTS `rc_cache_index`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `rc_cache_index` (
  `user_id` int(10) unsigned NOT NULL,
  `mailbox` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
  `expires` datetime DEFAULT NULL,
  `valid` tinyint(1) NOT NULL DEFAULT '0',
  `data` longtext NOT NULL,
  PRIMARY KEY (`user_id`,`mailbox`),
  KEY `expires_index` (`expires`),
  CONSTRAINT `user_id_fk_cache_index` FOREIGN KEY (`user_id`) REFERENCES `rc_users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `rc_cache_messages`
--

DROP TABLE IF EXISTS `rc_cache_messages`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `rc_cache_messages` (
  `user_id` int(10) unsigned NOT NULL,
  `mailbox` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
  `uid` int(11) unsigned NOT NULL DEFAULT '0',
  `expires` datetime DEFAULT NULL,
  `data` longtext NOT NULL,
  `flags` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`user_id`,`mailbox`,`uid`),
  KEY `expires_index` (`expires`),
  CONSTRAINT `user_id_fk_cache_messages` FOREIGN KEY (`user_id`) REFERENCES `rc_users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `rc_cache_shared`
--

DROP TABLE IF EXISTS `rc_cache_shared`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `rc_cache_shared` (
  `cache_key` varchar(255) CHARACTER SET ascii NOT NULL,
  `created` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
  `expires` datetime DEFAULT NULL,
  `data` longtext NOT NULL,
  KEY `expires_index` (`expires`),
  KEY `cache_key_index` (`cache_key`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `rc_cache_thread`
--

DROP TABLE IF EXISTS `rc_cache_thread`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `rc_cache_thread` (
  `user_id` int(10) unsigned NOT NULL,
  `mailbox` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
  `expires` datetime DEFAULT NULL,
  `data` longtext NOT NULL,
  PRIMARY KEY (`user_id`,`mailbox`),
  KEY `expires_index` (`expires`),
  CONSTRAINT `user_id_fk_cache_thread` FOREIGN KEY (`user_id`) REFERENCES `rc_users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `rc_contactgroupmembers`
--

DROP TABLE IF EXISTS `rc_contactgroupmembers`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `rc_contactgroupmembers` (
  `contactgroup_id` int(10) unsigned NOT NULL,
  `contact_id` int(10) unsigned NOT NULL DEFAULT '0',
  `created` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
  PRIMARY KEY (`contactgroup_id`,`contact_id`),
  KEY `contact_id_fk_contacts` (`contact_id`),
  CONSTRAINT `contact_id_fk_contacts` FOREIGN KEY (`contact_id`) REFERENCES `contacts` (`contact_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `contactgroup_id_fk_contactgroups` FOREIGN KEY (`contactgroup_id`) REFERENCES `contactgroups` (`contactgroup_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `rc_contactgroups`
--

DROP TABLE IF EXISTS `rc_contactgroups`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `rc_contactgroups` (
  `contactgroup_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned NOT NULL DEFAULT '0',
  `changed` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
  `del` tinyint(1) NOT NULL DEFAULT '0',
  `name` varchar(128) NOT NULL DEFAULT '',
  PRIMARY KEY (`contactgroup_id`),
  KEY `contactgroups_user_index` (`user_id`,`del`),
  CONSTRAINT `user_id_fk_contactgroups` FOREIGN KEY (`user_id`) REFERENCES `rc_users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `rc_contacts`
--

DROP TABLE IF EXISTS `rc_contacts`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `rc_contacts` (
  `contact_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `changed` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
  `del` tinyint(1) NOT NULL DEFAULT '0',
  `name` varchar(128) NOT NULL DEFAULT '',
  `email` varchar(128) NOT NULL,
  `firstname` varchar(128) NOT NULL DEFAULT '',
  `surname` varchar(128) NOT NULL DEFAULT '',
  `vcard` longtext,
  `words` text,
  `user_id` int(10) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`contact_id`),
  KEY `user_contacts_index` (`user_id`,`email`),
  CONSTRAINT `rc_contacts_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `rc_users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `rc_dictionary`
--

DROP TABLE IF EXISTS `rc_dictionary`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `rc_dictionary` (
  `user_id` int(10) unsigned DEFAULT NULL,
  `language` varchar(5) NOT NULL,
  `data` longtext NOT NULL,
  UNIQUE KEY `uniqueness` (`user_id`,`language`),
  CONSTRAINT `user_id_fk_dictionary` FOREIGN KEY (`user_id`) REFERENCES `rc_users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `rc_identities`
--

DROP TABLE IF EXISTS `rc_identities`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `rc_identities` (
  `identity_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned NOT NULL DEFAULT '0',
  `changed` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
  `del` tinyint(1) NOT NULL DEFAULT '0',
  `standard` tinyint(1) NOT NULL DEFAULT '0',
  `name` varchar(128) NOT NULL,
  `organization` varchar(128) NOT NULL DEFAULT '',
  `email` varchar(128) NOT NULL,
  `reply-to` varchar(128) NOT NULL DEFAULT '',
  `bcc` varchar(128) NOT NULL DEFAULT '',
  `signature` longtext,
  `html_signature` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`identity_id`),
  KEY `user_identities_index` (`user_id`,`del`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `rc_searches`
--

DROP TABLE IF EXISTS `rc_searches`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `rc_searches` (
  `search_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned NOT NULL,
  `type` int(3) NOT NULL DEFAULT '0',
  `name` varchar(128) NOT NULL,
  `data` text,
  PRIMARY KEY (`search_id`),
  UNIQUE KEY `uniqueness` (`user_id`,`type`,`name`),
  CONSTRAINT `user_id_fk_searches` FOREIGN KEY (`user_id`) REFERENCES `rc_users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `rc_session`
--

DROP TABLE IF EXISTS `rc_session`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `rc_session` (
  `sess_id` varchar(40) NOT NULL,
  `created` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
  `changed` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
  `ip` varchar(40) NOT NULL,
  `vars` mediumtext NOT NULL,
  PRIMARY KEY (`sess_id`),
  KEY `changed_index` (`changed`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `rc_system`
--

DROP TABLE IF EXISTS `rc_system`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `rc_system` (
  `name` varchar(64) NOT NULL,
  `value` mediumtext,
  PRIMARY KEY (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `rc_users`
--

DROP TABLE IF EXISTS `rc_users`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `rc_users` (
  `user_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `username` varchar(128) NOT NULL,
  `mail_host` varchar(128) NOT NULL,
  `created` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
  `last_login` datetime DEFAULT NULL,
  `language` varchar(5) DEFAULT NULL,
  `preferences` longtext,
  `failed_login` datetime DEFAULT NULL,
  `failed_login_counter` int(10) unsigned DEFAULT NULL,
  PRIMARY KEY (`user_id`),
  KEY `username_index` (`username`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `schema_migrations`
--

DROP TABLE IF EXISTS `schema_migrations`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `schema_migrations` (
  `version` varchar(255) NOT NULL,
  PRIMARY KEY (`version`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `session_stats`
--

DROP TABLE IF EXISTS `session_stats`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `session_stats` (
  `sid` varchar(32) NOT NULL DEFAULT '',
  `name` varchar(32) NOT NULL DEFAULT '',
  `start_time` varchar(14) NOT NULL DEFAULT '',
  `referer` varchar(250) NOT NULL DEFAULT '',
  `addr` varchar(15) NOT NULL DEFAULT '',
  `user_agent` varchar(250) NOT NULL DEFAULT '',
  KEY `session_identifier` (`name`,`sid`),
  KEY `start_time` (`start_time`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

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

-- Dump completed on 2019-02-21 16:16:11
