-- MySQL dump 10.13  Distrib 5.6.42-84.2, for Linux (x86_64)
--
-- Host: db2    Database: kidows
-- ------------------------------------------------------
-- Server version	5.6.39-83.1-log

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

--
-- Table structure for table `APIKeys`
--

DROP TABLE IF EXISTS `APIKeys`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `APIKeys` (
  `APIID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `APIKey` varchar(128) NOT NULL,
  `Created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`APIID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='API Keys';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `APILogs`
--

DROP TABLE IF EXISTS `APILogs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `APILogs` (
  `LogID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `UserID` int(11) NOT NULL,
  `Method` varchar(255) NOT NULL,
  `Token` varchar(255) NOT NULL,
  `Endpoint` varchar(255) NOT NULL,
  `Query` varchar(255) NOT NULL,
  `Status` int(11) NOT NULL,
  `DateTime` datetime NOT NULL,
  PRIMARY KEY (`LogID`),
  KEY `SchoolID` (`SchoolID`,`UserID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `APITokens`
--

DROP TABLE IF EXISTS `APITokens`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `APITokens` (
  `APITID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `APIToken` varchar(128) NOT NULL,
  `Created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`APITID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `Accounts`
--

DROP TABLE IF EXISTS `Accounts`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Accounts` (
  `AccountID` 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 '',
  `Type` int(11) NOT NULL,
  `AcctType` int(11) NOT NULL DEFAULT '0',
  `Description` varchar(64) NOT NULL DEFAULT '',
  `QBAccountName` varchar(128) NOT NULL DEFAULT '',
  `Number` int(11) NOT NULL DEFAULT '0',
  `Archived` int(11) NOT NULL,
  PRIMARY KEY (`AccountID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AcctActivityLog`
--

DROP TABLE IF EXISTS `AcctActivityLog`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `AcctActivityLog` (
  `AAID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `AuthorID` int(11) NOT NULL,
  `UserID` int(11) NOT NULL,
  `AlertLevel` int(11) NOT NULL DEFAULT '0',
  `Modified` datetime NOT NULL,
  `Date` date NOT NULL,
  `Activity` varchar(128) NOT NULL,
  `FamilyID` int(11) NOT NULL,
  `Amount` float(10,2) NOT NULL,
  `FBID` int(11) NOT NULL,
  `FDID` int(11) NOT NULL,
  `CCID` int(11) NOT NULL COMMENT 'Contact Company ID',
  PRIMARY KEY (`AAID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `Modified` (`Modified`),
  KEY `FamilyID` (`FamilyID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AcctCCFees`
--

DROP TABLE IF EXISTS `AcctCCFees`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `AcctCCFees` (
  `ACCFID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `AcctCCID` int(11) NOT NULL,
  `Amount` decimal(10,2) NOT NULL,
  PRIMARY KEY (`ACCFID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AcctCCTransactions`
--

DROP TABLE IF EXISTS `AcctCCTransactions`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `AcctCCTransactions` (
  `AcctCCID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `FamilyID` int(11) NOT NULL,
  `StudentID` int(11) NOT NULL,
  `AccountID` int(11) NOT NULL DEFAULT '0',
  `FBID` int(11) NOT NULL COMMENT 'FamilyBillingID',
  `DCWBID` int(11) NOT NULL COMMENT 'DaycareWeeklyBillingID',
  `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,
  `CCMemo` varchar(128) 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 (`AcctCCID`),
  KEY `CompanyID` (`SchoolID`),
  KEY `StudentID` (`StudentID`),
  KEY `SBID` (`FBID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AcctCategories`
--

DROP TABLE IF EXISTS `AcctCategories`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `AcctCategories` (
  `ACID` 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 (`ACID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AcctCharges`
--

DROP TABLE IF EXISTS `AcctCharges`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `AcctCharges` (
  `ACID` 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(10,2) NOT NULL DEFAULT '0.00',
  PRIMARY KEY (`ACID`),
  KEY `CompanyID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AcctConfig`
--

DROP TABLE IF EXISTS `AcctConfig`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `AcctConfig` (
  `ANSID` 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,
  `FederalTaxNum` varchar(32) NOT NULL,
  `TaxPercentage` float(10,2) NOT NULL,
  PRIMARY KEY (`ANSID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AcctCredits`
--

DROP TABLE IF EXISTS `AcctCredits`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `AcctCredits` (
  `ACID` 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(10,2) NOT NULL DEFAULT '0.00',
  `Percentage` int(11) NOT NULL,
  PRIMARY KEY (`ACID`),
  KEY `CompanyID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AcctDepositEntries`
--

DROP TABLE IF EXISTS `AcctDepositEntries`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `AcctDepositEntries` (
  `ADEID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `ADID` int(11) NOT NULL,
  `ATID` int(11) NOT NULL,
  PRIMARY KEY (`ADEID`),
  KEY `CompanyID` (`SchoolID`),
  KEY `ADID` (`ADID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Company Deposits - Customer Deposits';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AcctDeposits`
--

DROP TABLE IF EXISTS `AcctDeposits`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `AcctDeposits` (
  `ADID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `BAID` int(11) NOT NULL COMMENT 'Bank Account ID',
  `Label` varchar(32) NOT NULL,
  `EnteredDate` date NOT NULL,
  `DepositDate` date NOT NULL,
  `ProcessedDT` datetime NOT NULL,
  `AuthorID` int(11) NOT NULL,
  `Amount` decimal(10,2) NOT NULL,
  PRIMARY KEY (`ADID`),
  KEY `CompanyID` (`SchoolID`),
  KEY `BAID` (`BAID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Company Deposits';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AcctDwolla`
--

DROP TABLE IF EXISTS `AcctDwolla`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `AcctDwolla` (
  `ADWID` 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',
  `Alert` int(11) NOT NULL DEFAULT '0',
  `Name` varchar(32) NOT NULL DEFAULT '',
  `Description` text NOT NULL,
  `Amount` float NOT NULL DEFAULT '0',
  `ApplyConvenienceFee` int(11) NOT NULL DEFAULT '0' COMMENT 'Apply Convenience Fees',
  `Taxable` int(11) NOT NULL DEFAULT '0',
  `Editable` int(11) NOT NULL DEFAULT '0',
  `OwnerID` int(11) NOT NULL DEFAULT '0',
  `Maximum` int(11) NOT NULL DEFAULT '1',
  `BAID` int(11) NOT NULL COMMENT 'Bank Account ID',
  `IAID` int(11) NOT NULL COMMENT 'Income Account ID',
  `Message` text NOT NULL,
  `PayScape` int(11) NOT NULL,
  PRIMARY KEY (`ADWID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ClassID` (`ClassID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AcctDwollaPayments`
--

DROP TABLE IF EXISTS `AcctDwollaPayments`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `AcctDwollaPayments` (
  `ADWPID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `ADWID` int(11) NOT NULL DEFAULT '0',
  `AcctInvID` int(11) NOT NULL,
  `UserID` int(11) NOT NULL DEFAULT '0',
  `Amount` float NOT NULL DEFAULT '0',
  `Label` varchar(32) NOT NULL DEFAULT '',
  `Memo` varchar(128) NOT NULL DEFAULT '',
  `DateTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Status` int(11) NOT NULL DEFAULT '0',
  `FirstName` varchar(32) NOT NULL DEFAULT '',
  `LastName` varchar(32) NOT NULL DEFAULT '',
  `Address1` varchar(32) NOT NULL DEFAULT '',
  `Address2` varchar(32) NOT NULL DEFAULT '',
  `City` varchar(48) NOT NULL DEFAULT '',
  `State` char(2) NOT NULL DEFAULT '',
  `Zip` varchar(10) NOT NULL DEFAULT '',
  `Phone` varchar(16) NOT NULL DEFAULT '',
  `Email` varchar(128) NOT NULL DEFAULT '',
  `AcctCCID` int(11) NOT NULL COMMENT 'Credit Card Transaction ID',
  `Processed` int(11) NOT NULL,
  `PayScape` int(11) NOT NULL,
  PRIMARY KEY (`ADWPID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `APPID` (`ADWID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AcctDwollaTransactions`
--

DROP TABLE IF EXISTS `AcctDwollaTransactions`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `AcctDwollaTransactions` (
  `AcctDWID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `UserID` int(11) NOT NULL,
  `FamilyID` int(11) NOT NULL,
  `AccountID` int(11) NOT NULL,
  `Amount` decimal(10,2) NOT NULL,
  `Memo` varchar(128) NOT NULL,
  `Status` int(16) NOT NULL COMMENT '1=submitted, 2=canceled, 3=processed',
  `CheckOutID` varchar(64) NOT NULL,
  `TransactionID` int(11) NOT NULL COMMENT 'Dwolla TransactionID',
  `SubmittedDT` datetime NOT NULL,
  `ClearingDT` datetime NOT NULL,
  PRIMARY KEY (`AcctDWID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `UserID` (`UserID`),
  KEY `FamilyID` (`FamilyID`),
  KEY `AccountID` (`AccountID`),
  KEY `CheckOutID` (`CheckOutID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AcctEFunds`
--

DROP TABLE IF EXISTS `AcctEFunds`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `AcctEFunds` (
  `AEFID` 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',
  `Alert` int(11) NOT NULL DEFAULT '0',
  `Name` varchar(32) NOT NULL DEFAULT '',
  `Description` varchar(128) NOT NULL,
  `Details` text NOT NULL,
  `Amount` decimal(10,2) NOT NULL DEFAULT '0.00',
  `AcctID` int(11) NOT NULL,
  `Taxable` int(11) NOT NULL DEFAULT '0',
  `Editable` int(11) NOT NULL DEFAULT '0',
  `OwnerID` int(11) NOT NULL DEFAULT '0',
  `MaximumCount` int(11) NOT NULL DEFAULT '1',
  `MaximumAmount` decimal(10,2) NOT NULL,
  PRIMARY KEY (`AEFID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ClassID` (`ClassID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AcctEFundsConfig`
--

DROP TABLE IF EXISTS `AcctEFundsConfig`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `AcctEFundsConfig` (
  `APEFCID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `eFundsEnabled` int(11) NOT NULL DEFAULT '1',
  `AccountNumber` varchar(64) NOT NULL DEFAULT '',
  `Username` varchar(64) NOT NULL DEFAULT '',
  `Password` varchar(255) NOT NULL DEFAULT '',
  `SecurityKey` varchar(54) NOT NULL,
  PRIMARY KEY (`APEFCID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AcctEFundsPayments`
--

DROP TABLE IF EXISTS `AcctEFundsPayments`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `AcctEFundsPayments` (
  `AEFPID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `AEFID` int(11) NOT NULL DEFAULT '0',
  `UserID` int(11) NOT NULL DEFAULT '0',
  `FamilyID` int(11) NOT NULL,
  `StudentID` int(11) NOT NULL,
  `Amount` decimal(10,2) NOT NULL DEFAULT '0.00',
  `AcctID` int(11) NOT NULL COMMENT 'Family Account  ID',
  `Label` varchar(32) NOT NULL DEFAULT '',
  `Memo` varchar(128) NOT NULL DEFAULT '',
  `DateTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Status` int(11) NOT NULL DEFAULT '0',
  `EF_Confirmation` int(11) NOT NULL,
  `EF_PaymentType` int(11) NOT NULL,
  `EF_Response` varchar(64) NOT NULL,
  `Processed` datetime NOT NULL,
  `Verified` datetime NOT NULL,
  PRIMARY KEY (`AEFPID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AcctEFundsUsers`
--

DROP TABLE IF EXISTS `AcctEFundsUsers`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `AcctEFundsUsers` (
  `AEFUID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `UserID` int(11) NOT NULL,
  `CreateDateTime` datetime NOT NULL,
  `UpdateDateTime` datetime NOT NULL,
  PRIMARY KEY (`AEFUID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AcctExpenseReports`
--

DROP TABLE IF EXISTS `AcctExpenseReports`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `AcctExpenseReports` (
  `TransactionID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `UserID` 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',
  `Amount` float(10,2) NOT NULL DEFAULT '0.00',
  `Comments` varchar(32) NOT NULL DEFAULT '',
  `ClassID` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`TransactionID`),
  KEY `TransactionID` (`TransactionID`),
  KEY `CompanylID` (`SchoolID`),
  KEY `UserID` (`UserID`),
  KEY `TransactionDate` (`TransactionDate`),
  KEY `Amount` (`Amount`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AcctExpenseStatus`
--

DROP TABLE IF EXISTS `AcctExpenseStatus`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `AcctExpenseStatus` (
  `ESID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `UserID` int(11) NOT NULL DEFAULT '0',
  `Amount` float NOT NULL DEFAULT '0',
  `Month` int(11) NOT NULL DEFAULT '0',
  `Year` int(11) NOT NULL DEFAULT '0',
  `SubmittedDate` date NOT NULL DEFAULT '0000-00-00',
  `ApprovedDate` date NOT NULL DEFAULT '0000-00-00',
  `ApprovedByID` int(11) NOT NULL DEFAULT '0',
  `PaidDate` date NOT NULL DEFAULT '0000-00-00',
  `PaidByID` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`ESID`),
  KEY `CompanyID` (`SchoolID`),
  KEY `UserID` (`UserID`),
  KEY `Month` (`Month`),
  KEY `Year` (`Year`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AcctHolds`
--

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

--
-- Table structure for table `AcctInv`
--

DROP TABLE IF EXISTS `AcctInv`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `AcctInv` (
  `AcctInvID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `ClassID` int(11) NOT NULL DEFAULT '0',
  `InvoiceNum` int(11) NOT NULL DEFAULT '0',
  `CreateDate` date NOT NULL DEFAULT '0000-00-00',
  `DueDate` date NOT NULL DEFAULT '0000-00-00',
  `RecieveDate` date NOT NULL DEFAULT '0000-00-00',
  `AuthorID` int(11) NOT NULL DEFAULT '0',
  `Status` int(11) NOT NULL DEFAULT '0',
  `FamilyID` int(11) NOT NULL DEFAULT '0',
  `CustomerAccountID` int(11) NOT NULL DEFAULT '0',
  `Description` varchar(255) NOT NULL DEFAULT '',
  `Amount` float(10,2) NOT NULL DEFAULT '0.00',
  PRIMARY KEY (`AcctInvID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `FamilyID` (`FamilyID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AcctInvConfig`
--

DROP TABLE IF EXISTS `AcctInvConfig`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `AcctInvConfig` (
  `ANSID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `FromAddress` varchar(254) NOT NULL,
  `Message` text NOT NULL,
  `ReturnEmail` varchar(64) NOT NULL,
  `OrgName` varchar(32) NOT NULL,
  `IncludeTaxID` int(11) NOT NULL,
  `IncludeTerms` int(11) NOT NULL,
  PRIMARY KEY (`ANSID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AcctInvItems`
--

DROP TABLE IF EXISTS `AcctInvItems`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `AcctInvItems` (
  `AcctInvItemID` int(11) NOT NULL AUTO_INCREMENT,
  `AcctInvID` int(11) NOT NULL DEFAULT '0',
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `StudentID` int(11) NOT NULL DEFAULT '0',
  `ClassID` int(11) NOT NULL DEFAULT '0',
  `Description` varchar(64) NOT NULL DEFAULT '',
  `Quantity` float NOT NULL DEFAULT '0',
  `Rate` float(10,2) NOT NULL DEFAULT '0.00',
  `Amount` float(10,2) NOT NULL DEFAULT '0.00',
  `ACID` int(11) NOT NULL DEFAULT '0' COMMENT 'Account Common Charge ID',
  PRIMARY KEY (`AcctInvItemID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `AcctInvID` (`AcctInvID`),
  KEY `ACID` (`ACID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AcctInvLogs`
--

DROP TABLE IF EXISTS `AcctInvLogs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `AcctInvLogs` (
  `AINVLID` int(11) NOT NULL AUTO_INCREMENT,
  `CompanyID` int(11) NOT NULL DEFAULT '0',
  `AcctINVID` int(11) NOT NULL DEFAULT '0',
  `UserID` int(11) NOT NULL DEFAULT '0',
  `DateTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Comments` varchar(64) NOT NULL DEFAULT '',
  PRIMARY KEY (`AINVLID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AcctInvTerms`
--

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

--
-- Table structure for table `AcctNotes`
--

DROP TABLE IF EXISTS `AcctNotes`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `AcctNotes` (
  `AcctNoteID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `FamilyID` int(11) NOT NULL DEFAULT '0',
  `Date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Comments` text NOT NULL,
  `Subject` varchar(32) NOT NULL DEFAULT '',
  `AuthorID` int(11) NOT NULL DEFAULT '0',
  `Updated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  PRIMARY KEY (`AcctNoteID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `FamilyID` (`FamilyID`),
  KEY `Date` (`Date`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AcctNotifierResults`
--

DROP TABLE IF EXISTS `AcctNotifierResults`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `AcctNotifierResults` (
  `ANRID` 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 (`ANRID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AcctPayJunction`
--

DROP TABLE IF EXISTS `AcctPayJunction`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `AcctPayJunction` (
  `APJID` 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',
  `Alert` int(11) NOT NULL DEFAULT '0',
  `Name` varchar(32) NOT NULL DEFAULT '',
  `Description` text NOT NULL,
  `Amount` float NOT NULL DEFAULT '0',
  `ApplyConvenienceFee` int(11) NOT NULL DEFAULT '0' COMMENT 'Apply Convenience Fees',
  `Taxable` int(11) NOT NULL DEFAULT '0',
  `Editable` int(11) NOT NULL DEFAULT '0',
  `OwnerID` int(11) NOT NULL DEFAULT '0',
  `Maximum` int(11) NOT NULL DEFAULT '1',
  `BAID` int(11) NOT NULL COMMENT 'Bank Account ID',
  `IAID` int(11) NOT NULL COMMENT 'Income Account ID',
  `Message` text NOT NULL,
  PRIMARY KEY (`APJID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ClassID` (`ClassID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AcctPayJunctionPayments`
--

DROP TABLE IF EXISTS `AcctPayJunctionPayments`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `AcctPayJunctionPayments` (
  `APJPID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `APJID` int(11) NOT NULL DEFAULT '0',
  `AcctInvID` int(11) NOT NULL,
  `UserID` int(11) NOT NULL DEFAULT '0',
  `Amount` float NOT NULL DEFAULT '0',
  `Label` varchar(32) NOT NULL DEFAULT '',
  `Memo` varchar(128) NOT NULL DEFAULT '',
  `DateTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Status` int(11) NOT NULL DEFAULT '0',
  `FirstName` varchar(32) NOT NULL DEFAULT '',
  `LastName` varchar(32) NOT NULL DEFAULT '',
  `Address1` varchar(32) NOT NULL DEFAULT '',
  `Address2` varchar(32) NOT NULL DEFAULT '',
  `City` varchar(48) NOT NULL DEFAULT '',
  `State` char(2) NOT NULL DEFAULT '',
  `Zip` varchar(10) NOT NULL DEFAULT '',
  `Phone` varchar(16) NOT NULL DEFAULT '',
  `Email` varchar(128) NOT NULL DEFAULT '',
  `AcctCCID` int(11) NOT NULL COMMENT 'Credit Card Transaction ID',
  `Processed` int(11) NOT NULL,
  PRIMARY KEY (`APJPID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `APPID` (`APJID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AcctPayPal`
--

DROP TABLE IF EXISTS `AcctPayPal`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `AcctPayPal` (
  `APPID` 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',
  `Alert` int(11) NOT NULL DEFAULT '0',
  `Name` varchar(32) NOT NULL DEFAULT '',
  `Description` text NOT NULL,
  `Amount` float NOT NULL DEFAULT '0',
  `Taxable` int(11) NOT NULL DEFAULT '0',
  `Editable` int(11) NOT NULL DEFAULT '0',
  `OwnerID` int(11) NOT NULL DEFAULT '0',
  `Maximum` int(11) NOT NULL DEFAULT '1',
  `ReturnURL` varchar(255) NOT NULL,
  `CancelURL` varchar(255) NOT NULL,
  PRIMARY KEY (`APPID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ClassID` (`ClassID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AcctPayPalConfig`
--

DROP TABLE IF EXISTS `AcctPayPalConfig`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `AcctPayPalConfig` (
  `APPCID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `PayPalEnabled` int(11) NOT NULL DEFAULT '1',
  `PayPalID` varchar(128) NOT NULL DEFAULT '',
  `IDToken` varchar(128) NOT NULL DEFAULT '',
  `TaxPercentage` float NOT NULL DEFAULT '0' COMMENT 'Moved to AcctConfig',
  `FederalTaxNum` varchar(32) NOT NULL COMMENT 'moved to AcctConfig',
  `Locale` varchar(4) NOT NULL,
  `CurrencyCode` varchar(4) NOT NULL,
  PRIMARY KEY (`APPCID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AcctPayPalPayments`
--

DROP TABLE IF EXISTS `AcctPayPalPayments`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `AcctPayPalPayments` (
  `APPPID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `ProjectID` int(11) NOT NULL DEFAULT '0',
  `APPID` int(11) NOT NULL DEFAULT '0',
  `AcctInvID` int(11) NOT NULL,
  `UserID` int(11) NOT NULL DEFAULT '0',
  `Amount` float NOT NULL DEFAULT '0',
  `Label` varchar(32) NOT NULL DEFAULT '',
  `Memo` varchar(128) NOT NULL DEFAULT '',
  `DateTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Status` int(11) NOT NULL DEFAULT '0',
  `FirstName` varchar(32) NOT NULL DEFAULT '',
  `LastName` varchar(32) NOT NULL DEFAULT '',
  `Address1` varchar(32) NOT NULL DEFAULT '',
  `Address2` varchar(32) NOT NULL DEFAULT '',
  `City` varchar(48) NOT NULL DEFAULT '',
  `State` char(2) NOT NULL DEFAULT '',
  `Zip` varchar(10) NOT NULL DEFAULT '',
  `Phone` varchar(16) NOT NULL DEFAULT '',
  `Email` varchar(128) NOT NULL DEFAULT '',
  `PP_Memo` varchar(128) NOT NULL DEFAULT '',
  `PP_Fee` float NOT NULL DEFAULT '0',
  `PP_Tx` varchar(32) NOT NULL DEFAULT '',
  `PP_Receipt` varchar(32) NOT NULL DEFAULT '',
  `Processed` int(11) NOT NULL,
  PRIMARY KEY (`APPPID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `APPID` (`APPID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AcctPayScape`
--

DROP TABLE IF EXISTS `AcctPayScape`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `AcctPayScape` (
  `APSID` 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',
  `Alert` int(11) NOT NULL DEFAULT '0',
  `Name` varchar(32) NOT NULL DEFAULT '',
  `Description` text NOT NULL,
  `Amount` float NOT NULL DEFAULT '0',
  `ApplyConvenienceFee` int(11) NOT NULL DEFAULT '0' COMMENT 'Apply Convenience Fees',
  `Taxable` int(11) NOT NULL DEFAULT '0',
  `Editable` int(11) NOT NULL DEFAULT '0',
  `OwnerID` int(11) NOT NULL DEFAULT '0',
  `Maximum` int(11) NOT NULL DEFAULT '1',
  `BAID` int(11) NOT NULL COMMENT 'Bank Account ID',
  `IAID` int(11) NOT NULL COMMENT 'Income Account ID',
  `Message` text NOT NULL,
  PRIMARY KEY (`APSID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ClassID` (`ClassID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AcctPayScapePayments`
--

DROP TABLE IF EXISTS `AcctPayScapePayments`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `AcctPayScapePayments` (
  `APSPID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `APSID` int(11) NOT NULL DEFAULT '0',
  `AcctInvID` int(11) NOT NULL,
  `UserID` int(11) NOT NULL DEFAULT '0',
  `Amount` float NOT NULL DEFAULT '0',
  `Label` varchar(32) NOT NULL DEFAULT '',
  `Memo` varchar(128) NOT NULL DEFAULT '',
  `DateTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Status` int(11) NOT NULL DEFAULT '0',
  `FirstName` varchar(32) NOT NULL DEFAULT '',
  `LastName` varchar(32) NOT NULL DEFAULT '',
  `Address1` varchar(32) NOT NULL DEFAULT '',
  `Address2` varchar(32) NOT NULL DEFAULT '',
  `City` varchar(48) NOT NULL DEFAULT '',
  `State` char(2) NOT NULL DEFAULT '',
  `Zip` varchar(10) NOT NULL DEFAULT '',
  `Phone` varchar(16) NOT NULL DEFAULT '',
  `Email` varchar(128) NOT NULL DEFAULT '',
  `AcctCCID` int(11) NOT NULL COMMENT 'Credit Card Transaction ID',
  `Processed` int(11) NOT NULL,
  PRIMARY KEY (`APSPID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `APPID` (`APSID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AcctPaymentAccounts`
--

DROP TABLE IF EXISTS `AcctPaymentAccounts`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `AcctPaymentAccounts` (
  `FPJAID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `FamilyID` int(11) NOT NULL,
  `PaymentType` int(11) NOT NULL COMMENT '1=PJ, 2=PS',
  `ProcessorID` int(11) NOT NULL COMMENT '7=PJ,8=PS',
  `TransactionID` int(11) NOT NULL,
  `CustomerID` int(11) NOT NULL,
  `Token` varchar(128) NOT NULL,
  `CreateDT` datetime NOT NULL,
  PRIMARY KEY (`FPJAID`),
  KEY `CompanyID` (`SchoolID`),
  KEY `CCID` (`FamilyID`),
  KEY `PaymentType` (`PaymentType`),
  KEY `TransactionID` (`TransactionID`),
  KEY `CustomerID` (`CustomerID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AcctPaymentConfig`
--

DROP TABLE IF EXISTS `AcctPaymentConfig`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `AcctPaymentConfig` (
  `APJCID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `PaymentType` int(11) NOT NULL COMMENT '1=PJ, 2=PS, 3=DW, 5=ST',
  `ProcessorID` int(11) NOT NULL,
  `Enabled` int(11) NOT NULL DEFAULT '1',
  `PrimaryProcessor` int(11) NOT NULL DEFAULT '1',
  `AccountNumber` varchar(254) NOT NULL DEFAULT '',
  `Username` varchar(64) NOT NULL DEFAULT '',
  `Password` varchar(255) NOT NULL DEFAULT '',
  `TerminalID` int(11) NOT NULL,
  `TerminalType` int(11) NOT NULL COMMENT '1=cc, 2=ach',
  `Terminal2ID` int(11) NOT NULL,
  `Terminal2Type` int(11) NOT NULL COMMENT '1=cc 2=ach',
  `APIKey` varchar(64) NOT NULL,
  `SecurityKey` varchar(54) NOT NULL,
  `ACHAllow` int(11) NOT NULL DEFAULT '1',
  `ACHFee` varchar(8) NOT NULL,
  `CCAllow` int(11) NOT NULL DEFAULT '1',
  `CCFee` varchar(8) NOT NULL,
  PRIMARY KEY (`APJCID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AcctPaymentMethods`
--

DROP TABLE IF EXISTS `AcctPaymentMethods`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `AcctPaymentMethods` (
  `APMID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `FamilyID` int(11) NOT NULL,
  `ProcessorID` int(11) NOT NULL COMMENT '6=PG,7=PJ, 8=PS',
  `TransactionID` int(11) NOT NULL,
  `VaultID` int(11) NOT NULL,
  `BillingID` int(11) NOT NULL,
  `MethodType` int(11) NOT NULL COMMENT '1=cc, 2=check',
  `DefaultMethod` int(11) NOT NULL DEFAULT '0',
  `Name` varchar(32) NOT NULL,
  `Address` varchar(64) NOT NULL,
  `City` varchar(32) NOT NULL,
  `State` varchar(32) NOT NULL,
  `Zip` varchar(16) NOT NULL,
  `CardType` int(11) NOT NULL,
  `CardName` varchar(16) NOT NULL,
  `ExpireMonth` int(11) NOT NULL,
  `ExpireYear` int(11) NOT NULL,
  `RoutingNum` varchar(16) NOT NULL,
  `AccountNum` varchar(24) NOT NULL,
  `Last4` varchar(8) NOT NULL,
  `PMID` int(11) NOT NULL,
  `Approval` varchar(32) NOT NULL,
  `ApprovalDT` datetime NOT NULL,
  `ApprovalName` varchar(32) NOT NULL,
  `UpdatedDT` datetime NOT NULL,
  `Locked` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`APMID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `FamilyID` (`FamilyID`),
  KEY `TransactionID` (`TransactionID`),
  KEY `VaultID` (`VaultID`),
  KEY `BillingID` (`BillingID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AcctTaxConfigCanada`
--

DROP TABLE IF EXISTS `AcctTaxConfigCanada`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `AcctTaxConfigCanada` (
  `ATCID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `Year` int(4) NOT NULL,
  `Code` varchar(4) NOT NULL,
  `CodeKey` varchar(16) NOT NULL,
  `Value` varchar(11) NOT NULL,
  PRIMARY KEY (`ATCID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AcctTransactions`
--

DROP TABLE IF EXISTS `AcctTransactions`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `AcctTransactions` (
  `ATID` int(11) NOT NULL AUTO_INCREMENT,
  `ParentATID` int(11) NOT NULL DEFAULT '0',
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `ClassID` int(11) NOT NULL DEFAULT '0',
  `AccountID` int(11) NOT NULL DEFAULT '0',
  `ACID` int(11) NOT NULL DEFAULT '0' COMMENT 'Common Charge ID',
  `AcctCommonCreditID` int(11) NOT NULL COMMENT 'Common Credit ID',
  `CCID` 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',
  `Payee` varchar(32) NOT NULL,
  `Amount` float(12,2) NOT NULL DEFAULT '0.00',
  `Comments` varchar(128) NOT NULL DEFAULT '',
  `AuthorID` int(11) NOT NULL DEFAULT '0',
  `Type` int(11) NOT NULL DEFAULT '0',
  `CheckNum` int(11) NOT NULL DEFAULT '0',
  `Cleared` int(11) NOT NULL DEFAULT '0',
  `Deposited` int(11) NOT NULL DEFAULT '0',
  `FamilyID` int(11) NOT NULL DEFAULT '0',
  `TID` int(11) NOT NULL DEFAULT '0' COMMENT 'Family Transaction ID',
  `FDID` int(11) NOT NULL DEFAULT '0' COMMENT 'Family Deposit ID',
  `FBID` int(11) NOT NULL DEFAULT '0' COMMENT 'Family Billing ID',
  `DTID` int(11) NOT NULL COMMENT 'Donor Transaction ID',
  `DDID` int(11) NOT NULL DEFAULT '0',
  `UDID` int(11) NOT NULL COMMENT 'User Deposit ID',
  `UserID` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`ATID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ClassID` (`ClassID`),
  KEY `AccountID` (`AccountID`),
  KEY `FamilyID` (`FamilyID`),
  KEY `FDID` (`FDID`),
  KEY `FBID` (`FBID`),
  KEY `DDID` (`DDID`),
  KEY `TID` (`TID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AcctTransactionsArchive`
--

DROP TABLE IF EXISTS `AcctTransactionsArchive`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `AcctTransactionsArchive` (
  `ATID` int(11) NOT NULL,
  `ParentATID` int(11) NOT NULL DEFAULT '0',
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `ClassID` int(11) NOT NULL DEFAULT '0',
  `AccountID` int(11) NOT NULL DEFAULT '0',
  `ACID` int(11) NOT NULL DEFAULT '0' COMMENT 'Common Charge ID',
  `AcctCommonCreditID` int(11) NOT NULL COMMENT 'Common Credit ID',
  `CCID` 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',
  `Payee` varchar(32) NOT NULL,
  `Amount` float(12,2) NOT NULL DEFAULT '0.00',
  `Comments` varchar(128) NOT NULL DEFAULT '',
  `AuthorID` int(11) NOT NULL DEFAULT '0',
  `Type` int(11) NOT NULL DEFAULT '0',
  `CheckNum` int(11) NOT NULL DEFAULT '0',
  `Cleared` int(11) NOT NULL DEFAULT '0',
  `Deposited` int(11) NOT NULL DEFAULT '0',
  `FamilyID` int(11) NOT NULL DEFAULT '0',
  `TID` int(11) NOT NULL DEFAULT '0' COMMENT 'Family Transaction ID',
  `FDID` int(11) NOT NULL DEFAULT '0' COMMENT 'Family Deposit ID',
  `FBID` int(11) NOT NULL DEFAULT '0' COMMENT 'Family Billing ID',
  `DDID` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`ATID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ClassID` (`ClassID`),
  KEY `AccountID` (`AccountID`),
  KEY `FamilyID` (`FamilyID`),
  KEY `FDID` (`FDID`),
  KEY `FBID` (`FBID`),
  KEY `DDID` (`DDID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AchievementStudents`
--

DROP TABLE IF EXISTS `AchievementStudents`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `AchievementStudents` (
  `ACHSID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `ACHID` int(11) NOT NULL DEFAULT '0',
  `StudentID` int(11) NOT NULL DEFAULT '0',
  `Grade` int(11) NOT NULL,
  `Number` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`ACHSID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `StudentID` (`StudentID`),
  KEY `CheckListID` (`ACHID`),
  KEY `ClassID` (`Number`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `Achievements`
--

DROP TABLE IF EXISTS `Achievements`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Achievements` (
  `ACHID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `SchoolYearID` int(11) NOT NULL DEFAULT '0',
  `Title` varchar(64) NOT NULL DEFAULT '',
  `Description` varchar(255) NOT NULL,
  `DateTaken` date NOT NULL,
  `Possible` decimal(10,2) NOT NULL,
  `Passing` decimal(10,2) NOT NULL,
  `Level1` decimal(10,2) NOT NULL,
  `Level2` decimal(10,2) NOT NULL,
  `Level3` decimal(10,2) NOT NULL,
  `Level4` decimal(10,2) NOT NULL,
  `Label1` varchar(16) NOT NULL,
  `Label2` varchar(16) NOT NULL,
  `Label3` varchar(16) NOT NULL,
  `Label4` varchar(16) NOT NULL,
  `NationalAvg` decimal(10,2) NOT NULL,
  `Grade` int(11) NOT NULL,
  `ParentACHID` int(11) NOT NULL,
  `UpdateDT` datetime NOT NULL,
  UNIQUE KEY `NewsID` (`ACHID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ClassID` (`SchoolYearID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AppUsers`
--

DROP TABLE IF EXISTS `AppUsers`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `AppUsers` (
  `AUID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `SchoolName` varchar(32) NOT NULL,
  `UserID` int(11) NOT NULL,
  `UserName` varchar(10) NOT NULL,
  `Level` varchar(10) NOT NULL,
  `BrowserInfo` varchar(64) NOT NULL,
  `Created` datetime NOT NULL,
  `Success` int(1) NOT NULL,
  PRIMARY KEY (`AUID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `UserID` (`UserID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AssetInventory`
--

DROP TABLE IF EXISTS `AssetInventory`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `AssetInventory` (
  `AID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `ParentAsset` int(11) NOT NULL,
  `ParentAssetID` int(11) NOT NULL,
  `LocationID` int(11) NOT NULL,
  `BuildingID` int(11) NOT NULL,
  `FacilityID` int(11) NOT NULL,
  `Type` int(11) NOT NULL,
  `Status` int(11) NOT NULL DEFAULT '1' COMMENT '1=Current, 0=Retired',
  `Code` varchar(32) NOT NULL,
  `Make` varchar(32) NOT NULL,
  `Model` varchar(32) NOT NULL,
  `SerialNumber` varchar(64) NOT NULL,
  `Details` tinytext NOT NULL,
  `AssignedToID` int(11) NOT NULL,
  `AssignedTo2ID` int(11) NOT NULL,
  `PurchaseDate` date NOT NULL,
  `PurchasePrice` float(10,2) NOT NULL,
  PRIMARY KEY (`AID`),
  KEY `CompanyID` (`SchoolID`),
  KEY `LocationID` (`LocationID`),
  KEY `BuildingID` (`BuildingID`),
  KEY `RoomID` (`FacilityID`),
  KEY `Type` (`Type`),
  KEY `Code` (`Code`),
  KEY `ParentAsset` (`ParentAsset`,`ParentAssetID`),
  KEY `ParentAssetID` (`ParentAssetID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AssetInventoryLogs`
--

DROP TABLE IF EXISTS `AssetInventoryLogs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `AssetInventoryLogs` (
  `AILID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `AID` int(11) NOT NULL,
  `AuthorID` int(11) NOT NULL,
  `CreatedDT` datetime NOT NULL,
  `Comments` varchar(128) NOT NULL,
  PRIMARY KEY (`AILID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `AID` (`AID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AssetStatisticChoices`
--

DROP TABLE IF EXISTS `AssetStatisticChoices`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `AssetStatisticChoices` (
  `ASCID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `ASID` int(11) NOT NULL,
  `Sequence` int(11) NOT NULL,
  `Value` varchar(16) NOT NULL,
  `Label` varchar(48) NOT NULL,
  PRIMARY KEY (`ASCID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ASID` (`ASID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AssetStatisticGroups`
--

DROP TABLE IF EXISTS `AssetStatisticGroups`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `AssetStatisticGroups` (
  `ASGID` 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 (`ASGID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AssetStatisticValues`
--

DROP TABLE IF EXISTS `AssetStatisticValues`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `AssetStatisticValues` (
  `ASVID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `AID` int(11) NOT NULL DEFAULT '0',
  `ASID` int(11) NOT NULL DEFAULT '0',
  `Value` varchar(255) NOT NULL DEFAULT '',
  `ValueDate` date NOT NULL,
  PRIMARY KEY (`ASVID`),
  KEY `CompanyID` (`SchoolID`),
  KEY `UserID` (`AID`),
  KEY `AID` (`AID`),
  KEY `ASID` (`ASID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AssetStatistics`
--

DROP TABLE IF EXISTS `AssetStatistics`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `AssetStatistics` (
  `ASID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `ASGID` 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',
  `Profile` tinyint(4) NOT NULL,
  PRIMARY KEY (`ASID`),
  KEY `CompanyID` (`SchoolID`),
  KEY `ASGID` (`ASGID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AssetTypes`
--

DROP TABLE IF EXISTS `AssetTypes`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `AssetTypes` (
  `ATID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `Description` text NOT NULL,
  `Name` varchar(32) NOT NULL DEFAULT '',
  `Sequence` int(11) NOT NULL,
  `Code` varchar(6) NOT NULL,
  PRIMARY KEY (`ATID`),
  KEY `CompanyID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `Associates`
--

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

--
-- Table structure for table `Attendance`
--

DROP TABLE IF EXISTS `Attendance`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Attendance` (
  `AttendID` 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',
  `StudentID` int(11) NOT NULL DEFAULT '0',
  `Date` date NOT NULL DEFAULT '0000-00-00',
  `DateTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Present` float(10,2) NOT NULL DEFAULT '0.00',
  `Hours` float(10,2) NOT NULL DEFAULT '0.00',
  `Absent` float(10,2) NOT NULL DEFAULT '0.00',
  `AbsentHours` float(10,2) NOT NULL DEFAULT '0.00',
  `Status` int(11) NOT NULL DEFAULT '0',
  `Type` int(11) NOT NULL DEFAULT '0',
  `ATID` int(11) NOT NULL,
  `Quarter` int(11) NOT NULL DEFAULT '0',
  `Tardy` int(11) NOT NULL DEFAULT '0',
  `Unexcused` int(11) NOT NULL DEFAULT '0',
  `Excused` int(11) NOT NULL DEFAULT '0',
  `Notes` varchar(32) NOT NULL DEFAULT '',
  `HomeRoom` int(11) NOT NULL DEFAULT '0',
  UNIQUE KEY `AttendID` (`AttendID`),
  KEY `ClassID` (`ClassID`),
  KEY `StudentID` (`StudentID`),
  KEY `SchoolYearID` (`SchoolYearID`),
  KEY `Quarter` (`Quarter`),
  KEY `SchoolID` (`SchoolID`),
  KEY `Date` (`Date`),
  KEY `HomeRoom` (`HomeRoom`),
  KEY `HomeroomScan` (`SchoolID`,`Date`,`HomeRoom`),
  KEY `Present` (`Present`),
  KEY `Count` (`SchoolID`,`Date`,`Present`,`HomeRoom`),
  KEY `ClassStudent` (`ClassID`,`StudentID`),
  KEY `ClassStudentDate` (`ClassID`,`StudentID`,`Date`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AttendanceCheck`
--

DROP TABLE IF EXISTS `AttendanceCheck`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `AttendanceCheck` (
  `ACID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `CheckDate` date NOT NULL,
  `CheckInTime` int(11) NOT NULL,
  `CheckOutTime` int(11) NOT NULL,
  `Reason` varchar(128) NOT NULL,
  `StudentID` int(11) NOT NULL,
  `GuestName` varchar(32) NOT NULL,
  `ToSee` varchar(32) NOT NULL,
  PRIMARY KEY (`ACID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `StudentID` (`StudentID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AttendanceHistory`
--

DROP TABLE IF EXISTS `AttendanceHistory`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `AttendanceHistory` (
  `AHID` 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',
  `Grade` int(11) NOT NULL,
  `Present` float(10,2) NOT NULL DEFAULT '0.00',
  `PresentHours` float(10,2) NOT NULL DEFAULT '0.00',
  `Absent` float(10,2) NOT NULL DEFAULT '0.00',
  `AbsentHours` float(10,2) NOT NULL DEFAULT '0.00',
  `Tardy` int(11) NOT NULL DEFAULT '0',
  `Unexcused` float(10,2) NOT NULL DEFAULT '0.00',
  `Excused` float(10,2) NOT NULL DEFAULT '0.00',
  `Notes` varchar(32) NOT NULL DEFAULT '',
  `Quarter` int(11) NOT NULL DEFAULT '0',
  `Imported` int(11) NOT NULL DEFAULT '0',
  `Updated` datetime NOT NULL,
  UNIQUE KEY `AttendID` (`AHID`),
  KEY `StudentID` (`StudentID`),
  KEY `SchoolYearID` (`SchoolYearID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `HomeroomScan` (`SchoolID`),
  KEY `Present` (`Present`),
  KEY `Count` (`SchoolID`,`Present`),
  KEY `ClassStudent` (`StudentID`),
  KEY `ClassStudentDate` (`StudentID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AttendanceScales`
--

DROP TABLE IF EXISTS `AttendanceScales`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `AttendanceScales` (
  `ASID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `Upper` decimal(11,2) NOT NULL DEFAULT '19.99',
  `Lower` decimal(11,2) NOT NULL DEFAULT '0.00',
  `Value` float NOT NULL DEFAULT '0',
  `Label` varchar(16) NOT NULL DEFAULT 'Absent',
  `Sequence` int(11) NOT NULL,
  PRIMARY KEY (`ASID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AttendanceSummary`
--

DROP TABLE IF EXISTS `AttendanceSummary`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `AttendanceSummary` (
  `ASID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `StudentID` int(11) NOT NULL,
  `SchoolYearID` int(11) NOT NULL,
  `Quarter` int(11) NOT NULL,
  `Date` date NOT NULL,
  `Present` float NOT NULL DEFAULT '0',
  `Absent` float NOT NULL DEFAULT '0',
  `Excused` tinyint(1) NOT NULL DEFAULT '0',
  `Unexcused` tinyint(1) NOT NULL DEFAULT '0',
  `Tardy` tinyint(4) NOT NULL DEFAULT '0',
  `AttendScore` decimal(11,2) NOT NULL,
  `PresentValue` float NOT NULL DEFAULT '0',
  `AbsentValue` float NOT NULL DEFAULT '0',
  `ExcusedValue` float NOT NULL DEFAULT '0',
  `UnexcusedValue` float NOT NULL DEFAULT '0',
  `ManualUpdate` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`ASID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `StudentID` (`StudentID`),
  KEY `SchoolYearID` (`SchoolYearID`),
  KEY `Date` (`Date`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AttendanceTypes`
--

DROP TABLE IF EXISTS `AttendanceTypes`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `AttendanceTypes` (
  `ATID` 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 (`ATID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AttendanceUsers`
--

DROP TABLE IF EXISTS `AttendanceUsers`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `AttendanceUsers` (
  `AUID` 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',
  `Date` date NOT NULL DEFAULT '0000-00-00',
  `Present` int(11) NOT NULL DEFAULT '0',
  `Tardy` int(11) NOT NULL DEFAULT '0',
  `Hours` decimal(10,0) NOT NULL,
  `Type` int(11) NOT NULL,
  `Quarter` int(11) NOT NULL DEFAULT '0',
  `Notes` varchar(32) NOT NULL DEFAULT '',
  UNIQUE KEY `AttendID` (`AUID`),
  KEY `StudentID` (`UserID`),
  KEY `SchoolYearID` (`SchoolYearID`),
  KEY `Quarter` (`Quarter`),
  KEY `SchoolID` (`SchoolID`),
  KEY `Date` (`Date`),
  KEY `HomeroomScan` (`SchoolID`,`Date`),
  KEY `Present` (`Present`),
  KEY `Count` (`SchoolID`,`Date`,`Present`),
  KEY `ClassStudent` (`UserID`),
  KEY `ClassStudentDate` (`UserID`,`Date`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AuctionDonorInfo`
--

DROP TABLE IF EXISTS `AuctionDonorInfo`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `AuctionDonorInfo` (
  `ADID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `CCID` int(11) NOT NULL DEFAULT '0',
  `Check1` int(11) NOT NULL DEFAULT '0',
  `Check1Date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Check1AuthorID` int(11) NOT NULL DEFAULT '0',
  `Check2` int(11) NOT NULL DEFAULT '0',
  `Check2Date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Check2AuthorID` int(11) NOT NULL DEFAULT '0',
  `Check3` int(11) NOT NULL DEFAULT '0',
  `Check3Date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Check3AuthorID` int(11) NOT NULL DEFAULT '0',
  `Check4` int(11) NOT NULL DEFAULT '0',
  `Check4Date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Check4AuthorID` int(11) NOT NULL DEFAULT '0',
  `Check5` int(11) NOT NULL DEFAULT '0',
  `Check5Date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Check5AuthorID` int(11) NOT NULL DEFAULT '0',
  `Comments` text NOT NULL,
  PRIMARY KEY (`ADID`),
  KEY `CompanyID` (`SchoolID`),
  KEY `CCID` (`CCID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AuctionItemBids`
--

DROP TABLE IF EXISTS `AuctionItemBids`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `AuctionItemBids` (
  `AIBID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `AID` int(11) NOT NULL,
  `AIID` int(11) NOT NULL,
  `UserID` int(11) NOT NULL,
  `Amount` decimal(10,2) NOT NULL,
  `BidUTS` int(11) NOT NULL,
  PRIMARY KEY (`AIBID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Auction Item Bids';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AuctionItemGroups`
--

DROP TABLE IF EXISTS `AuctionItemGroups`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `AuctionItemGroups` (
  `AIGID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `Name` varchar(16) NOT NULL DEFAULT '',
  `Description` varchar(64) NOT NULL DEFAULT '',
  `Sequence` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`AIGID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `Sequence` (`Sequence`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AuctionItemTemplates`
--

DROP TABLE IF EXISTS `AuctionItemTemplates`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `AuctionItemTemplates` (
  `AITID` int(11) NOT NULL AUTO_INCREMENT,
  `AIGID` int(11) NOT NULL,
  `SchoolID` int(11) NOT NULL,
  `CCID` int(11) NOT NULL,
  `Name` varchar(128) NOT NULL,
  `Description` text NOT NULL,
  `Amount` float NOT NULL,
  `Minimum` float NOT NULL,
  PRIMARY KEY (`AITID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AuctionItemTracking`
--

DROP TABLE IF EXISTS `AuctionItemTracking`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `AuctionItemTracking` (
  `AITID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `AID` int(11) NOT NULL,
  `AIID` int(11) NOT NULL,
  `UserID` int(11) NOT NULL,
  PRIMARY KEY (`AITID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Auction Item Tracking';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AuctionItems`
--

DROP TABLE IF EXISTS `AuctionItems`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `AuctionItems` (
  `AIID` int(11) NOT NULL AUTO_INCREMENT,
  `AIGID` int(11) NOT NULL DEFAULT '0',
  `AITID` int(11) NOT NULL,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `AuctionID` int(11) NOT NULL DEFAULT '0',
  `CCID` int(11) NOT NULL DEFAULT '0',
  `Name` varchar(128) NOT NULL DEFAULT '',
  `Description` text NOT NULL,
  `Sequence` int(11) NOT NULL DEFAULT '0',
  `Amount` float NOT NULL DEFAULT '0',
  `Minumum` float NOT NULL,
  `Received` int(11) NOT NULL DEFAULT '0',
  `Location` varchar(32) NOT NULL DEFAULT '',
  `Sold` float NOT NULL DEFAULT '0',
  `Expire` int(11) NOT NULL,
  PRIMARY KEY (`AIID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `AuctionID` (`AuctionID`),
  KEY `AITID` (`AITID`),
  KEY `AITID_2` (`AITID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AuctionUsers`
--

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

--
-- Table structure for table `Auctions`
--

DROP TABLE IF EXISTS `Auctions`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Auctions` (
  `AuctionID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `Name` varchar(32) NOT NULL DEFAULT '',
  `Status` int(11) NOT NULL COMMENT '1=Active, 0=NonActive',
  `Description` varchar(128) NOT NULL DEFAULT '',
  `Date` date NOT NULL DEFAULT '0000-00-00',
  `Goal` varchar(10) NOT NULL DEFAULT '0',
  `Online` int(11) NOT NULL DEFAULT '0',
  `Open` int(11) NOT NULL,
  PRIMARY KEY (`AuctionID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `Online` (`Online`),
  KEY `Open` (`Open`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `Backups`
--

DROP TABLE IF EXISTS `Backups`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Backups` (
  `BUID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `Filename` varchar(64) NOT NULL,
  `CreatedDate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `DeletedDate` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Deleted` tinyint(1) NOT NULL,
  PRIMARY KEY (`BUID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `BatchEmail`
--

DROP TABLE IF EXISTS `BatchEmail`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `BatchEmail` (
  `BEID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `Description` varchar(32) NOT NULL DEFAULT '',
  `Subject` varchar(128) NOT NULL DEFAULT '',
  `Message` mediumtext NOT NULL,
  `AuthorID` int(11) NOT NULL DEFAULT '0',
  `DateTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `ProcessDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `StartDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Notify` int(11) NOT NULL DEFAULT '0',
  `Status` int(32) NOT NULL DEFAULT '1',
  `Total` int(11) NOT NULL DEFAULT '0',
  `Sent` int(11) NOT NULL DEFAULT '0',
  `FromString` varchar(128) NOT NULL DEFAULT '',
  `ReplyTo` varchar(128) NOT NULL DEFAULT '',
  `DocumentID` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`BEID`),
  KEY `Status` (`Status`),
  KEY `DateTime` (`DateTime`),
  KEY `AuthorID` (`AuthorID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `BatchEmailData`
--

DROP TABLE IF EXISTS `BatchEmailData`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `BatchEmailData` (
  `BEDID` int(11) NOT NULL AUTO_INCREMENT,
  `BEID` int(11) NOT NULL DEFAULT '0',
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `ContactID` int(11) NOT NULL DEFAULT '0',
  `Email` varchar(255) NOT NULL DEFAULT '',
  `Name` varchar(32) NOT NULL,
  `Status` int(11) NOT NULL DEFAULT '0',
  `StatusMsg` varchar(128) NOT NULL DEFAULT '',
  `ConfirmDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  PRIMARY KEY (`BEDID`),
  KEY `BEID` (`BEID`),
  KEY `Email` (`Email`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `BatchEmailMsgAttachments`
--

DROP TABLE IF EXISTS `BatchEmailMsgAttachments`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `BatchEmailMsgAttachments` (
  `BEMAID` int(11) NOT NULL AUTO_INCREMENT,
  `BEID` int(11) NOT NULL,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `DocumentID` int(11) NOT NULL,
  `FileName` varchar(255) NOT NULL DEFAULT '',
  `Location` varchar(255) NOT NULL DEFAULT '',
  `Size` int(11) NOT NULL DEFAULT '0',
  `Type` varchar(16) NOT NULL DEFAULT '',
  `SubType` varchar(16) NOT NULL DEFAULT '',
  PRIMARY KEY (`BEMAID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `BEID` (`BEID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `BatchEmailMsgConfig`
--

DROP TABLE IF EXISTS `BatchEmailMsgConfig`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `BatchEmailMsgConfig` (
  `BEMCID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `WhosMailServer` int(11) NOT NULL DEFAULT '1' COMMENT '1 Sycamore, 2 School, 3 Mandrill, 4 Spark',
  `SendingDomain` varchar(128) NOT NULL,
  `SendingVerified` int(11) NOT NULL,
  `Server` varchar(64) NOT NULL,
  `Port` int(11) NOT NULL,
  `Security` int(11) NOT NULL,
  `Username` varchar(128) NOT NULL,
  `Password` varchar(255) NOT NULL DEFAULT '',
  `CertifiedDT` datetime NOT NULL,
  `AllowUser` int(11) NOT NULL DEFAULT '1',
  `Enabled` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`BEMCID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `BatchEmailMsgIDs`
--

DROP TABLE IF EXISTS `BatchEmailMsgIDs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `BatchEmailMsgIDs` (
  `BEMID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `BEID` int(11) NOT NULL,
  `BEDID` int(11) NOT NULL,
  `Status` varchar(32) NOT NULL,
  `UMID` varchar(128) NOT NULL,
  `Message` varchar(128) NOT NULL,
  PRIMARY KEY (`BEMID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `BEDID` (`BEDID`),
  KEY `UMID` (`UMID`),
  KEY `BEID` (`BEID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `BatchEmailMsgJobs`
--

DROP TABLE IF EXISTS `BatchEmailMsgJobs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `BatchEmailMsgJobs` (
  `BEID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `ClassID` int(11) NOT NULL DEFAULT '0',
  `Description` varchar(32) NOT NULL DEFAULT '',
  `Subject` varchar(128) NOT NULL DEFAULT '',
  `Message` mediumtext NOT NULL,
  `AuthorID` int(11) NOT NULL DEFAULT '0',
  `Queued` int(11) NOT NULL DEFAULT '0',
  `DateTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `ProcessDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `StartDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Notify` int(11) NOT NULL DEFAULT '0',
  `Status` int(11) NOT NULL DEFAULT '1',
  `StatusMsg` varchar(254) NOT NULL,
  `Total` int(11) NOT NULL DEFAULT '0',
  `Sent` int(11) NOT NULL DEFAULT '0',
  `FromString` varchar(128) NOT NULL DEFAULT '',
  `ReplyTo` varchar(128) NOT NULL DEFAULT '',
  `AttachFileNames` varchar(254) NOT NULL,
  `Vendor` varchar(16) NOT NULL,
  `VendorMessageID` varchar(128) NOT NULL,
  `OrderID` int(11) NOT NULL,
  `Working` int(11) NOT NULL DEFAULT '0',
  `ReturnCode` text NOT NULL,
  PRIMARY KEY (`BEID`),
  KEY `Status` (`Status`),
  KEY `DateTime` (`DateTime`),
  KEY `AuthorID` (`AuthorID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `VendorMessageID` (`VendorMessageID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `BatchEmailMsgRecipients`
--

DROP TABLE IF EXISTS `BatchEmailMsgRecipients`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `BatchEmailMsgRecipients` (
  `BEDID` int(11) NOT NULL AUTO_INCREMENT,
  `BEID` int(11) NOT NULL DEFAULT '0',
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `ClassID` int(11) NOT NULL,
  `ContactID` int(11) NOT NULL DEFAULT '0',
  `Email` varchar(255) NOT NULL DEFAULT '',
  `Name` varchar(32) NOT NULL,
  `Status` int(11) NOT NULL DEFAULT '0',
  `StatusMsg` varchar(128) NOT NULL DEFAULT '',
  `Count` int(11) NOT NULL DEFAULT '0',
  `ConfirmDT` datetime NOT NULL,
  PRIMARY KEY (`BEDID`),
  KEY `BEID` (`BEID`),
  KEY `Email` (`Email`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `BenchMark`
--

DROP TABLE IF EXISTS `BenchMark`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `BenchMark` (
  `BMID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `ActivationDate` date NOT NULL,
  `Label` varchar(64) NOT NULL,
  `Notes` text NOT NULL,
  `PaidDate` date NOT NULL,
  PRIMARY KEY (`BMID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `BenchmarkSubmissions`
--

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

--
-- Table structure for table `CSchoolCategories`
--

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

--
-- Table structure for table `CSchoolCategoryGroups`
--

DROP TABLE IF EXISTS `CSchoolCategoryGroups`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `CSchoolCategoryGroups` (
  `CSCGID` 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 (`CSCGID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `Sequence` (`Sequence`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `CSchoolCategorySchools`
--

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

--
-- Table structure for table `CSchoolStatisticChoices`
--

DROP TABLE IF EXISTS `CSchoolStatisticChoices`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `CSchoolStatisticChoices` (
  `CSSCID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `CSSID` int(11) NOT NULL,
  `Sequence` int(11) NOT NULL,
  `Value` varchar(16) NOT NULL,
  `Label` varchar(48) NOT NULL,
  PRIMARY KEY (`CSSCID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `SSID` (`CSSID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `CSchoolStatisticGroups`
--

DROP TABLE IF EXISTS `CSchoolStatisticGroups`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `CSchoolStatisticGroups` (
  `CSSGID` 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 (`CSSGID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `Sequence` (`Sequence`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `CSchoolStatisticValues`
--

DROP TABLE IF EXISTS `CSchoolStatisticValues`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `CSchoolStatisticValues` (
  `CSSVID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `CSID` int(11) NOT NULL DEFAULT '0',
  `CSSID` int(11) NOT NULL DEFAULT '0',
  `Value` varchar(255) NOT NULL DEFAULT '',
  `ValueDate` date NOT NULL,
  PRIMARY KEY (`CSSVID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `CSID` (`CSID`),
  KEY `CSSID` (`CSSID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `CSchoolStatistics`
--

DROP TABLE IF EXISTS `CSchoolStatistics`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `CSchoolStatistics` (
  `CSSID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `CSSGID` int(11) NOT NULL DEFAULT '0',
  `Sequence` int(11) NOT NULL DEFAULT '0',
  `Name` varchar(32) NOT NULL DEFAULT '',
  `Description` varchar(255) NOT NULL DEFAULT '',
  `Type` int(11) NOT NULL DEFAULT '1',
  `Public` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`CSSID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `CSSGID` (`CSSGID`),
  KEY `Sequence` (`Sequence`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `CSchools`
--

DROP TABLE IF EXISTS `CSchools`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `CSchools` (
  `CSID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `AuthorID` int(11) NOT NULL,
  `AuthorSchoolID` int(11) NOT NULL,
  `CCID` int(11) NOT NULL DEFAULT '0',
  `OwnerID` int(11) NOT NULL DEFAULT '0',
  `Leader1` int(11) NOT NULL DEFAULT '0',
  `Leader2` int(11) NOT NULL DEFAULT '0',
  `Leader3` int(11) NOT NULL DEFAULT '0',
  `Leader4` int(11) NOT NULL DEFAULT '0',
  `Leader5` int(11) NOT NULL DEFAULT '0',
  `Leader6` int(11) NOT NULL DEFAULT '0',
  `Leader7` int(11) NOT NULL DEFAULT '0',
  `Leader8` int(11) NOT NULL DEFAULT '0',
  `Leader9` int(11) NOT NULL DEFAULT '0',
  `Leader10` int(11) NOT NULL DEFAULT '0',
  `Submitted` int(11) NOT NULL DEFAULT '0',
  `Approved` int(11) NOT NULL DEFAULT '0',
  `Updated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `County` varchar(32) NOT NULL DEFAULT '',
  `Founded` int(11) NOT NULL DEFAULT '0',
  `PublicDistrict` varchar(32) NOT NULL DEFAULT '',
  `PublicSchool` varchar(32) NOT NULL DEFAULT '',
  `UpdateDT` datetime NOT NULL,
  KEY `CSID` (`CSID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `CCID` (`CCID`),
  KEY `OwnerID` (`OwnerID`),
  KEY `AuthorSchoolID` (`AuthorSchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `CalendarCategories`
--

DROP TABLE IF EXISTS `CalendarCategories`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `CalendarCategories` (
  `CalendarCategoryID` 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 '',
  `Color` varchar(8) NOT NULL DEFAULT '',
  PRIMARY KEY (`CalendarCategoryID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `CalendarDates`
--

DROP TABLE IF EXISTS `CalendarDates`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `CalendarDates` (
  `CDID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `ClassID` int(11) NOT NULL DEFAULT '0',
  `Date` date NOT NULL DEFAULT '0000-00-00',
  `ShortDescription` varchar(16) NOT NULL DEFAULT '',
  `Description` varchar(128) NOT NULL DEFAULT '',
  `Color` varchar(10) NOT NULL DEFAULT '',
  `Event` int(11) NOT NULL,
  `Length` decimal(3,2) NOT NULL,
  PRIMARY KEY (`CDID`),
  KEY `Date` (`Date`),
  KEY `ClassID` (`ClassID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `CalendarDays`
--

DROP TABLE IF EXISTS `CalendarDays`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `CalendarDays` (
  `CDID` 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',
  `Title` varchar(32) NOT NULL DEFAULT '',
  PRIMARY KEY (`CDID`),
  UNIQUE KEY `CDID` (`CDID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ClassID` (`ClassID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `CalendarImports`
--

DROP TABLE IF EXISTS `CalendarImports`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `CalendarImports` (
  `CIID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `Name` varchar(32) NOT NULL DEFAULT '',
  `URL` varchar(255) NOT NULL DEFAULT '',
  `Updated` int(11) NOT NULL,
  `StatusMessage` varchar(255) NOT NULL,
  `Count` int(11) NOT NULL,
  `Type` int(11) NOT NULL COMMENT '1=Manual, 2=automatic',
  `CategoryID` int(11) NOT NULL,
  PRIMARY KEY (`CIID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `CalendarWeek`
--

DROP TABLE IF EXISTS `CalendarWeek`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `CalendarWeek` (
  `CDID` 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',
  `Title` varchar(32) NOT NULL DEFAULT '',
  PRIMARY KEY (`CDID`),
  UNIQUE KEY `CDID` (`CDID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ClassID` (`ClassID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `Catholic_NCEA`
--

DROP TABLE IF EXISTS `Catholic_NCEA`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Catholic_NCEA` (
  `NCEAID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0' COMMENT 'Diocese office SchoolID',
  `AuthorID` int(11) NOT NULL DEFAULT '0' COMMENT 'User who updated the form last',
  `AuthorSchoolID` int(11) NOT NULL COMMENT 'School the form is for',
  `SCHYID` int(11) NOT NULL COMMENT 'School Year ID',
  `Updated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Submitted` int(11) NOT NULL DEFAULT '0',
  `Approved` int(11) NOT NULL DEFAULT '0',
  `Name` varchar(64) NOT NULL DEFAULT '',
  `Principal` varchar(64) NOT NULL DEFAULT '',
  `Address` varchar(64) NOT NULL DEFAULT '',
  `Phone` varchar(20) NOT NULL DEFAULT '',
  `Fax` varchar(20) NOT NULL DEFAULT '',
  `Email` varchar(64) NOT NULL,
  `Type` int(11) NOT NULL DEFAULT '0',
  `Location` int(11) NOT NULL DEFAULT '0',
  `Sponsorship` int(11) NOT NULL DEFAULT '0',
  `Gender` int(11) NOT NULL DEFAULT '0',
  `AutofillStudents` int(1) NOT NULL DEFAULT '1',
  `AutofillStaff` int(1) NOT NULL DEFAULT '1',
  `staff1_AmerInd_Cath` int(11) NOT NULL DEFAULT '0' COMMENT 'Amer. Ind. Cath. Staff',
  `staff1_AmerInd_NonCath` int(11) NOT NULL DEFAULT '0' COMMENT 'Amer. Ind. Non-Cath. Staff',
  `staff1_AmerInd_Unknown` int(11) NOT NULL DEFAULT '0' COMMENT 'Amer. Ind. Unknown Staff',
  `staff1_Asian_Cath` int(11) NOT NULL DEFAULT '0' COMMENT 'Asian Cath. Staff',
  `staff1_Asian_NonCath` int(11) NOT NULL DEFAULT '0' COMMENT 'Asian Non-Cath. Staff',
  `staff1_Asian_Unknown` int(11) NOT NULL DEFAULT '0' COMMENT 'Asian Unknown Staff',
  `staff1_Black_Cath` int(11) NOT NULL DEFAULT '0' COMMENT 'Black Cath. Staff',
  `staff1_Black_NonCath` int(11) NOT NULL DEFAULT '0' COMMENT 'Black Non-Cath. Staff',
  `staff1_Black_Unknown` int(11) NOT NULL DEFAULT '0' COMMENT 'Black Unknown Staff',
  `staff1_Hawaiian_Cath` int(11) NOT NULL DEFAULT '0' COMMENT 'Hawaiian Cath. Staff',
  `staff1_Hawaiian_NonCath` int(11) NOT NULL DEFAULT '0' COMMENT 'Hawaiian Non-Cath. Staff',
  `staff1_Hawaiian_Unknown` int(11) NOT NULL DEFAULT '0' COMMENT 'Hawaiian Unknown Staff',
  `staff1_White_Cath` int(11) NOT NULL DEFAULT '0' COMMENT 'White Cath. Staff',
  `staff1_White_NonCath` int(11) NOT NULL DEFAULT '0' COMMENT 'White Non-Cath. Staff',
  `staff1_White_Unknown` int(11) NOT NULL DEFAULT '0' COMMENT 'White Unknown Staff',
  `staff1_Multi_Cath` int(11) NOT NULL DEFAULT '0' COMMENT 'Multi. Cath. Staff',
  `staff1_Multi_NonCath` int(11) NOT NULL DEFAULT '0' COMMENT 'Multi. Non-Cath. Staff',
  `staff1_Multi_Unknown` int(11) NOT NULL DEFAULT '0' COMMENT 'Multi. Unknown Staff',
  `staff1_Unknown_Cath` int(11) NOT NULL DEFAULT '0' COMMENT 'Unknown Cath. Staff',
  `staff1_Unknown_NonCath` int(11) NOT NULL DEFAULT '0' COMMENT 'Unknown Non-Cath. Staff',
  `staff1_Unknown_Unknown` int(11) NOT NULL DEFAULT '0' COMMENT 'Unknown Unknown Staff',
  `staff3_FemRel_FullTime` int(11) NOT NULL DEFAULT '0' COMMENT 'Fem. Rel. Full-Time',
  `staff3_FemRel_PartTime` int(11) NOT NULL DEFAULT '0' COMMENT 'Fem. Rel. Part-Time',
  `staff3_MaleRel_FullTime` int(11) NOT NULL DEFAULT '0' COMMENT 'Male Rel. Full-Time',
  `staff3_MaleRel_PartTime` int(11) NOT NULL DEFAULT '0' COMMENT 'Male Rel. Part-Time',
  `staff3_Clergy_FullTime` int(11) NOT NULL DEFAULT '0' COMMENT 'Clergy Full-Time',
  `staff3_Clergy_PartTime` int(11) NOT NULL DEFAULT '0' COMMENT 'Clergy Part-Time',
  `staff3_LayMale_FullTime` int(11) NOT NULL DEFAULT '0' COMMENT 'Lay Male Full-Time',
  `staff3_LayMale_PartTime` int(11) NOT NULL DEFAULT '0' COMMENT 'Lay Male Part-Time',
  `staff3_LayFem_FullTime` int(11) NOT NULL DEFAULT '0' COMMENT 'Lay Female Full-Time',
  `staff3_LayFem_PartTime` int(11) NOT NULL DEFAULT '0' COMMENT 'Lay Female Part-Time',
  `staff2_Hispanic_Cath` int(11) NOT NULL DEFAULT '0' COMMENT 'Hisp. Cath. Staff',
  `staff2_Hispanic_NonCath` int(11) NOT NULL DEFAULT '0' COMMENT 'Hisp. Non-Cath. Staff',
  `staff2_Hispanic_Unknown` int(11) NOT NULL DEFAULT '0' COMMENT 'Hisp. Unknown Staff',
  `staff2_NonHispanic_Cath` int(11) NOT NULL DEFAULT '0' COMMENT 'Non-Hisp. Cath. Staff',
  `staff2_NonHispanic_NonCath` int(11) NOT NULL DEFAULT '0' COMMENT 'Non-Hisp. Non-Cath. Staff',
  `staff2_NonHispanic_Unknown` int(11) NOT NULL DEFAULT '0' COMMENT 'Non-Hisp. Unknown Staff',
  `student1_AmerInd_Cath` int(11) NOT NULL DEFAULT '0' COMMENT 'Amer. Ind. Cath. Students',
  `student1_AmerInd_NonCath` int(11) NOT NULL DEFAULT '0' COMMENT 'Amer. Ind. Non-Cath. Students',
  `student1_AmerInd_Unknown` int(11) NOT NULL DEFAULT '0' COMMENT 'Amer. Ind. Unknown Students',
  `student1_Asian_Cath` int(11) NOT NULL DEFAULT '0' COMMENT 'Asian Cath. Students',
  `student1_Asian_NonCath` int(11) NOT NULL DEFAULT '0' COMMENT 'Asian Non-Cath. Students',
  `student1_Asian_Unknown` int(11) NOT NULL DEFAULT '0' COMMENT 'Asian Unknown Students',
  `student1_Black_Cath` int(11) NOT NULL DEFAULT '0' COMMENT 'Black Cath. Students',
  `student1_Black_NonCath` int(11) NOT NULL DEFAULT '0' COMMENT 'Black Non-Cath. Students',
  `student1_Black_Unknown` int(11) NOT NULL DEFAULT '0' COMMENT 'Black Unknown Students',
  `student1_Hawaiian_Cath` int(11) NOT NULL DEFAULT '0' COMMENT 'Hawaiian Cath. Students',
  `student1_Hawaiian_NonCath` int(11) NOT NULL DEFAULT '0' COMMENT 'Hawaiian Non-Cath. Students',
  `student1_Hawaiian_Unknown` int(11) NOT NULL DEFAULT '0' COMMENT 'Hawaiian Unknown Students',
  `student1_White_Cath` int(11) NOT NULL DEFAULT '0' COMMENT 'White Cath. Students',
  `student1_White_NonCath` int(11) NOT NULL DEFAULT '0' COMMENT 'White Non-Cath. Students',
  `student1_White_Unknown` int(11) NOT NULL DEFAULT '0' COMMENT 'White Unknown Students',
  `student1_Multi_Cath` int(11) NOT NULL DEFAULT '0' COMMENT 'Multi. Cath. Students',
  `student1_Multi_NonCath` int(11) NOT NULL DEFAULT '0' COMMENT 'Multi. Non-Cath. Students',
  `student1_Multi_Unknown` int(11) NOT NULL DEFAULT '0' COMMENT 'Multi. Unknown Students',
  `student1_Unknown_Cath` int(11) NOT NULL DEFAULT '0' COMMENT 'Unknown Cath. Students',
  `student1_Unknown_NonCath` int(11) NOT NULL DEFAULT '0' COMMENT 'Unknown Non-Cath. Students',
  `student1_Unknown_Unknown` int(11) NOT NULL DEFAULT '0' COMMENT 'Unknown Unknown Students',
  `student3_pk` int(11) NOT NULL DEFAULT '0' COMMENT 'Pre-K',
  `student3_k` int(11) NOT NULL DEFAULT '0' COMMENT 'Kindergarten',
  `student3_1` int(11) NOT NULL DEFAULT '0' COMMENT '1st',
  `student3_2` int(11) NOT NULL DEFAULT '0' COMMENT '2nd',
  `student3_3` int(11) NOT NULL DEFAULT '0' COMMENT '3rd',
  `student3_4` int(11) NOT NULL DEFAULT '0' COMMENT '4th',
  `student3_5` int(11) NOT NULL DEFAULT '0' COMMENT '5th',
  `student3_6` int(11) NOT NULL DEFAULT '0' COMMENT '6th',
  `student3_7` int(11) NOT NULL DEFAULT '0' COMMENT '7th',
  `student3_8` int(11) NOT NULL DEFAULT '0' COMMENT '8th',
  `student3_9` int(11) NOT NULL DEFAULT '0' COMMENT '9th',
  `student3_10` int(11) NOT NULL DEFAULT '0' COMMENT '10th',
  `student3_11` int(11) NOT NULL DEFAULT '0' COMMENT '11th',
  `student3_12` int(11) NOT NULL DEFAULT '0' COMMENT '12th',
  `student3_Ungraded` int(11) NOT NULL DEFAULT '0' COMMENT 'Ungraded',
  `student2_Hispanic_Cath` int(11) NOT NULL DEFAULT '0' COMMENT 'Hisp. Cath. Students',
  `student2_Hispanic_NonCath` int(11) NOT NULL DEFAULT '0' COMMENT 'Hisp. Non-Cath. Students',
  `student2_Hispanic_Unknown` int(11) NOT NULL DEFAULT '0' COMMENT 'Hisp. Unknown Students',
  `student2_NonHispanic_Cath` int(11) NOT NULL DEFAULT '0' COMMENT 'Non-Hisp. Cath. Students',
  `student2_NonHispanic_NonCath` int(11) NOT NULL DEFAULT '0' COMMENT 'Non-Hisp. Non-Cath. Students',
  `student2_NonHispanic_Unknown` int(11) NOT NULL DEFAULT '0' COMMENT 'Non-Hisp. Unknown Students',
  `other_GovFund_1` varchar(11) NOT NULL COMMENT 'Title 1 Services',
  `other_GovFund_2` varchar(11) NOT NULL COMMENT 'Free/Reduced Breakfast',
  `other_GovFund_3` varchar(11) NOT NULL COMMENT 'Free/Reduced Lunch',
  `other_GovFund_4` varchar(11) NOT NULL COMMENT 'Subsidized Transportation',
  `other_Additional_1` int(11) NOT NULL DEFAULT '0' COMMENT 'School Board, Commission, or Council',
  `other_Additional_2` int(11) NOT NULL DEFAULT '0' COMMENT 'Extended Day Program',
  `other_Additional_3` int(11) NOT NULL DEFAULT '0' COMMENT 'Waiting List',
  `other_Additional_4` int(11) NOT NULL DEFAULT '0' COMMENT 'Internet Access',
  `other_Additional_5` int(11) NOT NULL DEFAULT '0' COMMENT 'Received E-Rate discount',
  `other_Additional_6` int(11) NOT NULL DEFAULT '0' COMMENT 'Applied for E-Rate discount',
  `other_Additional_7` varchar(11) NOT NULL COMMENT 'Students with Diagnosed Disabilities',
  PRIMARY KEY (`NCEAID`),
  UNIQUE KEY `NCEAID_2` (`NCEAID`),
  KEY `NCEAID` (`NCEAID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `Catholic_NCEA_Files`
--

DROP TABLE IF EXISTS `Catholic_NCEA_Files`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Catholic_NCEA_Files` (
  `NCEAFID` int(11) NOT NULL AUTO_INCREMENT,
  `Year` varchar(16) NOT NULL,
  `FileName` varchar(32) NOT NULL,
  `Current` int(1) NOT NULL,
  `YearStart` date NOT NULL,
  `YearEnd` date NOT NULL,
  PRIMARY KEY (`NCEAFID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `Catholic_NCEA_SchoolYears`
--

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

--
-- Table structure for table `CheckList`
--

DROP TABLE IF EXISTS `CheckList`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `CheckList` (
  `CheckListID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `ClassID` int(11) NOT NULL DEFAULT '0',
  `Title` varchar(64) NOT NULL DEFAULT '',
  `Message` text NOT NULL,
  `AuthorID` int(11) NOT NULL DEFAULT '0',
  UNIQUE KEY `NewsID` (`CheckListID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ClassID` (`ClassID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `CheckListStudents`
--

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

--
-- Table structure for table `ClassAccounting`
--

DROP TABLE IF EXISTS `ClassAccounting`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ClassAccounting` (
  `CACCTID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `ClassID` int(11) NOT NULL,
  `Sequence` int(11) NOT NULL,
  `Title` varchar(32) NOT NULL,
  `Description` varchar(64) NOT NULL,
  `Amount` decimal(10,2) NOT NULL,
  PRIMARY KEY (`CACCTID`),
  KEY `CompanyID` (`SchoolID`),
  KEY `ClassID` (`ClassID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ClassActivity`
--

DROP TABLE IF EXISTS `ClassActivity`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ClassActivity` (
  `CAID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `ClassID` int(11) NOT NULL,
  `UserID` int(11) NOT NULL,
  `ActivityDT` datetime NOT NULL,
  `Comments` varchar(128) NOT NULL,
  `StudentID` int(11) NOT NULL,
  PRIMARY KEY (`CAID`),
  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 `ClassAssignmentAttachments`
--

DROP TABLE IF EXISTS `ClassAssignmentAttachments`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ClassAssignmentAttachments` (
  `CAAID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `ClassID` int(11) NOT NULL DEFAULT '0',
  `CAID` int(11) NOT NULL DEFAULT '0',
  `GAID` int(11) NOT NULL,
  `Title` varchar(128) NOT NULL,
  `DocumentID` int(11) NOT NULL DEFAULT '0',
  `Link` varchar(128) NOT NULL,
  PRIMARY KEY (`CAAID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ClassID` (`ClassID`),
  KEY `CAID` (`CAID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ClassAssignmentGroups`
--

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

--
-- Table structure for table `ClassAssignmentRubrics`
--

DROP TABLE IF EXISTS `ClassAssignmentRubrics`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ClassAssignmentRubrics` (
  `CARID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `ClassID` int(11) NOT NULL,
  `CAID` int(11) NOT NULL,
  `Number` int(11) NOT NULL,
  `Points` int(11) NOT NULL,
  `Name` varchar(32) NOT NULL,
  `Explaination` text NOT NULL,
  PRIMARY KEY (`CARID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ClassID` (`ClassID`),
  KEY `CAID` (`CAID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ClassAssignmentSkills`
--

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

--
-- Table structure for table `ClassAssignmentStandards`
--

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

--
-- Table structure for table `ClassAssignmentStudents`
--

DROP TABLE IF EXISTS `ClassAssignmentStudents`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ClassAssignmentStudents` (
  `CASID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `ClassID` int(11) NOT NULL,
  `CAID` int(11) NOT NULL COMMENT 'Class Assignment ID',
  `StudentID` int(11) NOT NULL,
  PRIMARY KEY (`CASID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ClassID` (`ClassID`),
  KEY `CAID` (`CAID`),
  KEY `StudentID` (`StudentID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Class Assignment Student Table';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ClassAssignments`
--

DROP TABLE IF EXISTS `ClassAssignments`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ClassAssignments` (
  `CAID` int(11) NOT NULL AUTO_INCREMENT,
  `CAGID` int(11) NOT NULL DEFAULT '0',
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `ClassID` int(11) NOT NULL DEFAULT '0',
  `ClassSubjectID` int(11) NOT NULL DEFAULT '0',
  `UnitNumber` smallint(6) NOT NULL,
  `DateAssigned` date NOT NULL DEFAULT '0000-00-00',
  `DateDue` date NOT NULL DEFAULT '0000-00-00',
  `Quarter` int(11) NOT NULL DEFAULT '1',
  `Title` varchar(128) NOT NULL DEFAULT '',
  `Description` text NOT NULL,
  `Possible` int(11) NOT NULL DEFAULT '0',
  `Average` float NOT NULL DEFAULT '0',
  `Weight` int(11) NOT NULL DEFAULT '0',
  `CGCID` int(11) NOT NULL DEFAULT '0',
  `Status` int(11) NOT NULL DEFAULT '1',
  `Viewable` int(11) NOT NULL DEFAULT '1',
  `DropBox` int(11) NOT NULL,
  `PartialStudent` tinyint(4) NOT NULL DEFAULT '0' COMMENT 'only applies to selected students',
  PRIMARY KEY (`CAID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ClassID` (`ClassID`),
  KEY `DateDue` (`DateDue`),
  KEY `CGCID` (`CGCID`),
  KEY `Quarter` (`Quarter`),
  KEY `ClassSubjectID` (`ClassSubjectID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ClassAttributeGroups`
--

DROP TABLE IF EXISTS `ClassAttributeGroups`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ClassAttributeGroups` (
  `CAGID` int(11) NOT NULL AUTO_INCREMENT,
  `Name` varchar(64) NOT NULL,
  `Description` varchar(64) NOT NULL DEFAULT '',
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `ClassID` int(11) NOT NULL,
  `Placement` int(11) NOT NULL COMMENT 'Depreciated',
  `Sequence` int(11) NOT NULL DEFAULT '0',
  `ReportCardBlock` tinyint(2) NOT NULL,
  PRIMARY KEY (`CAGID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `Sequence` (`Sequence`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ClassAttributeIndex`
--

DROP TABLE IF EXISTS `ClassAttributeIndex`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ClassAttributeIndex` (
  `CAIID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `ClassID` int(11) NOT NULL,
  `ParentCAID` int(11) NOT NULL DEFAULT '0',
  `LocalSchoolID` int(11) NOT NULL,
  `SiteDelete` tinyint(4) NOT NULL,
  PRIMARY KEY (`CAIID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ClassID` (`ClassID`),
  KEY `ParentCAID` (`ParentCAID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ClassAttributeValues`
--

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

--
-- Table structure for table `ClassAttributes`
--

DROP TABLE IF EXISTS `ClassAttributes`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ClassAttributes` (
  `CAID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `ClassID` int(11) NOT NULL,
  `CSID` int(11) NOT NULL,
  `Page` int(11) NOT NULL DEFAULT '1' COMMENT '(not used)',
  `Side` int(11) NOT NULL COMMENT '1=left, 2=right, 3=center',
  `Name` varchar(128) NOT NULL DEFAULT '',
  `Sequence` int(11) NOT NULL DEFAULT '0',
  `CAGID` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`CAID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ClassID` (`ClassID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ClassBehavior`
--

DROP TABLE IF EXISTS `ClassBehavior`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ClassBehavior` (
  `CBID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` varchar(11) NOT NULL,
  `ClassID` varchar(11) NOT NULL,
  `StudentID` varchar(11) NOT NULL,
  `Value` varchar(2) NOT NULL,
  `A` varchar(11) NOT NULL,
  `B` varchar(11) NOT NULL,
  `C` varchar(11) NOT NULL,
  `D` varchar(11) NOT NULL,
  `E` varchar(11) NOT NULL,
  `F` varchar(11) NOT NULL,
  `G` varchar(11) NOT NULL,
  `H` varchar(11) NOT NULL,
  `I` varchar(11) NOT NULL,
  `J` varchar(11) NOT NULL,
  `K` varchar(11) NOT NULL,
  `L` varchar(11) NOT NULL,
  `M` varchar(11) NOT NULL,
  `N` varchar(11) NOT NULL,
  `O` varchar(11) NOT NULL,
  `P` varchar(11) NOT NULL,
  `Q` varchar(11) NOT NULL,
  `R` varchar(11) NOT NULL,
  `S` varchar(11) NOT NULL,
  `T` varchar(11) NOT NULL,
  `U` varchar(11) NOT NULL,
  `V` varchar(11) NOT NULL,
  `W` varchar(11) NOT NULL,
  `X` varchar(11) NOT NULL,
  `Y` varchar(11) NOT NULL,
  `Z` varchar(11) NOT NULL,
  PRIMARY KEY (`CBID`),
  KEY `ClassID` (`ClassID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ClassCategories`
--

DROP TABLE IF EXISTS `ClassCategories`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ClassCategories` (
  `ClassCID` 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 (`ClassCID`),
  KEY `CompanyID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ClassConfig`
--

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

--
-- Table structure for table `ClassCurriculumAttachments`
--

DROP TABLE IF EXISTS `ClassCurriculumAttachments`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ClassCurriculumAttachments` (
  `CCAID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `ClassID` int(11) NOT NULL DEFAULT '0',
  `CCUID` int(11) NOT NULL DEFAULT '0',
  `DocumentID` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`CCAID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ClassID` (`ClassID`),
  KEY `CAID` (`CCUID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ClassCurriculumCfg`
--

DROP TABLE IF EXISTS `ClassCurriculumCfg`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ClassCurriculumCfg` (
  `CCUID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `ClassID` int(11) NOT NULL,
  `SubjectID` int(11) NOT NULL,
  `UnitName` varchar(32) NOT NULL DEFAULT 'Unit',
  `UnitCount` int(11) NOT NULL DEFAULT '1',
  `IncludeOverview` tinyint(4) NOT NULL DEFAULT '0',
  `IncludeHomework` tinyint(4) NOT NULL DEFAULT '0',
  `IncludeDocuments` int(11) NOT NULL,
  `IncludePhotos` int(11) NOT NULL,
  `IncludeMultimedia` int(11) NOT NULL,
  `Summary` text NOT NULL,
  `Viewable` int(11) NOT NULL COMMENT 'Depreciated',
  `NotifyStaff` int(11) NOT NULL,
  `NotifyAdvisor` int(11) NOT NULL,
  `StaffCompletion` int(11) NOT NULL,
  `AdvisorCompletion` int(11) NOT NULL,
  `StudentCompletion` int(11) NOT NULL,
  PRIMARY KEY (`CCUID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `CCID` (`ClassID`),
  KEY `SubjectID` (`SubjectID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ClassCurriculumComments`
--

DROP TABLE IF EXISTS `ClassCurriculumComments`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ClassCurriculumComments` (
  `CCCID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `ClassID` int(11) NOT NULL,
  `CCUID` int(11) NOT NULL,
  `StudentID` int(11) NOT NULL,
  `UserID` int(11) NOT NULL COMMENT 'Author',
  `CreateDT` datetime NOT NULL,
  `Comments` text NOT NULL,
  PRIMARY KEY (`CCCID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ClassCurriculumCompletion`
--

DROP TABLE IF EXISTS `ClassCurriculumCompletion`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ClassCurriculumCompletion` (
  `CCCID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `ClassID` int(11) NOT NULL,
  `SubjectID` int(11) NOT NULL,
  `CCUID` int(11) NOT NULL,
  `StudentID` int(11) NOT NULL,
  `Completed` int(11) NOT NULL,
  `CompleteDT` datetime NOT NULL,
  `Verified` int(11) NOT NULL,
  `VerifiedDT` datetime NOT NULL,
  `Review` int(11) NOT NULL,
  PRIMARY KEY (`CCCID`),
  KEY `CompanyID` (`SchoolID`),
  KEY `ClassID` (`ClassID`),
  KEY `CCUID` (`CCUID`),
  KEY `SubjectID` (`SubjectID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ClassCurriculumLabels`
--

DROP TABLE IF EXISTS `ClassCurriculumLabels`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ClassCurriculumLabels` (
  `CCLID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `ClassID` int(11) NOT NULL,
  `SubjectID` int(11) NOT NULL,
  `Sequence` int(11) NOT NULL,
  `Name` varchar(32) NOT NULL,
  `Description` varchar(64) NOT NULL,
  `Viewable` int(11) NOT NULL DEFAULT '0',
  UNIQUE KEY `CCLID_2` (`CCLID`),
  KEY `CCLID` (`CCLID`),
  KEY `CompanyID` (`SchoolID`),
  KEY `ClassID` (`ClassID`),
  KEY `SubjectID` (`SubjectID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ClassCurriculumLogs`
--

DROP TABLE IF EXISTS `ClassCurriculumLogs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ClassCurriculumLogs` (
  `CCLID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `ClassID` int(11) NOT NULL,
  `SubjectID` int(11) NOT NULL,
  `CCUID` int(11) NOT NULL,
  `StudentID` int(11) NOT NULL,
  `UserID` int(11) NOT NULL COMMENT 'Author',
  `CreateDT` datetime NOT NULL,
  `Logs` varchar(255) NOT NULL,
  PRIMARY KEY (`CCLID`),
  KEY `CompanyID` (`SchoolID`),
  KEY `ClassID` (`ClassID`),
  KEY `CCUID` (`CCUID`),
  KEY `StudentID` (`StudentID`),
  KEY `SubjectID` (`SubjectID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ClassCurriculumMultimedia`
--

DROP TABLE IF EXISTS `ClassCurriculumMultimedia`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ClassCurriculumMultimedia` (
  `CCMID` 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,
  `CCUID` int(11) NOT NULL DEFAULT '0',
  `MMID` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`CCMID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ClassID` (`ClassID`),
  KEY `CAID` (`CCUID`),
  KEY `SubjectID` (`SubjectID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ClassCurriculumPhotos`
--

DROP TABLE IF EXISTS `ClassCurriculumPhotos`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ClassCurriculumPhotos` (
  `CCPID` 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,
  `CCUID` int(11) NOT NULL DEFAULT '0',
  `PhotoID` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`CCPID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ClassID` (`ClassID`),
  KEY `CAID` (`CCUID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ClassCurriculumUnitDocs`
--

DROP TABLE IF EXISTS `ClassCurriculumUnitDocs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ClassCurriculumUnitDocs` (
  `CCUDID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `ClassID` int(11) NOT NULL,
  `SubjectID` int(11) NOT NULL,
  `CCUID` int(11) NOT NULL,
  `DocNumber` int(11) NOT NULL,
  `Content` text NOT NULL,
  PRIMARY KEY (`CCUDID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `CCID` (`ClassID`),
  KEY `SubjectID` (`SubjectID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ClassCycles`
--

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

--
-- Table structure for table `ClassDescriptions`
--

DROP TABLE IF EXISTS `ClassDescriptions`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ClassDescriptions` (
  `CDID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `ClassID` int(11) NOT NULL DEFAULT '0',
  `Description` text NOT NULL,
  PRIMARY KEY (`CDID`),
  UNIQUE KEY `SchoolID` (`SchoolID`,`ClassID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Class Descriptions';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ClassFinals`
--

DROP TABLE IF EXISTS `ClassFinals`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ClassFinals` (
  `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',
  `Semester` int(11) NOT NULL,
  `StudentID` int(11) NOT NULL DEFAULT '0',
  `Number` varchar(6) NOT NULL DEFAULT '0',
  `Letter` varchar(4) NOT NULL DEFAULT '',
  `Comments` varchar(64) NOT NULL DEFAULT '',
  `Excused` int(11) NOT NULL DEFAULT '0',
  `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`),
  KEY `StudentID` (`StudentID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ClassGradeCalculations`
--

DROP TABLE IF EXISTS `ClassGradeCalculations`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ClassGradeCalculations` (
  `CGCID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `ClassID` int(11) NOT NULL,
  `Q1` decimal(10,2) NOT NULL,
  `Q2` decimal(10,2) NOT NULL,
  `Q3` decimal(10,2) NOT NULL,
  `Q4` decimal(10,2) NOT NULL,
  `Q5` decimal(10,2) NOT NULL,
  `Q6` decimal(10,2) NOT NULL,
  `Q7` decimal(10,2) NOT NULL,
  `Q8` decimal(10,2) NOT NULL,
  `Q9` decimal(10,2) NOT NULL,
  `Q10` decimal(10,2) NOT NULL,
  `Q11` decimal(10,2) NOT NULL,
  `Q12` decimal(10,2) NOT NULL,
  `F1` decimal(10,2) NOT NULL,
  `F2` decimal(10,2) NOT NULL,
  `F3` decimal(10,2) NOT NULL,
  `F4` decimal(10,2) NOT NULL,
  `F5` decimal(10,2) NOT NULL,
  PRIMARY KEY (`CGCID`),
  KEY `SchoolID` (`SchoolID`,`ClassID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ClassGradeCategories`
--

DROP TABLE IF EXISTS `ClassGradeCategories`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ClassGradeCategories` (
  `CGCID` 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 '',
  `Percentage` int(11) NOT NULL DEFAULT '0',
  `Sequence` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`CGCID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ClassID` (`ClassID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ClassGradeComments`
--

DROP TABLE IF EXISTS `ClassGradeComments`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ClassGradeComments` (
  `CGCID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `Sequence` int(11) NOT NULL DEFAULT '0',
  `Comment` varchar(128) NOT NULL DEFAULT '',
  PRIMARY KEY (`CGCID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Graduation Requirements';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ClassGradeConfig`
--

DROP TABLE IF EXISTS `ClassGradeConfig`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ClassGradeConfig` (
  `CGID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `Q1Locked` int(11) NOT NULL DEFAULT '0',
  `Q2Locked` int(11) NOT NULL DEFAULT '0',
  `Q3Locked` int(11) NOT NULL DEFAULT '0',
  `Q4Locked` int(11) NOT NULL DEFAULT '0',
  `SessLockedBits` int(11) NOT NULL DEFAULT '0',
  `AttributeDepartments` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`CGID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ClassGradeFinals`
--

DROP TABLE IF EXISTS `ClassGradeFinals`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ClassGradeFinals` (
  `CGFID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `ClassID` int(11) NOT NULL,
  `Sequence` int(11) NOT NULL,
  `Name` varchar(32) NOT NULL,
  `Description` varchar(128) NOT NULL,
  `Semester` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`CGFID`),
  KEY `SchoolID` (`SchoolID`,`ClassID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ClassGradePostings`
--

DROP TABLE IF EXISTS `ClassGradePostings`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ClassGradePostings` (
  `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` varchar(5) NOT NULL DEFAULT '0',
  `NumberReal` varchar(5) NOT NULL DEFAULT '',
  `NumberFinal` varchar(5) NOT NULL DEFAULT '',
  `Letter` varchar(4) NOT NULL DEFAULT '',
  `Comments` varchar(128) NOT NULL DEFAULT '',
  `CommentValues` varchar(64) NOT NULL DEFAULT '',
  `Incomplete` int(11) NOT NULL DEFAULT '0',
  `CollegeCredit` int(11) NOT NULL,
  `AuthorID` int(11) NOT NULL DEFAULT '0',
  `Updated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `HSCredit` tinyint(4) NOT NULL DEFAULT '0',
  `AcademicLevel` tinyint(4) NOT NULL DEFAULT '0',
  PRIMARY KEY (`GradeID`),
  UNIQUE KEY `SchoolID` (`SchoolID`,`SchoolYearID`,`ClassID`,`SubjectID`,`Quarter`,`StudentID`),
  KEY `SchoolYearID` (`SchoolYearID`),
  KEY `ClassID` (`ClassID`),
  KEY `Quarter` (`Quarter`),
  KEY `StudentID` (`StudentID`),
  KEY `Number` (`Number`),
  KEY `Letter` (`Letter`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ClassGradeProcessingLogs`
--

DROP TABLE IF EXISTS `ClassGradeProcessingLogs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ClassGradeProcessingLogs` (
  `CGPLID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `ProcessingDT` datetime NOT NULL,
  `AuthorID` int(11) NOT NULL,
  `Count` int(11) NOT NULL,
  PRIMARY KEY (`CGPLID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Logging Class Grade Processing';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ClassGradeRubrics`
--

DROP TABLE IF EXISTS `ClassGradeRubrics`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ClassGradeRubrics` (
  `CGRID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `ClassID` int(11) NOT NULL DEFAULT '0',
  `CAID` int(11) NOT NULL DEFAULT '0',
  `CARID` int(11) NOT NULL,
  `StudentID` int(11) NOT NULL DEFAULT '0',
  `Number` varchar(6) NOT NULL DEFAULT '0',
  `AuthorID` int(11) NOT NULL DEFAULT '0',
  `Updated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  PRIMARY KEY (`CGRID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ClassID` (`ClassID`),
  KEY `CAID` (`CAID`),
  KEY `StudentID` (`StudentID`),
  KEY `StudentGrades` (`SchoolID`,`ClassID`,`CAID`,`StudentID`),
  KEY `CARID` (`CARID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ClassGradeStandardPostings`
--

DROP TABLE IF EXISTS `ClassGradeStandardPostings`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ClassGradeStandardPostings` (
  `CGSPID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `StudentID` int(11) NOT NULL,
  `ClassID` int(11) NOT NULL,
  `Quarter` int(11) NOT NULL,
  `SubjectID` int(11) NOT NULL,
  `GSID` int(11) NOT NULL,
  `Number` varchar(6) NOT NULL,
  `NumberReal` varchar(6) NOT NULL,
  `AuthorID` int(11) NOT NULL,
  `Updated` datetime NOT NULL,
  PRIMARY KEY (`CGSPID`),
  KEY `GSID` (`GSID`),
  KEY `ClassID` (`ClassID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `StudentID` (`StudentID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ClassGradeStandards`
--

DROP TABLE IF EXISTS `ClassGradeStandards`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ClassGradeStandards` (
  `CGSID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `ClassID` int(11) NOT NULL,
  `CAID` int(11) NOT NULL,
  `GSID` int(11) NOT NULL,
  `StudentID` int(11) NOT NULL,
  `Number` varchar(6) NOT NULL,
  `Status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '1 - unposted, 2 - posted',
  PRIMARY KEY (`CGSID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ClassID` (`ClassID`),
  KEY `CAID` (`CAID`),
  KEY `GSID` (`GSID`),
  KEY `StudentID` (`StudentID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Class Grade Standards';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ClassGradeStatisticChoices`
--

DROP TABLE IF EXISTS `ClassGradeStatisticChoices`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ClassGradeStatisticChoices` (
  `CGRSCID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `ClassID` int(11) NOT NULL DEFAULT '0',
  `CGRSID` int(11) NOT NULL,
  `Sequence` int(11) NOT NULL,
  `Value` varchar(16) NOT NULL,
  `Label` varchar(72) NOT NULL,
  PRIMARY KEY (`CGRSCID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `SSID` (`CGRSID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ClassGradeStatisticGroups`
--

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

--
-- Table structure for table `ClassGradeStatisticValues`
--

DROP TABLE IF EXISTS `ClassGradeStatisticValues`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ClassGradeStatisticValues` (
  `CGRSVID` 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',
  `CGRSID` int(11) NOT NULL DEFAULT '0',
  `Value` varchar(255) NOT NULL DEFAULT '',
  `ValueDate` date NOT NULL,
  `Session` int(11) NOT NULL,
  PRIMARY KEY (`CGRSVID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `StudentID` (`StudentID`),
  KEY `SSID` (`CGRSID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ClassGradeStatistics`
--

DROP TABLE IF EXISTS `ClassGradeStatistics`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ClassGradeStatistics` (
  `CGRSID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `ClassID` int(11) NOT NULL DEFAULT '0' COMMENT 'currently not used',
  `CGRSGID` int(11) NOT NULL,
  `Sequence` int(11) NOT NULL DEFAULT '0',
  `Type` int(11) NOT NULL DEFAULT '1',
  `Name` varchar(64) NOT NULL DEFAULT '',
  `Description` varchar(255) NOT NULL DEFAULT '',
  PRIMARY KEY (`CGRSID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `Sequence` (`Sequence`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ClassGradeStrandPostings`
--

DROP TABLE IF EXISTS `ClassGradeStrandPostings`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ClassGradeStrandPostings` (
  `StrandPostingID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `SchoolYearID` int(11) NOT NULL,
  `ClassID` int(11) NOT NULL,
  `SubjectID` int(11) NOT NULL,
  `StudentID` int(11) NOT NULL,
  `Quarter` int(11) NOT NULL,
  `Category` varchar(256) NOT NULL,
  `GSSID` int(11) NOT NULL,
  `Grade` int(11) NOT NULL,
  `Number` varchar(5) NOT NULL,
  `AuthorID` int(11) NOT NULL,
  `Updated` datetime NOT NULL,
  PRIMARY KEY (`StrandPostingID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `SchoolYearID` (`SchoolYearID`),
  KEY `ClassID` (`ClassID`),
  KEY `SubjectID` (`SubjectID`),
  KEY `StudentID` (`StudentID`),
  KEY `Quarter` (`Quarter`),
  KEY `Category` (`Category`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ClassGradeSummary`
--

DROP TABLE IF EXISTS `ClassGradeSummary`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ClassGradeSummary` (
  `CGSID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `ClassID` int(11) NOT NULL DEFAULT '0',
  `Quarter` int(11) NOT NULL DEFAULT '0',
  `SubjectID` int(11) NOT NULL DEFAULT '0',
  `StudentID` int(11) NOT NULL DEFAULT '0',
  `Number` varchar(7) NOT NULL DEFAULT '0',
  `Letter` varchar(4) NOT NULL DEFAULT '',
  `AuthorID` int(11) NOT NULL DEFAULT '0',
  `Updated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  PRIMARY KEY (`CGSID`),
  UNIQUE KEY `ElemGradeID` (`CGSID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ClassID` (`ClassID`),
  KEY `StudentID` (`StudentID`),
  KEY `SubjectID` (`SubjectID`),
  KEY `SubjectID_2` (`SubjectID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ClassGrades`
--

DROP TABLE IF EXISTS `ClassGrades`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ClassGrades` (
  `ClassGradeID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `ClassID` int(11) NOT NULL DEFAULT '0',
  `CAID` int(11) NOT NULL DEFAULT '0',
  `StudentID` int(11) NOT NULL DEFAULT '0',
  `Number` varchar(6) NOT NULL DEFAULT '0',
  `Comments` text NOT NULL,
  `Excused` int(11) NOT NULL DEFAULT '0',
  `AuthorID` int(11) NOT NULL DEFAULT '0',
  `Updated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  PRIMARY KEY (`ClassGradeID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ClassID` (`ClassID`),
  KEY `CAID` (`CAID`),
  KEY `StudentID` (`StudentID`),
  KEY `StudentGrades` (`SchoolID`,`ClassID`,`CAID`,`StudentID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ClassHomeCfg`
--

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

--
-- Table structure for table `ClassLessonPlanAssignments`
--

DROP TABLE IF EXISTS `ClassLessonPlanAssignments`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ClassLessonPlanAssignments` (
  `CLPAID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `ClassID` int(11) NOT NULL DEFAULT '0',
  `ClassLessonID` int(11) NOT NULL DEFAULT '0',
  `CAID` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`CLPAID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ClassID` (`ClassID`),
  KEY `ClassLessonID` (`ClassLessonID`),
  KEY `CAID` (`CAID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Classroom Lesson Plan Assignments';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ClassLessonPlanAttachments`
--

DROP TABLE IF EXISTS `ClassLessonPlanAttachments`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ClassLessonPlanAttachments` (
  `CLPAID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `ClassID` int(11) NOT NULL DEFAULT '0',
  `CLID` int(11) NOT NULL DEFAULT '0',
  `DocumentID` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`CLPAID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ClassID` (`ClassID`),
  KEY `CAID` (`CLID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ClassLessonPlanLabels`
--

DROP TABLE IF EXISTS `ClassLessonPlanLabels`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ClassLessonPlanLabels` (
  `CLPLID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `Label1` varchar(65) NOT NULL,
  `Label2` varchar(65) NOT NULL,
  `Label3` varchar(65) NOT NULL,
  `Label4` varchar(65) NOT NULL,
  `Sunday` tinyint(1) NOT NULL,
  `Monday` tinyint(1) NOT NULL,
  `Tuesday` tinyint(1) NOT NULL,
  `Wednesday` tinyint(1) NOT NULL,
  `Thursday` tinyint(1) NOT NULL,
  `Friday` tinyint(1) NOT NULL,
  `Saturday` tinyint(1) NOT NULL,
  PRIMARY KEY (`CLPLID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ClassLessonPlanStandards`
--

DROP TABLE IF EXISTS `ClassLessonPlanStandards`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ClassLessonPlanStandards` (
  `CLPSID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `ClassID` int(11) NOT NULL DEFAULT '0',
  `ClassLessonID` int(11) NOT NULL DEFAULT '0',
  `SEID` int(11) NOT NULL DEFAULT '0' COMMENT 'GSID Grade Standards',
  PRIMARY KEY (`CLPSID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ClassID` (`ClassID`),
  KEY `ClassLessonID` (`ClassLessonID`),
  KEY `SEID` (`SEID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Classroom Lesson Plan Assignments';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ClassLessonPlans`
--

DROP TABLE IF EXISTS `ClassLessonPlans`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ClassLessonPlans` (
  `ClassLessonID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `ClassID` int(11) NOT NULL DEFAULT '0',
  `UnitNumber` smallint(6) NOT NULL,
  `SubjectID` int(11) NOT NULL DEFAULT '0',
  `Date` date NOT NULL DEFAULT '0000-00-00',
  `Topic` varchar(128) NOT NULL DEFAULT '',
  `Status` int(11) NOT NULL DEFAULT '0',
  `Objectives` text NOT NULL,
  `Resources` text NOT NULL,
  `Procedures` text NOT NULL,
  `Evaluation` text NOT NULL,
  `Standards` text NOT NULL,
  `Notes` text NOT NULL,
  `Homework` text NOT NULL,
  UNIQUE KEY `ClassEventID` (`ClassLessonID`),
  KEY `ClassID` (`ClassID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `SubjectID` (`SubjectID`),
  KEY `Date` (`Date`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ClassLogs`
--

DROP TABLE IF EXISTS `ClassLogs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ClassLogs` (
  `CLID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `ClassID` int(11) NOT NULL,
  `UserID` int(11) NOT NULL,
  `Updated` datetime NOT NULL,
  PRIMARY KEY (`CLID`),
  KEY `SchoolID` (`SchoolID`,`ClassID`),
  KEY `ClassID` (`ClassID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ClassPeriods`
--

DROP TABLE IF EXISTS `ClassPeriods`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ClassPeriods` (
  `CPID` 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 (`CPID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ClassID` (`ClassID`),
  KEY `Day` (`Day`),
  KEY `PeriodID` (`PeriodID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Class Period Table';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ClassSeating`
--

DROP TABLE IF EXISTS `ClassSeating`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ClassSeating` (
  `CSID` 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',
  `Row` int(11) NOT NULL DEFAULT '0',
  `Col` int(11) NOT NULL DEFAULT '0',
  `DeskPos` varchar(12) NOT NULL COMMENT '(X,Y)',
  PRIMARY KEY (`CSID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ClassID` (`ClassID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ClassSeatingConfig`
--

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

--
-- Table structure for table `ClassSignatures`
--

DROP TABLE IF EXISTS `ClassSignatures`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ClassSignatures` (
  `CSID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `ClassID` int(11) NOT NULL,
  `Signature` text NOT NULL,
  PRIMARY KEY (`CSID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ClassID` (`ClassID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ClassStatisticChoices`
--

DROP TABLE IF EXISTS `ClassStatisticChoices`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ClassStatisticChoices` (
  `CSCID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `CSID` int(11) NOT NULL,
  `Sequence` int(11) NOT NULL,
  `Value` varchar(16) NOT NULL,
  `Label` varchar(48) NOT NULL,
  PRIMARY KEY (`CSCID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `USID` (`CSID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ClassStatisticGroups`
--

DROP TABLE IF EXISTS `ClassStatisticGroups`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ClassStatisticGroups` (
  `CSGID` 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 (`CSGID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ClassStatisticValues`
--

DROP TABLE IF EXISTS `ClassStatisticValues`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ClassStatisticValues` (
  `CSVID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `ClassID` int(11) NOT NULL DEFAULT '0',
  `CSID` int(11) NOT NULL DEFAULT '0',
  `Value` varchar(255) NOT NULL DEFAULT '',
  `ValueDate` date NOT NULL,
  PRIMARY KEY (`CSVID`),
  KEY `CompanyID` (`SchoolID`),
  KEY `UserID` (`ClassID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ClassStatistics`
--

DROP TABLE IF EXISTS `ClassStatistics`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ClassStatistics` (
  `CSID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `CSGID` 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',
  PRIMARY KEY (`CSID`),
  KEY `CompanyID` (`SchoolID`),
  KEY `USGID` (`CSGID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ClassStudents`
--

DROP TABLE IF EXISTS `ClassStudents`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ClassStudents` (
  `ClassStudentID` 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',
  `StudentNum` int(11) NOT NULL DEFAULT '0',
  `AcademicLevel` tinyint(4) NOT NULL,
  `SGSID` int(11) NOT NULL COMMENT 'School Grading Scale ID',
  `CollegeCredit` int(11) NOT NULL,
  `HSCredit` tinyint(4) NOT NULL DEFAULT '0',
  `EntryDate` date NOT NULL,
  UNIQUE KEY `ClassStudentID_2` (`ClassStudentID`),
  UNIQUE KEY `ClassID_2` (`ClassID`,`StudentID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ClassID` (`ClassID`),
  KEY `StudentID` (`StudentID`),
  KEY `ClassStudentID` (`ClassStudentID`),
  KEY `StudentNum` (`StudentNum`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ClassSubjects`
--

DROP TABLE IF EXISTS `ClassSubjects`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ClassSubjects` (
  `ClassSubjectID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `ClassID` int(11) NOT NULL DEFAULT '0',
  `Name` varchar(64) NOT NULL,
  `Description` varchar(128) NOT NULL DEFAULT '',
  `Code` varchar(10) NOT NULL,
  `Sequence` int(11) NOT NULL DEFAULT '0',
  `Time` time NOT NULL DEFAULT '00:00:00',
  `Page` int(11) NOT NULL DEFAULT '1',
  `Location` int(11) NOT NULL,
  `Color` varchar(8) NOT NULL,
  `ReportCardBlock` tinyint(2) NOT NULL DEFAULT '0',
  `SGSID` int(11) DEFAULT NULL,
  PRIMARY KEY (`ClassSubjectID`),
  UNIQUE KEY `ClassSubjectID` (`ClassSubjectID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ClassID` (`ClassID`),
  KEY `Class` (`SchoolID`,`ClassID`),
  KEY `SGSID` (`SGSID`),
  CONSTRAINT `ClassSubjects_ibfk_1` FOREIGN KEY (`SGSID`) REFERENCES `SchoolGradingScales` (`SGSID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ClassTeachers`
--

DROP TABLE IF EXISTS `ClassTeachers`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ClassTeachers` (
  `ClassTeacherID` 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',
  `Position` int(11) NOT NULL,
  UNIQUE KEY `ClassStudentID` (`ClassTeacherID`),
  UNIQUE KEY `SchoolID_2` (`SchoolID`,`ClassID`,`UserID`),
  KEY `ClassID` (`ClassID`),
  KEY `UserID` (`UserID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ClassVisitors`
--

DROP TABLE IF EXISTS `ClassVisitors`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ClassVisitors` (
  `ClassVisitorID` 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',
  `DateTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Duration` time NOT NULL,
  PRIMARY KEY (`ClassVisitorID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ClassID` (`ClassID`),
  KEY `DateTime` (`DateTime`),
  KEY `Visitor` (`SchoolID`,`ClassID`,`UserID`,`DateTime`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `Classes`
--

DROP TABLE IF EXISTS `Classes`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Classes` (
  `ClassID` int(11) NOT NULL AUTO_INCREMENT,
  `ClassConnectID` int(11) NOT NULL DEFAULT '0',
  `CoClassID` int(11) NOT NULL DEFAULT '0',
  `Classlink` int(11) NOT NULL DEFAULT '0',
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `SchoolYearID` int(11) NOT NULL DEFAULT '0',
  `SGSID` int(11) DEFAULT NULL,
  `ForceGS` int(11) NOT NULL DEFAULT '0' COMMENT 'Force Grading Scale Usage',
  `GradingComments` int(11) NOT NULL DEFAULT '0' COMMENT 'Force use of Common Comments',
  `Name` varchar(32) NOT NULL DEFAULT '',
  `Description` varchar(64) NOT NULL DEFAULT '',
  `Color` varchar(6) NOT NULL DEFAULT '',
  `DisplayEmail` int(11) NOT NULL,
  `Resources` int(11) NOT NULL DEFAULT '1',
  `ClassNum` varchar(16) NOT NULL DEFAULT '0',
  `DepartmentID` int(11) NOT NULL DEFAULT '0',
  `Section` varchar(16) NOT NULL DEFAULT '',
  `Course` varchar(16) NOT NULL,
  `CourseAlt` varchar(16) NOT NULL,
  `PrimaryStaffID` int(11) NOT NULL DEFAULT '0',
  `SecondaryStaffID` int(11) NOT NULL DEFAULT '0',
  `GradingStructure` int(11) NOT NULL DEFAULT '1' COMMENT '1=Point Value, 2=all worth 100%',
  `Grade` int(11) NOT NULL DEFAULT '99',
  `Subject` int(11) NOT NULL,
  `StudentGroupID` int(11) NOT NULL,
  `Time` time NOT NULL DEFAULT '00:00:00',
  `LocationID` int(11) NOT NULL DEFAULT '0',
  `FacilityID` int(11) NOT NULL DEFAULT '0',
  `HomeRoom` int(11) NOT NULL DEFAULT '0',
  `Calendar` int(11) NOT NULL DEFAULT '0',
  `News` int(11) NOT NULL DEFAULT '0',
  `Docs` int(11) NOT NULL DEFAULT '0',
  `Q1` int(11) NOT NULL DEFAULT '0',
  `Q2` int(11) NOT NULL DEFAULT '0',
  `Q3` int(11) NOT NULL DEFAULT '0',
  `Q4` int(11) NOT NULL DEFAULT '0',
  `Q5` int(11) NOT NULL DEFAULT '0',
  `Q6` int(11) NOT NULL DEFAULT '0',
  `Q7` int(11) NOT NULL DEFAULT '0',
  `Q8` int(11) NOT NULL DEFAULT '0',
  `Q9` int(11) NOT NULL DEFAULT '0',
  `Q10` int(11) NOT NULL DEFAULT '0',
  `Q11` int(11) NOT NULL DEFAULT '0',
  `Q12` int(11) NOT NULL DEFAULT '0',
  `S1` int(11) NOT NULL DEFAULT '0',
  `S2` int(11) NOT NULL DEFAULT '0',
  `S3` int(11) NOT NULL DEFAULT '0',
  `Monday` int(11) NOT NULL DEFAULT '0',
  `Tuesday` int(11) NOT NULL DEFAULT '0',
  `Wednesday` int(11) NOT NULL DEFAULT '0',
  `Thursday` int(11) NOT NULL DEFAULT '0',
  `Friday` int(11) NOT NULL DEFAULT '0',
  `Saturday` int(11) NOT NULL DEFAULT '0',
  `Sunday` tinyint(4) NOT NULL,
  `PeriodID` int(11) NOT NULL DEFAULT '0',
  `Priority` int(11) NOT NULL DEFAULT '0',
  `Page` int(11) NOT NULL DEFAULT '1',
  `Location` int(11) NOT NULL COMMENT '1=left,2=right,3-=center',
  `StartTime` time NOT NULL DEFAULT '00:00:00',
  `Duration` int(11) NOT NULL DEFAULT '0',
  `Elementary` int(11) NOT NULL DEFAULT '0',
  `PhotoID` int(11) NOT NULL DEFAULT '0',
  `Maximum` int(11) NOT NULL DEFAULT '0',
  `Type` int(11) NOT NULL DEFAULT '0',
  `Public` int(11) NOT NULL DEFAULT '0',
  `ParentAccess` int(11) NOT NULL DEFAULT '0',
  `ParentViewable` int(11) NOT NULL DEFAULT '0',
  `ParentInstructional` int(11) NOT NULL DEFAULT '1',
  `Internal` int(11) NOT NULL DEFAULT '0',
  `ExtID` int(11) NOT NULL DEFAULT '0',
  `WebSite` int(11) NOT NULL DEFAULT '1',
  `Posted` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `PassFail` int(11) NOT NULL DEFAULT '0',
  `RequireID` int(11) NOT NULL DEFAULT '0',
  `Credit` float NOT NULL DEFAULT '0',
  `Weight` float NOT NULL DEFAULT '1',
  `IncludeGradeCard` int(11) NOT NULL DEFAULT '1',
  `IncludeGPA` int(11) NOT NULL DEFAULT '0',
  `IncludeNumAvg` int(11) NOT NULL,
  `IncludeTranscripts` int(11) NOT NULL DEFAULT '1',
  `FullTerm` int(11) NOT NULL DEFAULT '0',
  `GradeModel` tinyint(4) NOT NULL DEFAULT '1' COMMENT '1:Numeric 2:Standards',
  `Calculation` tinyint(4) NOT NULL DEFAULT '1',
  `GradeStyle` int(11) NOT NULL DEFAULT '0',
  `GradeStyleLocked` int(11) NOT NULL DEFAULT '0',
  `ActionDefault` int(11) NOT NULL DEFAULT '0',
  `GradingPeriods` int(11) NOT NULL,
  `SGrading` int(11) NOT NULL DEFAULT '0',
  `Term1` float NOT NULL DEFAULT '0',
  `Term2` float NOT NULL DEFAULT '0',
  `Final` float NOT NULL DEFAULT '0',
  `Honors` int(11) NOT NULL DEFAULT '0' COMMENT 'Depreciated (now using GPAScale)',
  `HonorPoints` float NOT NULL DEFAULT '0',
  `College` int(11) NOT NULL DEFAULT '0' COMMENT 'Depreciated (now using GPAScale)',
  `CollegePoints` float NOT NULL DEFAULT '0',
  `ViewableGrades` int(11) NOT NULL DEFAULT '1',
  `ClassDCID` int(11) NOT NULL COMMENT 'Class District Category ID',
  `ParentClassID` int(11) NOT NULL DEFAULT '0',
  `GPAScale` int(11) NOT NULL DEFAULT '0',
  `Shoutboard` int(11) NOT NULL,
  `ReportCardBlock` tinyint(2) NOT NULL DEFAULT '0',
  `ClassAvg` float NOT NULL DEFAULT '0',
  `ClassCumAvg` float NOT NULL DEFAULT '0',
  PRIMARY KEY (`ClassID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `SchoolYearID` (`SchoolYearID`),
  KEY `Q1` (`Q1`),
  KEY `Q2` (`Q2`),
  KEY `Q3` (`Q3`),
  KEY `Q4` (`Q4`),
  KEY `Q5` (`Q5`),
  KEY `HomeRoom` (`HomeRoom`),
  KEY `Monday` (`Monday`),
  KEY `Tuesday` (`Tuesday`),
  KEY `Wednesday` (`Wednesday`),
  KEY `Thursday` (`Thursday`),
  KEY `Friday` (`Friday`),
  KEY `PrimaryStaffID` (`PrimaryStaffID`),
  KEY `Type` (`Type`),
  KEY `Public` (`Public`),
  KEY `S1` (`S1`),
  KEY `S2` (`S2`),
  KEY `PeriodID` (`PeriodID`),
  KEY `ClassConnectID` (`ClassConnectID`),
  KEY `ParentClassID` (`ParentClassID`),
  KEY `SGSID` (`SGSID`),
  CONSTRAINT `Classes_ibfk_1` FOREIGN KEY (`SGSID`) REFERENCES `SchoolGradingScales` (`SGSID`) ON DELETE SET NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `Classified`
--

DROP TABLE IF EXISTS `Classified`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Classified` (
  `CID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `CCID` int(11) NOT NULL DEFAULT '0',
  `StartDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `StopDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Message` text NOT NULL,
  `Title` varchar(32) NOT NULL DEFAULT '',
  `Price` float NOT NULL DEFAULT '0',
  `Approved` int(11) NOT NULL DEFAULT '0',
  `Alert` int(11) NOT NULL DEFAULT '0',
  `AuthorID` int(11) NOT NULL DEFAULT '0',
  `PictureFile` varchar(32) NOT NULL DEFAULT '',
  `ApprovedID` int(11) NOT NULL DEFAULT '0',
  `ApproveDate` date NOT NULL DEFAULT '0000-00-00',
  PRIMARY KEY (`CID`),
  UNIQUE KEY `CID_2` (`CID`),
  KEY `CID` (`CID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `StartDate` (`StartDate`),
  KEY `StopDate` (`StopDate`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ClearAllData`
--

DROP TABLE IF EXISTS `ClearAllData`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ClearAllData` (
  `CADID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `UserID` int(11) NOT NULL,
  `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `IPAddress` varchar(16) NOT NULL,
  PRIMARY KEY (`CADID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Clear All Data Button Tracking';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `Colleges`
--

DROP TABLE IF EXISTS `Colleges`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Colleges` (
  `CollegeID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `Name` varchar(32) NOT NULL DEFAULT '0',
  `Code` varchar(4) NOT NULL DEFAULT '',
  `Description` varchar(64) NOT NULL DEFAULT '',
  `Credits` float NOT NULL DEFAULT '0',
  PRIMARY KEY (`CollegeID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Graduation Requirements';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `CommBlipListUsers`
--

DROP TABLE IF EXISTS `CommBlipListUsers`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `CommBlipListUsers` (
  `NLUID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `NLID` int(11) NOT NULL,
  `Type` int(11) NOT NULL,
  `ID` int(11) NOT NULL COMMENT 'UserID, FamilyID, StudentID',
  `Name` varchar(32) NOT NULL COMMENT 'not used ',
  `ListType` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0=Text  1=Internal',
  PRIMARY KEY (`NLUID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `NLID` (`NLID`),
  KEY `Type` (`Type`),
  KEY `ID` (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `CommBlipLists`
--

DROP TABLE IF EXISTS `CommBlipLists`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `CommBlipLists` (
  `NLID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `Name` varchar(32) NOT NULL,
  `Description` varchar(255) NOT NULL DEFAULT '',
  `Type` int(11) NOT NULL DEFAULT '0' COMMENT '1=Stu, 2=Fam, 3=Emp',
  `Sequence` int(11) NOT NULL DEFAULT '0',
  `Open` int(11) NOT NULL DEFAULT '1',
  `Sync` int(11) NOT NULL DEFAULT '0',
  `ListNumber` int(11) NOT NULL DEFAULT '0',
  `ListType` int(11) NOT NULL,
  PRIMARY KEY (`NLID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `Type` (`Type`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `CommBlipMsg`
--

DROP TABLE IF EXISTS `CommBlipMsg`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `CommBlipMsg` (
  `CNMID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `UserID` int(11) NOT NULL,
  `Type` int(2) NOT NULL COMMENT '-1=Report Cards -2=PT Conf',
  `Title` varchar(32) NOT NULL COMMENT 'Brief Message',
  `Description` varchar(96) NOT NULL COMMENT 'Additional Details',
  `URL` varchar(255) NOT NULL,
  `Expiration` int(11) NOT NULL COMMENT 'UnixTimeStamp',
  `ID` int(11) NOT NULL COMMENT 'Wild card ID Field',
  `Created` int(11) NOT NULL COMMENT 'UniixTimeStamp',
  PRIMARY KEY (`CNMID`),
  KEY `SchoolID` (`SchoolID`,`UserID`),
  KEY `Expiration` (`Expiration`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `CommBlipRecipients`
--

DROP TABLE IF EXISTS `CommBlipRecipients`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `CommBlipRecipients` (
  `CNRID` int(11) NOT NULL AUTO_INCREMENT,
  `CNMID` int(11) NOT NULL,
  `SchoolID` int(11) NOT NULL,
  `WCID` int(11) NOT NULL COMMENT 'Wild Card for multiple uses',
  `Name` varchar(64) NOT NULL,
  `Type` tinyint(3) unsigned NOT NULL COMMENT 'Recipient type 1-emp 3-stu 4-fam',
  `Complete` tinyint(3) unsigned NOT NULL DEFAULT '0',
  `UserID` int(11) NOT NULL,
  `Acknowledged` int(11) NOT NULL COMMENT 'UnixTimeStamp',
  PRIMARY KEY (`CNRID`),
  KEY `Complete` (`Complete`),
  KEY `CommTMJID` (`CNMID`),
  KEY `SchoolID_2` (`SchoolID`,`UserID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `CommBlipTypes`
--

DROP TABLE IF EXISTS `CommBlipTypes`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `CommBlipTypes` (
  `CNTMID` 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 (`CNTMID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `SchoolID_2` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `CommConfig`
--

DROP TABLE IF EXISTS `CommConfig`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `CommConfig` (
  `CommCID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `SR_Enabled` int(11) NOT NULL DEFAULT '1',
  `SR_UserID` varchar(48) NOT NULL,
  `SR_PIN` varchar(48) NOT NULL,
  `SR_Username` varchar(16) NOT NULL,
  `SR_Password` varchar(16) NOT NULL,
  `SR_SyncDT` datetime NOT NULL,
  `TW_Enabled` int(11) NOT NULL,
  `TW_Config` int(11) NOT NULL,
  `TW_AccountSID` varchar(128) NOT NULL,
  `TW_AuthToken` varchar(128) NOT NULL,
  `TW_PhoneNumber` varchar(24) NOT NULL,
  `Updated` datetime NOT NULL,
  PRIMARY KEY (`CommCID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `CommNotificationMsg`
--

DROP TABLE IF EXISTS `CommNotificationMsg`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `CommNotificationMsg` (
  `CNMID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `UserID` int(11) NOT NULL,
  `Type` int(2) NOT NULL COMMENT '-1=Report Cards -2=PT Conf',
  `Title` varchar(32) NOT NULL COMMENT 'Brief Message',
  `Description` varchar(64) NOT NULL COMMENT 'Additional Details',
  `Expiration` datetime NOT NULL,
  `ID` int(11) NOT NULL COMMENT 'Wild card ID Field',
  `Created` datetime NOT NULL,
  PRIMARY KEY (`CNMID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `CommNotificationRec`
--

DROP TABLE IF EXISTS `CommNotificationRec`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `CommNotificationRec` (
  `CNRID` int(11) NOT NULL AUTO_INCREMENT,
  `CNMID` int(11) NOT NULL,
  `SchoolID` int(11) NOT NULL,
  `WCID` int(11) NOT NULL COMMENT 'Wild Card for multiple uses',
  `Name` varchar(64) NOT NULL,
  `Type` tinyint(3) unsigned NOT NULL COMMENT 'Recipient type 1-emp 3-stu 4-fam',
  `Complete` tinyint(3) unsigned NOT NULL DEFAULT '0',
  `UserID` int(11) NOT NULL,
  `Acknowledged` datetime NOT NULL,
  PRIMARY KEY (`CNRID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `Complete` (`Complete`),
  KEY `CommTMJID` (`CNMID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `CommNotificationTypes`
--

DROP TABLE IF EXISTS `CommNotificationTypes`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `CommNotificationTypes` (
  `CNTMID` 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 (`CNTMID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `CommNotifyListUsers`
--

DROP TABLE IF EXISTS `CommNotifyListUsers`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `CommNotifyListUsers` (
  `NLUID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `NLID` int(11) NOT NULL,
  `Type` int(11) NOT NULL,
  `ID` int(11) NOT NULL COMMENT 'UserID, FamilyID, StudentID',
  `Name` varchar(32) NOT NULL COMMENT 'not used ',
  `PhoneNumber` varchar(16) NOT NULL COMMENT 'not used',
  `ListType` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0=Text  1=Internal',
  PRIMARY KEY (`NLUID`),
  UNIQUE KEY `SchoolID` (`SchoolID`,`NLID`,`ID`),
  KEY `NLID` (`NLID`),
  KEY `Type` (`Type`),
  KEY `ID` (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `CommNotifyLists`
--

DROP TABLE IF EXISTS `CommNotifyLists`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `CommNotifyLists` (
  `NLID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `Name` varchar(32) NOT NULL,
  `Description` varchar(255) NOT NULL DEFAULT '',
  `Type` int(11) NOT NULL DEFAULT '0' COMMENT '1=Emp, 2=Fam, 3=Stu',
  `Sequence` int(11) NOT NULL DEFAULT '0',
  `Open` int(11) NOT NULL DEFAULT '1',
  `Sync` int(11) NOT NULL DEFAULT '0',
  `ListNumber` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`NLID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `Type` (`Type`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `CommSMSMsgs`
--

DROP TABLE IF EXISTS `CommSMSMsgs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `CommSMSMsgs` (
  `CSMID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `UserID` int(11) NOT NULL,
  `Type` int(11) NOT NULL COMMENT '1=PAN, 2=BATCH, 99=PopText',
  `DateTime` datetime NOT NULL,
  `Vendor` int(11) NOT NULL COMMENT '1=Twilio, 2=Mandrill',
  `SMSID` varchar(64) NOT NULL,
  `ToNum` varchar(128) NOT NULL,
  `FromNum` varchar(128) NOT NULL,
  `Status` varchar(64) NOT NULL,
  PRIMARY KEY (`CSMID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `UserID` (`UserID`),
  KEY `SMSID` (`SMSID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `CommTemplates`
--

DROP TABLE IF EXISTS `CommTemplates`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `CommTemplates` (
  `CTID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `Title` varchar(32) NOT NULL,
  `Description` varchar(128) NOT NULL,
  `Content` text NOT NULL,
  `Published` int(11) NOT NULL,
  PRIMARY KEY (`CTID`),
  KEY `CompanyID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `CommTextMsgJobs`
--

DROP TABLE IF EXISTS `CommTextMsgJobs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `CommTextMsgJobs` (
  `CommTMJID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `ClassID` int(11) NOT NULL,
  `AuthorID` int(11) NOT NULL,
  `DateTime` datetime NOT NULL,
  `Count` int(11) NOT NULL,
  `Title` varchar(32) NOT NULL,
  `Message` varchar(160) NOT NULL,
  `Status` tinyint(3) unsigned NOT NULL,
  `OrderID` int(11) NOT NULL,
  `ReturnCode` text NOT NULL,
  PRIMARY KEY (`CommTMJID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ClassID` (`ClassID`),
  KEY `OrderID` (`OrderID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `CommTextMsgListUsers`
--

DROP TABLE IF EXISTS `CommTextMsgListUsers`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `CommTextMsgListUsers` (
  `NLUID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `NLID` int(11) NOT NULL,
  `Type` int(11) NOT NULL,
  `ID` int(11) NOT NULL COMMENT 'UserID, FamilyID, StudentID',
  `Name` varchar(32) NOT NULL COMMENT 'not used ',
  `PhoneNumber` varchar(16) NOT NULL COMMENT 'not used',
  `ListType` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0=Text  1=Internal',
  PRIMARY KEY (`NLUID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `NLID` (`NLID`),
  KEY `Type` (`Type`),
  KEY `ID` (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `CommTextMsgRecipients`
--

DROP TABLE IF EXISTS `CommTextMsgRecipients`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `CommTextMsgRecipients` (
  `CommTMRID` int(11) NOT NULL AUTO_INCREMENT,
  `CommTMJID` int(11) NOT NULL,
  `SchoolID` int(11) NOT NULL,
  `ClassID` int(11) NOT NULL,
  `Name` varchar(64) NOT NULL,
  `Type` tinyint(3) unsigned NOT NULL,
  `Address` varchar(128) NOT NULL,
  `Email` varchar(128) NOT NULL,
  `Complete` tinyint(3) unsigned NOT NULL DEFAULT '0',
  `CSMID` int(11) NOT NULL COMMENT 'CommSMSMID',
  PRIMARY KEY (`CommTMRID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `Complete` (`Complete`),
  KEY `Address` (`Address`),
  KEY `CommTMJID` (`CommTMJID`),
  KEY `VendorID` (`CSMID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `CommUsers`
--

DROP TABLE IF EXISTS `CommUsers`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `CommUsers` (
  `CommUID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `Type` int(11) NOT NULL COMMENT '1=Emp, 2=Fam, 3=Stu',
  `ID` int(11) NOT NULL COMMENT 'UserID, ContactID, StudentID',
  `Name` varchar(32) NOT NULL,
  `VPhone` varchar(16) NOT NULL,
  `Phone` varchar(16) NOT NULL,
  `Email` varchar(128) NOT NULL COMMENT 'SMS Email Address',
  `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',
  `NotifyBy` int(11) NOT NULL DEFAULT '0',
  `FamilyID` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`CommUID`),
  UNIQUE KEY `SchoolID` (`SchoolID`,`Type`,`ID`),
  KEY `Type` (`Type`),
  KEY `ID` (`ID`),
  KEY `Name` (`Name`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `CommVoiceMsgJobs`
--

DROP TABLE IF EXISTS `CommVoiceMsgJobs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `CommVoiceMsgJobs` (
  `CVMJID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `ClassID` int(11) NOT NULL,
  `CVMRID` int(11) NOT NULL,
  `Title` varchar(64) NOT NULL,
  `AuthorID` int(11) NOT NULL,
  `DateTime` datetime NOT NULL,
  `Count` int(11) NOT NULL,
  `Status` tinyint(3) unsigned NOT NULL,
  `VendorID` varchar(36) NOT NULL,
  `ReturnCode` text NOT NULL,
  PRIMARY KEY (`CVMJID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ClassID` (`ClassID`),
  KEY `VendorID` (`VendorID`),
  KEY `DateTime` (`DateTime`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `CommVoiceMsgRecipients`
--

DROP TABLE IF EXISTS `CommVoiceMsgRecipients`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `CommVoiceMsgRecipients` (
  `CVMRID` int(11) NOT NULL AUTO_INCREMENT,
  `CVMJID` int(11) NOT NULL,
  `SchoolID` int(11) NOT NULL,
  `ClassID` int(11) NOT NULL,
  `Name` varchar(64) NOT NULL,
  `Type` tinyint(3) unsigned NOT NULL,
  `Phone` varchar(16) NOT NULL,
  `VendorID` varchar(36) NOT NULL,
  `Status` varchar(32) NOT NULL,
  PRIMARY KEY (`CVMRID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `Address` (`Phone`),
  KEY `ClassID` (`ClassID`),
  KEY `VendorID` (`VendorID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `CommVoiceMsgRecordings`
--

DROP TABLE IF EXISTS `CommVoiceMsgRecordings`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `CommVoiceMsgRecordings` (
  `CVMRID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `CreateDateTime` datetime NOT NULL,
  `VendorID` varchar(36) NOT NULL,
  `Message` text NOT NULL,
  `Label` varchar(64) NOT NULL,
  PRIMARY KEY (`CVMRID`),
  KEY `CompanyID` (`SchoolID`),
  KEY `SID` (`VendorID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `Contact`
--

DROP TABLE IF EXISTS `Contact`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Contact` (
  `ContactID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `AuthorID` int(11) NOT NULL DEFAULT '0',
  `FirstName` varchar(24) NOT NULL DEFAULT '',
  `NickName` varchar(24) NOT NULL,
  `Suffix` varchar(10) NOT NULL DEFAULT '',
  `LastName` varchar(32) NOT NULL DEFAULT '',
  `Gender` int(11) NOT NULL DEFAULT '0',
  `MiddleName` varchar(32) NOT NULL DEFAULT '',
  `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 '',
  `Country` varchar(64) NOT NULL DEFAULT '',
  `WorkPhone` varchar(24) NOT NULL DEFAULT '',
  `WorkPhone2` varchar(24) NOT NULL DEFAULT '',
  `WorkExt` char(3) NOT NULL DEFAULT '',
  `HomePhone` varchar(24) NOT NULL DEFAULT '',
  `FaxPhone` varchar(24) NOT NULL DEFAULT '',
  `CellPhone` varchar(24) NOT NULL DEFAULT '',
  `EMail` varchar(128) NOT NULL DEFAULT '',
  `Email2` varchar(128) NOT NULL DEFAULT '',
  `Email3` varchar(128) NOT NULL DEFAULT '',
  `Email4` varchar(128) NOT NULL DEFAULT '',
  `CCID` int(11) NOT NULL DEFAULT '0',
  `TitleID` int(11) NOT NULL DEFAULT '0',
  `JobDescription` varchar(64) NOT NULL DEFAULT '',
  `Mine` int(11) NOT NULL DEFAULT '0',
  `Updated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Note` text NOT NULL,
  `DOB` date NOT NULL DEFAULT '0000-00-00',
  `SchoolName` varchar(32) NOT NULL DEFAULT '',
  `SchoolYear` int(11) NOT NULL DEFAULT '0',
  `Deleted` int(11) NOT NULL DEFAULT '0',
  `UserID` int(11) NOT NULL DEFAULT '0',
  `Member` int(11) NOT NULL DEFAULT '0',
  `MemberRepID` int(11) NOT NULL DEFAULT '0',
  `ExtID` varchar(16) NOT NULL DEFAULT '0' COMMENT 'Student ExtID',
  `ID` varchar(12) NOT NULL COMMENT 'Contact ExtID',
  PRIMARY KEY (`ContactID`),
  KEY `LastName` (`LastName`),
  KEY `EMail` (`EMail`),
  KEY `Email2` (`Email2`),
  KEY `Email3` (`Email3`),
  KEY `Email4` (`Email4`),
  KEY `SchoolID` (`SchoolID`),
  KEY `AuthorID` (`AuthorID`),
  KEY `DOB` (`DOB`),
  KEY `Updated` (`Updated`),
  KEY `Deleted` (`Deleted`),
  KEY `Birthday` (`SchoolID`,`DOB`,`Deleted`,`Mine`),
  KEY `EmailSearch` (`SchoolID`,`Deleted`,`EMail`,`Email2`,`Email3`,`Email4`),
  KEY `CCID` (`CCID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ContactCatagories`
--

DROP TABLE IF EXISTS `ContactCatagories`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ContactCatagories` (
  `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 '',
  `CCGID` int(11) NOT NULL DEFAULT '0',
  `Sequence` int(11) NOT NULL DEFAULT '0',
  `Ctype` int(11) NOT NULL DEFAULT '1',
  PRIMARY KEY (`CatagoryID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `CCGID` (`CCGID`),
  KEY `Sequence` (`Sequence`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ContactCatagoryCompanies`
--

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

--
-- Table structure for table `ContactCatagoryContacts`
--

DROP TABLE IF EXISTS `ContactCatagoryContacts`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ContactCatagoryContacts` (
  `CCCID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `ContactID` int(11) NOT NULL DEFAULT '0',
  `CatagoryID` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`CCCID`),
  UNIQUE KEY `CCCID` (`CCCID`),
  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 `ContactCategoryGroups`
--

DROP TABLE IF EXISTS `ContactCategoryGroups`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ContactCategoryGroups` (
  `CCGID` 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',
  `Ctype` int(11) NOT NULL DEFAULT '1',
  PRIMARY KEY (`CCGID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `Ctype` (`Ctype`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ContactCompanies`
--

DROP TABLE IF EXISTS `ContactCompanies`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ContactCompanies` (
  `CCID` int(11) NOT NULL AUTO_INCREMENT,
  `PCCID` int(11) NOT NULL DEFAULT '0',
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `AuthorID` int(11) NOT NULL DEFAULT '0',
  `Updated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Name` varchar(128) NOT NULL DEFAULT '',
  `Address1` varchar(32) NOT NULL DEFAULT '',
  `Address2` varchar(32) NOT NULL DEFAULT '',
  `City` varchar(32) NOT NULL DEFAULT '',
  `State` varchar(32) NOT NULL,
  `MailingAddress1` varchar(32) NOT NULL DEFAULT '',
  `MailingAddress2` varchar(32) NOT NULL DEFAULT '',
  `MailingCity` varchar(32) NOT NULL DEFAULT '',
  `MailingState` varchar(32) NOT NULL,
  `MailingZip` varchar(10) NOT NULL DEFAULT '',
  `MailingCountry` varchar(32) NOT NULL,
  `BillingAddress1` varchar(32) NOT NULL DEFAULT '',
  `BillingAddress2` varchar(32) NOT NULL DEFAULT '',
  `BillingCity` varchar(32) NOT NULL DEFAULT '',
  `BillingState` varchar(32) NOT NULL,
  `BillingZip` varchar(10) NOT NULL DEFAULT '',
  `BillingCountry` varchar(32) NOT NULL,
  `Phone` varchar(24) NOT NULL DEFAULT '',
  `PhoneUnListed` int(11) NOT NULL DEFAULT '0',
  `Fax` varchar(16) NOT NULL DEFAULT '',
  `WebSite` varchar(64) NOT NULL DEFAULT '',
  `Zip` varchar(10) NOT NULL DEFAULT '',
  `Country` varchar(64) NOT NULL DEFAULT '',
  `PrimaryContactID` int(11) NOT NULL DEFAULT '0',
  `Abrv` varchar(8) NOT NULL DEFAULT '',
  `Type` int(11) NOT NULL DEFAULT '0',
  `Member` int(11) NOT NULL DEFAULT '0',
  `SalesRep` int(11) NOT NULL DEFAULT '0',
  `SupportRep` int(11) NOT NULL DEFAULT '0',
  `Auction` int(11) NOT NULL DEFAULT '0',
  `AuctionRep1` int(11) NOT NULL DEFAULT '0',
  `AuctionRep2` int(11) NOT NULL DEFAULT '0',
  `ContactEmail` varchar(128) NOT NULL DEFAULT '',
  `BillingEmail` varchar(128) NOT NULL DEFAULT '',
  `Vendor` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`CCID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `Name` (`Name`),
  KEY `SalesRep` (`SalesRep`),
  KEY `SupportRep` (`SupportRep`),
  KEY `Member` (`Member`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ContactCompanyHistory`
--

DROP TABLE IF EXISTS `ContactCompanyHistory`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ContactCompanyHistory` (
  `CCHID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `CCID` int(11) NOT NULL DEFAULT '0',
  `AuthorID` int(11) NOT NULL DEFAULT '0',
  `ClassID` int(11) NOT NULL DEFAULT '0',
  `Date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Message` text NOT NULL,
  `Reminder` int(11) NOT NULL DEFAULT '0',
  `Subject` varchar(32) NOT NULL DEFAULT '',
  PRIMARY KEY (`CCHID`),
  KEY `CHID` (`CCHID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `AuthorID` (`AuthorID`),
  KEY `ClassID` (`ClassID`),
  KEY `Date` (`Date`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ContactCompanyStatisticValues`
--

DROP TABLE IF EXISTS `ContactCompanyStatisticValues`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ContactCompanyStatisticValues` (
  `CSVID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `CCID` int(11) NOT NULL DEFAULT '0',
  `CSID` int(11) NOT NULL DEFAULT '0',
  `Value` varchar(255) NOT NULL DEFAULT '',
  PRIMARY KEY (`CSVID`),
  KEY `CompanyID` (`SchoolID`),
  KEY `CCID` (`CCID`),
  KEY `CSID` (`CSID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ContactEmailLog`
--

DROP TABLE IF EXISTS `ContactEmailLog`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ContactEmailLog` (
  `CEID` 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',
  `Subject` varchar(128) NOT NULL DEFAULT '',
  `DateTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `PopMessageID` int(11) NOT NULL DEFAULT '0',
  `InComing` int(11) NOT NULL DEFAULT '0',
  `OutGoing` int(11) NOT NULL DEFAULT '1',
  `CEMID` int(11) NOT NULL,
  PRIMARY KEY (`CEID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `UserID` (`UserID`),
  KEY `ContactID` (`ContactID`),
  KEY `PopMessageID` (`PopMessageID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ContactEmailMessages`
--

DROP TABLE IF EXISTS `ContactEmailMessages`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ContactEmailMessages` (
  `CEMID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `Subject` varchar(128) NOT NULL,
  `Header` text NOT NULL,
  `Message` text NOT NULL,
  PRIMARY KEY (`CEMID`),
  UNIQUE KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ContactHistory`
--

DROP TABLE IF EXISTS `ContactHistory`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ContactHistory` (
  `CHID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `ContactID` int(11) NOT NULL DEFAULT '0',
  `AuthorID` int(11) NOT NULL DEFAULT '0',
  `ClassID` 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,
  `Reminder` int(11) NOT NULL DEFAULT '0',
  `Private` int(11) NOT NULL DEFAULT '0',
  `Type` int(11) NOT NULL DEFAULT '0',
  `Status` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`CHID`),
  KEY `CHID` (`CHID`),
  KEY `AuthorID` (`AuthorID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ClassID` (`ClassID`),
  KEY `Date` (`Date`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ContactStatisticChoices`
--

DROP TABLE IF EXISTS `ContactStatisticChoices`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ContactStatisticChoices` (
  `CSCID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `CSID` int(11) NOT NULL,
  `Sequence` int(11) NOT NULL,
  `Value` varchar(16) NOT NULL,
  `Label` varchar(48) NOT NULL,
  PRIMARY KEY (`CSCID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `SSID` (`CSID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ContactStatisticGroups`
--

DROP TABLE IF EXISTS `ContactStatisticGroups`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ContactStatisticGroups` (
  `CSGID` 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',
  `Ctype` int(11) NOT NULL DEFAULT '1',
  PRIMARY KEY (`CSGID`),
  KEY `CompanyID` (`SchoolID`),
  KEY `Sequence` (`Sequence`),
  KEY `Ctype` (`Ctype`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ContactStatisticValues`
--

DROP TABLE IF EXISTS `ContactStatisticValues`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ContactStatisticValues` (
  `CSVID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `ContactID` int(11) NOT NULL DEFAULT '0',
  `CSID` int(11) NOT NULL DEFAULT '0',
  `Value` varchar(255) NOT NULL DEFAULT '',
  `ValueDate` date NOT NULL,
  PRIMARY KEY (`CSVID`),
  KEY `CompanyID` (`SchoolID`),
  KEY `ContactID` (`ContactID`),
  KEY `CSID` (`CSID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ContactStatistics`
--

DROP TABLE IF EXISTS `ContactStatistics`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ContactStatistics` (
  `CSID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `CSGID` int(11) NOT NULL DEFAULT '0',
  `Sequence` int(11) NOT NULL DEFAULT '0',
  `Name` varchar(32) NOT NULL DEFAULT '',
  `Description` varchar(255) NOT NULL DEFAULT '',
  `Private` int(11) NOT NULL DEFAULT '0',
  `Ctype` int(11) NOT NULL DEFAULT '1',
  `STYPE` int(11) NOT NULL DEFAULT '1' COMMENT '1=Text; 2=Multiple Choice; 3=Date',
  PRIMARY KEY (`CSID`),
  KEY `CompanyID` (`SchoolID`),
  KEY `CSGID` (`CSGID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ContactSync`
--

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

--
-- Table structure for table `ContactTextMsg`
--

DROP TABLE IF EXISTS `ContactTextMsg`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ContactTextMsg` (
  `CTMID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `ContactID` int(11) NOT NULL DEFAULT '0',
  `Provider` int(11) NOT NULL DEFAULT '0',
  `Address` varchar(128) NOT NULL DEFAULT '',
  PRIMARY KEY (`CTMID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ContactID` (`ContactID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Contact Text Message Numbers';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ContactTextMsgJobs`
--

DROP TABLE IF EXISTS `ContactTextMsgJobs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ContactTextMsgJobs` (
  `CTMJID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `AuthorID` int(11) NOT NULL,
  `DateTime` datetime NOT NULL,
  `Count` int(11) NOT NULL,
  `Message` varchar(160) NOT NULL,
  `Status` tinyint(3) unsigned NOT NULL,
  PRIMARY KEY (`CTMJID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `DateTime` (`DateTime`),
  KEY `Status` (`Status`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ContactTextMsgSendees`
--

DROP TABLE IF EXISTS `ContactTextMsgSendees`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ContactTextMsgSendees` (
  `CTMSID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `Name` varchar(64) NOT NULL,
  `Type` tinyint(3) unsigned NOT NULL,
  `Address` varchar(128) NOT NULL,
  `Complete` tinyint(3) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`CTMSID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `Complete` (`Complete`),
  KEY `Address` (`Address`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ContactUsers`
--

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

--
-- Table structure for table `CourseCfg`
--

DROP TABLE IF EXISTS `CourseCfg`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `CourseCfg` (
  `CCID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `Label` varchar(128) NOT NULL DEFAULT '',
  `Status` int(11) NOT NULL DEFAULT '0',
  `OpenRegistration` int(11) NOT NULL DEFAULT '0',
  `Semester` int(11) NOT NULL DEFAULT '0',
  `StartGrade` int(11) NOT NULL,
  `EndGrade` int(11) NOT NULL,
  `ProcessReport` text NOT NULL,
  `Parameters` text NOT NULL,
  PRIMARY KEY (`CCID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Course Regrestration';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `CourseClasses`
--

DROP TABLE IF EXISTS `CourseClasses`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `CourseClasses` (
  `CCID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `CourseID` int(11) NOT NULL DEFAULT '0',
  `ClassID` int(11) NOT NULL DEFAULT '0',
  `TeacherID` int(11) NOT NULL DEFAULT '0',
  `Semester` int(11) NOT NULL DEFAULT '0',
  `FacilityID` int(11) NOT NULL,
  `PeriodID` int(11) NOT NULL,
  PRIMARY KEY (`CCID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ClassID` (`ClassID`),
  KEY `TeacherID` (`TeacherID`),
  KEY `CourseID` (`CourseID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `CourseFacilities`
--

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

--
-- Table structure for table `CourseGrades`
--

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

--
-- Table structure for table `CoursePeriods`
--

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

--
-- Table structure for table `CourseStudentConflicts`
--

DROP TABLE IF EXISTS `CourseStudentConflicts`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `CourseStudentConflicts` (
  `CSCID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `StudentID` int(11) NOT NULL,
  `CourseDelete` int(11) NOT NULL,
  `CourseAdd` int(11) NOT NULL,
  `ConflictsLeft` int(11) NOT NULL,
  `NewSchedule` varchar(64) NOT NULL,
  PRIMARY KEY (`CSCID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `CourseStudentConflictsbz`
--

DROP TABLE IF EXISTS `CourseStudentConflictsbz`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `CourseStudentConflictsbz` (
  `CSCID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `StudentID` int(11) NOT NULL,
  `CourseDelete` int(11) NOT NULL,
  `CourseAdd` int(11) NOT NULL,
  `ConflictsLeft` int(11) NOT NULL,
  `NewSchedule` varchar(64) NOT NULL,
  PRIMARY KEY (`CSCID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `CourseStudents`
--

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

--
-- Table structure for table `CourseStudentsBackup`
--

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

--
-- Table structure for table `CourseTeacherPeriods`
--

DROP TABLE IF EXISTS `CourseTeacherPeriods`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `CourseTeacherPeriods` (
  `CTPID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `UserID` int(11) NOT NULL,
  `Semester` int(11) NOT NULL,
  `Period` int(11) NOT NULL,
  `ClassID` int(11) NOT NULL,
  PRIMARY KEY (`CTPID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `UserID` (`UserID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `CourseTeachers`
--

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

--
-- Table structure for table `CourseUsers`
--

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

--
-- Table structure for table `Courses`
--

DROP TABLE IF EXISTS `Courses`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Courses` (
  `CourseID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `Name` varchar(64) NOT NULL DEFAULT '',
  `Level` int(11) NOT NULL DEFAULT '0',
  `Number` varchar(16) NOT NULL DEFAULT '0',
  `StateCode` varchar(16) NOT NULL,
  `Description` text NOT NULL,
  `Elective` int(11) NOT NULL,
  `Semester` int(11) NOT NULL DEFAULT '0',
  `Prerequisites` text NOT NULL,
  `Credits` float NOT NULL DEFAULT '0',
  `DepartmentID` int(11) NOT NULL DEFAULT '0',
  `Status` int(11) NOT NULL DEFAULT '0',
  `Archive` int(11) NOT NULL DEFAULT '0',
  `Exclude` int(11) NOT NULL DEFAULT '0',
  `TermLabel` varchar(1) NOT NULL,
  `TermIndex` int(11) NOT NULL,
  PRIMARY KEY (`CourseID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `DepartmentID` (`DepartmentID`),
  KEY `Semester` (`Semester`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `CurriculumCourseAssignments`
--

DROP TABLE IF EXISTS `CurriculumCourseAssignments`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `CurriculumCourseAssignments` (
  `CAID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `CCID` int(11) NOT NULL DEFAULT '0',
  `Title` varchar(128) NOT NULL DEFAULT '',
  `Description` text NOT NULL,
  `UnitNumber` int(11) NOT NULL,
  `Number` int(11) NOT NULL,
  `Quarter` int(11) NOT NULL,
  `Offset` int(11) NOT NULL,
  `Possible` int(11) NOT NULL DEFAULT '0',
  `Weight` int(11) NOT NULL DEFAULT '0',
  `Attachment` varchar(32) NOT NULL,
  PRIMARY KEY (`CAID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ClassID` (`CCID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `CurriculumCourseGrades`
--

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

--
-- Table structure for table `CurriculumCourseUnits`
--

DROP TABLE IF EXISTS `CurriculumCourseUnits`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `CurriculumCourseUnits` (
  `CCUID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `CCID` int(11) NOT NULL,
  `UnitNumber` float NOT NULL,
  `Title` varchar(64) NOT NULL,
  `Summary` text NOT NULL,
  `Objectives` text NOT NULL,
  PRIMARY KEY (`CCUID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `CCID` (`CCID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `CurriculumCourses`
--

DROP TABLE IF EXISTS `CurriculumCourses`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `CurriculumCourses` (
  `CCID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `SubjectID` int(11) NOT NULL,
  `Name` varchar(64) NOT NULL DEFAULT '',
  `Number` varchar(16) NOT NULL DEFAULT '0',
  `TextbookName` varchar(48) NOT NULL,
  `TextbookISBN` varchar(32) NOT NULL,
  `Description` varchar(128) NOT NULL,
  `Credits` float NOT NULL DEFAULT '0',
  `Status` int(11) NOT NULL DEFAULT '0',
  `Archive` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`CCID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `CurriculumSubjects`
--

DROP TABLE IF EXISTS `CurriculumSubjects`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `CurriculumSubjects` (
  `CSID` int(11) NOT NULL AUTO_INCREMENT,
  `Name` varchar(32) NOT NULL,
  `Number` float(10,2) NOT NULL,
  `Sequence` int(11) NOT NULL,
  PRIMARY KEY (`CSID`),
  KEY `Name` (`Name`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `CustomerMigrationComments`
--

DROP TABLE IF EXISTS `CustomerMigrationComments`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `CustomerMigrationComments` (
  `CMCID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `UserID` int(11) NOT NULL,
  `Comment` text NOT NULL,
  `Date` datetime NOT NULL,
  `Section` int(11) NOT NULL,
  PRIMARY KEY (`CMCID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `CustomerPJAccounts`
--

DROP TABLE IF EXISTS `CustomerPJAccounts`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `CustomerPJAccounts` (
  `CPJAID` int(11) NOT NULL AUTO_INCREMENT,
  `CompanyID` int(11) NOT NULL,
  `CCID` int(11) NOT NULL,
  `TransactionID` int(11) NOT NULL,
  `CreateDT` datetime NOT NULL,
  PRIMARY KEY (`CPJAID`),
  KEY `CompanyID` (`CompanyID`),
  KEY `CCID` (`CCID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `CustomerWizard`
--

DROP TABLE IF EXISTS `CustomerWizard`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `CustomerWizard` (
  `CWID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `StartPage` int(1) NOT NULL DEFAULT '0',
  `YearSetup` tinytext NOT NULL COMMENT ' /Y',
  `Comment` text NOT NULL COMMENT 'Contact suggestions',
  `WizardComplete` tinyint(1) NOT NULL DEFAULT '0' COMMENT ' ',
  `Start` int(1) NOT NULL DEFAULT '0',
  `Contacts` int(1) NOT NULL DEFAULT '0',
  `AdminID` int(11) NOT NULL DEFAULT '0',
  `ManID` int(11) NOT NULL DEFAULT '0',
  `GettingStarted` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`CWID`),
  UNIQUE KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `DBData`
--

DROP TABLE IF EXISTS `DBData`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `DBData` (
  `DBDID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `UserID` int(11) NOT NULL DEFAULT '0',
  `DBTID` int(11) NOT NULL DEFAULT '0',
  `DBRowID` int(11) NOT NULL DEFAULT '0',
  `DBFieldID` int(11) NOT NULL DEFAULT '0',
  `IntField` int(11) NOT NULL DEFAULT '0',
  `FloatField` float NOT NULL DEFAULT '0',
  `StringField` varchar(255) NOT NULL DEFAULT '',
  `DateField` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `TextField` longtext NOT NULL,
  PRIMARY KEY (`DBDID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `DBFields`
--

DROP TABLE IF EXISTS `DBFields`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `DBFields` (
  `DBFieldID` int(11) NOT NULL AUTO_INCREMENT,
  `DBTID` int(11) NOT NULL DEFAULT '0',
  `Label` varchar(64) NOT NULL DEFAULT '',
  `Comments` varchar(128) NOT NULL DEFAULT '',
  `Type` int(11) NOT NULL DEFAULT '0',
  `Length` int(11) NOT NULL DEFAULT '0',
  `Rows` int(11) NOT NULL DEFAULT '0',
  `Cols` int(11) NOT NULL DEFAULT '0',
  `Sequence` int(11) NOT NULL DEFAULT '0',
  `Content` text NOT NULL,
  PRIMARY KEY (`DBFieldID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `DBMapping`
--

DROP TABLE IF EXISTS `DBMapping`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `DBMapping` (
  `DBMappingID` int(11) NOT NULL AUTO_INCREMENT,
  `TagName` varchar(32) NOT NULL DEFAULT '',
  `SourceTable` varchar(32) NOT NULL DEFAULT '',
  `SourceColumn` varchar(32) NOT NULL DEFAULT '',
  `DestTable` varchar(32) NOT NULL DEFAULT '',
  `DestColumn` varchar(32) NOT NULL DEFAULT '',
  UNIQUE KEY `DBMappingID` (`DBMappingID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `DBRows`
--

DROP TABLE IF EXISTS `DBRows`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `DBRows` (
  `DBRowID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `DBTID` int(11) NOT NULL DEFAULT '0',
  `Date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `UserID` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`DBRowID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `DBTables`
--

DROP TABLE IF EXISTS `DBTables`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `DBTables` (
  `DBTID` 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 '',
  `AuthorUID` int(11) NOT NULL DEFAULT '0',
  `PANID` int(11) NOT NULL DEFAULT '0',
  `Active` int(11) NOT NULL DEFAULT '0',
  `Internal` int(11) NOT NULL DEFAULT '0',
  `Alert` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`DBTID`),
  KEY `Internal` (`Internal`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ClassID` (`ClassID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `DayCarePIN`
--

DROP TABLE IF EXISTS `DayCarePIN`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `DayCarePIN` (
  `DCPID` int(11) NOT NULL,
  `SchoolID` int(11) NOT NULL,
  `FamilyID` int(11) NOT NULL,
  `ContactID` int(11) NOT NULL,
  `PIN` int(4) NOT NULL,
  KEY `SchoolID` (`SchoolID`),
  KEY `FamilyID` (`FamilyID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `DaycareChargeItems`
--

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

DROP TABLE IF EXISTS `DaycareCharges`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `DaycareCharges` (
  `DCCID` 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 '',
  `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',
  PRIMARY KEY (`DCCID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `FamilyID` (`FamilyID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `DaycareConfig`
--

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

DROP TABLE IF EXISTS `DaycareMonthlyBillings`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `DaycareMonthlyBillings` (
  `DCMBID` 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,
  `Year` int(11) NOT NULL,
  `Month` 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',
  `DCMCID` 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 (`DCMBID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `FamilyID` (`FamilyID`),
  KEY `Month` (`Month`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `DaycareMonthlyChargeItems`
--

DROP TABLE IF EXISTS `DaycareMonthlyChargeItems`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `DaycareMonthlyChargeItems` (
  `DCMCIID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `FamilyID` int(11) NOT NULL,
  `StudentID` int(11) NOT NULL,
  `DCMCID` int(11) NOT NULL,
  `Title` varchar(32) NOT NULL,
  `TotalAmount` float(10,2) NOT NULL,
  `AcctID` int(11) NOT NULL COMMENT 'Family Account ID',
  `DCMPID` int(11) NOT NULL COMMENT 'DayCareMonthlyPlanID',
  PRIMARY KEY (`DCMCIID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `FamilyID` (`FamilyID`),
  KEY `StudentID` (`StudentID`),
  KEY `MBID` (`DCMCID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `DaycareMonthlyCharges`
--

DROP TABLE IF EXISTS `DaycareMonthlyCharges`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `DaycareMonthlyCharges` (
  `DCMCID` 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 '',
  `Memo` text NOT NULL,
  `StartDate` date NOT NULL DEFAULT '0000-00-00',
  `StopDate` date NOT NULL,
  `January` int(11) NOT NULL,
  `February` int(11) NOT NULL,
  `March` int(11) NOT NULL,
  `April` int(11) NOT NULL,
  `May` int(11) NOT NULL,
  `June` int(11) NOT NULL,
  `July` int(11) NOT NULL,
  `August` int(11) NOT NULL,
  `September` int(11) NOT NULL,
  `October` int(11) NOT NULL,
  `November` int(11) NOT NULL,
  `December` int(11) NOT NULL,
  `APMID` int(11) NOT NULL COMMENT 'Account Payment Method ID',
  PRIMARY KEY (`DCMCID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `FamilyID` (`FamilyID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `DaycareMonthlyPlans`
--

DROP TABLE IF EXISTS `DaycareMonthlyPlans`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `DaycareMonthlyPlans` (
  `DCMPID` 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(10,2) NOT NULL DEFAULT '0.00',
  PRIMARY KEY (`DCMPID`),
  KEY `CompanyID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `DaycareNotifierResults`
--

DROP TABLE IF EXISTS `DaycareNotifierResults`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `DaycareNotifierResults` (
  `DCNRID` 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 (`DCNRID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `DaycareOrders`
--

DROP TABLE IF EXISTS `DaycareOrders`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `DaycareOrders` (
  `DCOID` 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',
  `CareDate` date NOT NULL DEFAULT '0000-00-00',
  `TZOffset` int(11) NOT NULL,
  `StartTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `StartCID` int(11) NOT NULL,
  `StopTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `StopCID` int(11) NOT NULL,
  `Time` time NOT NULL DEFAULT '00:00:00',
  `Rate` float NOT NULL DEFAULT '0',
  `Notes` varchar(128) NOT NULL,
  `ChargedDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `DCTID` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`DCOID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `OrderDate` (`ChargedDate`),
  KEY `FamilyID` (`FamilyID`),
  KEY `StudentID` (`StudentID`),
  KEY `DCTID` (`DCTID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `DaycarePricePlans`
--

DROP TABLE IF EXISTS `DaycarePricePlans`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `DaycarePricePlans` (
  `DCPPID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `Name` varchar(32) NOT NULL DEFAULT '',
  `Description` varchar(128) NOT NULL DEFAULT '',
  `Amount` float NOT NULL DEFAULT '0',
  `DefaultPlan` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`DCPPID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `DaycareTransactions`
--

DROP TABLE IF EXISTS `DaycareTransactions`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `DaycareTransactions` (
  `DCTID` 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',
  `DCWBID` int(11) NOT NULL COMMENT 'DaycareWeeklyBillingID',
  `DCMBID` int(11) NOT NULL COMMENT 'DaycareMonthlyBillingID',
  `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',
  `FDID` int(11) NOT NULL COMMENT 'FamilyDepositID',
  PRIMARY KEY (`DCTID`),
  KEY `FamilyID` (`FamilyID`),
  KEY `StudentID` (`StudentID`),
  KEY `TransactionDate` (`TransactionDate`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `DaycareWeeklyBillings`
--

DROP TABLE IF EXISTS `DaycareWeeklyBillings`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `DaycareWeeklyBillings` (
  `DCWBID` 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,
  `Year` int(11) NOT NULL,
  `Week` 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',
  `DCWCID` 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 (`DCWBID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `FamilyID` (`FamilyID`),
  KEY `Month` (`Week`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `DaycareWeeklyChargeItems`
--

DROP TABLE IF EXISTS `DaycareWeeklyChargeItems`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `DaycareWeeklyChargeItems` (
  `DCWCIID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `FamilyID` int(11) NOT NULL,
  `StudentID` int(11) NOT NULL,
  `DCWCID` int(11) NOT NULL,
  `Title` varchar(32) NOT NULL,
  `TotalAmount` float(10,2) NOT NULL,
  `AcctID` int(11) NOT NULL COMMENT 'Family Account ID',
  `DCWPID` int(11) NOT NULL COMMENT 'DaycareWeeklyPlanID',
  PRIMARY KEY (`DCWCIID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `FamilyID` (`FamilyID`),
  KEY `StudentID` (`StudentID`),
  KEY `MBID` (`DCWCID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `DaycareWeeklyCharges`
--

DROP TABLE IF EXISTS `DaycareWeeklyCharges`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `DaycareWeeklyCharges` (
  `DCWCID` 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 '',
  `Memo` text NOT NULL,
  `StartDate` date NOT NULL DEFAULT '0000-00-00',
  `StopDate` date NOT NULL,
  `APMID` int(11) NOT NULL COMMENT 'Account Payment Method ID',
  PRIMARY KEY (`DCWCID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `FamilyID` (`FamilyID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `DaycareWeeklyPlans`
--

DROP TABLE IF EXISTS `DaycareWeeklyPlans`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `DaycareWeeklyPlans` (
  `DCWPID` 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(10,2) NOT NULL DEFAULT '0.00',
  PRIMARY KEY (`DCWPID`),
  KEY `CompanyID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `DemoDownloads`
--

DROP TABLE IF EXISTS `DemoDownloads`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `DemoDownloads` (
  `DDID` int(11) NOT NULL AUTO_INCREMENT,
  `DKID` varchar(32) NOT NULL DEFAULT '0',
  `DDateTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `IP` varchar(32) NOT NULL DEFAULT '',
  `Host` varchar(32) NOT NULL DEFAULT '',
  PRIMARY KEY (`DDID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `DemoKeys`
--

DROP TABLE IF EXISTS `DemoKeys`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `DemoKeys` (
  `DKID` int(11) NOT NULL AUTO_INCREMENT,
  `Name` varchar(32) NOT NULL DEFAULT '',
  `Zip` varchar(16) NOT NULL DEFAULT '',
  `Expires` date NOT NULL DEFAULT '0000-00-00',
  `DownloadKey` varchar(16) NOT NULL DEFAULT '',
  `EMail` varchar(128) NOT NULL DEFAULT '',
  PRIMARY KEY (`DKID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `Departments`
--

DROP TABLE IF EXISTS `Departments`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Departments` (
  `DepartmentID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `ManagerID` int(11) NOT NULL DEFAULT '0',
  `Color` varchar(10) NOT NULL DEFAULT '',
  `Description` text NOT NULL,
  `Name` varchar(32) NOT NULL DEFAULT '',
  `Code` varchar(6) NOT NULL,
  `DirectorID` int(11) NOT NULL DEFAULT '0',
  `VPID` int(11) NOT NULL DEFAULT '0',
  `Sequence` tinyint(2) NOT NULL DEFAULT '0',
  `ReportCardBlock` tinyint(2) NOT NULL DEFAULT '0',
  PRIMARY KEY (`DepartmentID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `Dept`
--

DROP TABLE IF EXISTS `Dept`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Dept` (
  `DeptID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `Name` varchar(16) NOT NULL DEFAULT '',
  `Description` varchar(32) NOT NULL DEFAULT '',
  `StaffID` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`DeptID`),
  UNIQUE KEY `DeptID_2` (`DeptID`),
  KEY `DeptID` (`DeptID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `DeptUsers`
--

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

--
-- Table structure for table `DisciplineConfig`
--

DROP TABLE IF EXISTS `DisciplineConfig`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `DisciplineConfig` (
  `DCID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `ViewLogs` bit(1) NOT NULL DEFAULT b'0' COMMENT '0=Authored,1=All',
  `PendingDetentions` bit(1) NOT NULL DEFAULT b'0' COMMENT '0=off,1=on AutoGen Accum Pts.',
  `PointsToTrigger` smallint(5) NOT NULL DEFAULT '0' COMMENT '#PointsToTrigger',
  `ResetPointsNewTerm` int(11) NOT NULL,
  `NotifyManager` bit(1) NOT NULL DEFAULT b'0' COMMENT '0=off,1=on',
  `NotifyHRTeacher` bit(1) NOT NULL DEFAULT b'0' COMMENT '0=off,1=on',
  PRIMARY KEY (`DCID`),
  UNIQUE KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Configurations for the Discipline elements.';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `DisciplineDetentions`
--

DROP TABLE IF EXISTS `DisciplineDetentions`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `DisciplineDetentions` (
  `DDID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `StudentID` int(11) NOT NULL DEFAULT '0',
  `DatePosted` date NOT NULL DEFAULT '0000-00-00',
  `DateServed` date NOT NULL DEFAULT '0000-00-00',
  `Length` int(11) NOT NULL DEFAULT '0',
  `Completed` int(11) NOT NULL,
  `Comments` text NOT NULL,
  `AuthorID` int(11) NOT NULL DEFAULT '0',
  `MonitorID` int(11) NOT NULL DEFAULT '0',
  `ManagerNotified` int(11) NOT NULL DEFAULT '0',
  `FamilyNotified` int(11) NOT NULL DEFAULT '0',
  `StudentNotified` int(11) NOT NULL DEFAULT '0',
  `Waived` bit(1) NOT NULL DEFAULT b'0',
  `Days` decimal(6,3) NOT NULL,
  PRIMARY KEY (`DDID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `StudentID` (`StudentID`),
  KEY `ManagerNotified` (`ManagerNotified`),
  KEY `FamilyNotified` (`FamilyNotified`),
  KEY `StudentNotified` (`StudentNotified`),
  KEY `Waived` (`Waived`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `DisciplineViolationGroups`
--

DROP TABLE IF EXISTS `DisciplineViolationGroups`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `DisciplineViolationGroups` (
  `DVGID` 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 (`DVGID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `DisciplineViolations`
--

DROP TABLE IF EXISTS `DisciplineViolations`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `DisciplineViolations` (
  `DVID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `Name` varchar(64) NOT NULL DEFAULT '',
  `DVGID` int(11) NOT NULL DEFAULT '0',
  `Description` text NOT NULL,
  `Severity` int(11) NOT NULL DEFAULT '0',
  `Punishment` text NOT NULL,
  PRIMARY KEY (`DVID`),
  KEY `MealID` (`DVID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `DocDownLoads`
--

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

--
-- Table structure for table `DocFolders`
--

DROP TABLE IF EXISTS `DocFolders`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `DocFolders` (
  `DocFolderID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `ClassID` int(11) NOT NULL DEFAULT '0',
  `ParentID` int(11) NOT NULL DEFAULT '0',
  `Name` varchar(32) NOT NULL DEFAULT '',
  `DateTime` datetime NOT NULL,
  `Comments` tinytext NOT NULL,
  `Internal` int(11) NOT NULL DEFAULT '0',
  `Private` int(11) NOT NULL DEFAULT '0',
  `Starred` tinyint(4) NOT NULL,
  `GoogleID` varchar(255) NOT NULL,
  `GoogleParentID` varchar(255) NOT NULL,
  `GoogleEditURL` varchar(255) NOT NULL,
  PRIMARY KEY (`DocFolderID`),
  KEY `DocFolderID` (`DocFolderID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ClassID` (`ClassID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `DocumentSignatures`
--

DROP TABLE IF EXISTS `DocumentSignatures`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `DocumentSignatures` (
  `DSIGID` int(11) NOT NULL AUTO_INCREMENT,
  `Signator` varchar(255) NOT NULL,
  `Signature` text NOT NULL,
  `SigHash` varchar(128) NOT NULL,
  `IpAddr` varchar(46) NOT NULL,
  `Created` int(11) NOT NULL,
  `StudentDocID` int(11) NOT NULL DEFAULT '0',
  `StudentID` int(11) NOT NULL DEFAULT '0',
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`DSIGID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Required signatures for selected Documents';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `Documents`
--

DROP TABLE IF EXISTS `Documents`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Documents` (
  `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 '',
  `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(128) NOT NULL DEFAULT '',
  `Internal` int(11) NOT NULL DEFAULT '0',
  `Public` int(11) NOT NULL DEFAULT '0',
  `Author` varchar(16) 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',
  `SecureID` int(11) NOT NULL DEFAULT '0',
  `VirusScan` int(11) NOT NULL DEFAULT '0',
  `VirusScanResults` varchar(128) NOT NULL DEFAULT '',
  `Mergeable` int(11) NOT NULL DEFAULT '0',
  `Enroll` int(11) NOT NULL DEFAULT '0',
  `ParentDocumentID` int(11) NOT NULL,
  `CustomerCare` int(11) NOT NULL DEFAULT '0',
  `Starred` tinyint(4) NOT NULL,
  `GoogleID` varchar(128) NOT NULL,
  `GoogleSize` int(11) NOT NULL,
  `GoogleShared` int(11) NOT NULL,
  `GoogleOwner` varchar(128) NOT NULL,
  `GooglePermissions` int(11) NOT NULL,
  `GoogleFolderID` varchar(128) NOT NULL,
  `GoogleDownloadURL` varchar(255) NOT NULL,
  `GoogleEditURL` varchar(255) NOT NULL,
  UNIQUE KEY `DocumentID` (`DocumentID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ClassID` (`ClassID`),
  KEY `DateTime` (`DateTime`),
  KEY `FolderID` (`FolderID`),
  KEY `ParentDocumentID` (`ParentDocumentID`),
  KEY `FileName` (`FileName`),
  KEY `GoogleID` (`GoogleID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `DonorCampaigns`
--

DROP TABLE IF EXISTS `DonorCampaigns`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `DonorCampaigns` (
  `DCID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `Name` varchar(32) NOT NULL DEFAULT '',
  `Number` varchar(10) NOT NULL,
  `Description` varchar(128) NOT NULL DEFAULT '',
  `Date` date NOT NULL DEFAULT '0000-00-00',
  `Goal` varchar(10) NOT NULL DEFAULT '0',
  `AccountID` int(11) NOT NULL,
  `Active` int(11) NOT NULL DEFAULT '1',
  PRIMARY KEY (`DCID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `Number` (`Number`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `DonorCategories`
--

DROP TABLE IF EXISTS `DonorCategories`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `DonorCategories` (
  `CategoryID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `DCGID` 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 `DonorCategoryDonors`
--

DROP TABLE IF EXISTS `DonorCategoryDonors`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `DonorCategoryDonors` (
  `DCUID` 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 (`DCUID`),
  KEY `UserID` (`UserID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `DonorCategoryGroups`
--

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

--
-- Table structure for table `DonorContactCompanies`
--

DROP TABLE IF EXISTS `DonorContactCompanies`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `DonorContactCompanies` (
  `DCCID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `CCID` int(11) NOT NULL DEFAULT '0',
  `DonorNumber` int(11) NOT NULL,
  `Rep1ID` int(11) NOT NULL DEFAULT '0',
  `Misc2ID` int(11) NOT NULL DEFAULT '0',
  `New` int(11) NOT NULL,
  `CreateDate` date NOT NULL,
  `UpdateDate` date NOT NULL,
  PRIMARY KEY (`DCCID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ContactID` (`CCID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `DonorContacts`
--

DROP TABLE IF EXISTS `DonorContacts`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `DonorContacts` (
  `DonorID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `ContactID` int(11) NOT NULL DEFAULT '0',
  `DonorNumber` int(11) NOT NULL,
  `Rep1ID` int(11) NOT NULL DEFAULT '0',
  `Misc2ID` int(11) NOT NULL DEFAULT '0',
  `New` int(11) NOT NULL,
  `CreateDate` date NOT NULL,
  `UpdateDate` date NOT NULL,
  `Deleted` tinyint(4) NOT NULL DEFAULT '0',
  PRIMARY KEY (`DonorID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ContactID` (`ContactID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `DonorDeposits`
--

DROP TABLE IF EXISTS `DonorDeposits`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `DonorDeposits` (
  `DDID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `DonorID` int(11) NOT NULL DEFAULT '0',
  `Date` date NOT NULL DEFAULT '0000-00-00',
  `Amount` float NOT NULL DEFAULT '0',
  `Comments` varchar(255) NOT NULL DEFAULT '',
  `AuthorID` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`DDID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `FamilyID` (`DonorID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `DonorDocuments`
--

DROP TABLE IF EXISTS `DonorDocuments`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `DonorDocuments` (
  `DonorDocID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `DonorID` int(11) NOT NULL DEFAULT '0',
  `Name` varchar(64) NOT NULL DEFAULT '',
  `Date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Type` varchar(32) NOT NULL DEFAULT '',
  `Code` varchar(10) NOT NULL,
  `FileName` varchar(64) NOT NULL,
  `Size` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`DonorDocID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `StudentID` (`DonorID`),
  KEY `Date` (`Date`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `DonorPledges`
--

DROP TABLE IF EXISTS `DonorPledges`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `DonorPledges` (
  `DPID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `DonorID` int(11) NOT NULL,
  `DCID` int(11) NOT NULL,
  `AmountPledged` float NOT NULL,
  `StartDate` date NOT NULL,
  `Completed` int(11) NOT NULL,
  `CompletedDate` date NOT NULL,
  `Memo` varchar(255) NOT NULL,
  PRIMARY KEY (`DPID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `DonorID` (`DonorID`),
  KEY `DCID` (`DCID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `DonorStatisticGroups`
--

DROP TABLE IF EXISTS `DonorStatisticGroups`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `DonorStatisticGroups` (
  `DSGID` 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 (`DSGID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `DonorStatisticValues`
--

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

--
-- Table structure for table `DonorStatistics`
--

DROP TABLE IF EXISTS `DonorStatistics`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `DonorStatistics` (
  `DSID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `DSGID` int(11) NOT NULL DEFAULT '0',
  `Sequence` int(11) NOT NULL DEFAULT '0',
  `Name` varchar(32) NOT NULL DEFAULT '',
  `Description` varchar(255) NOT NULL DEFAULT '',
  `Public` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`DSID`),
  KEY `CompanyID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `DonorTransactions`
--

DROP TABLE IF EXISTS `DonorTransactions`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `DonorTransactions` (
  `DTID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `DCID` int(11) NOT NULL DEFAULT '0',
  `DonorID` int(11) NOT NULL DEFAULT '0',
  `TransactionDate` date NOT NULL DEFAULT '0000-00-00',
  `CreationDate` 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',
  `Type` int(11) NOT NULL DEFAULT '0',
  `CheckNum` int(11) NOT NULL DEFAULT '0',
  `AccountID` int(11) NOT NULL DEFAULT '0',
  `Posted` int(11) NOT NULL DEFAULT '0',
  `ATID` int(11) NOT NULL DEFAULT '0',
  `DDID` int(11) NOT NULL,
  PRIMARY KEY (`DTID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `FamilyID` (`DonorID`),
  KEY `DCID` (`DCID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `EVerify`
--

DROP TABLE IF EXISTS `EVerify`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `EVerify` (
  `EVID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `ClassID` int(11) NOT NULL DEFAULT '0',
  `Title` varchar(64) NOT NULL DEFAULT '',
  `Message` text NOT NULL,
  `AuthorID` int(11) NOT NULL DEFAULT '0',
  `Expire` date NOT NULL DEFAULT '0000-00-00',
  UNIQUE KEY `NewsID` (`EVID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ClassID` (`ClassID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `EVerifyFamilies`
--

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

--
-- Table structure for table `EdFi_CourseTranscripts`
--

DROP TABLE IF EXISTS `EdFi_CourseTranscripts`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `EdFi_CourseTranscripts` (
  `CTID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `SchoolYearID` int(11) NOT NULL,
  `StudentID` int(11) NOT NULL,
  `CourseCode` varchar(255) NOT NULL,
  `Number` decimal(5,2) NOT NULL,
  `Letter` varchar(4) NOT NULL,
  `Credits` decimal(5,2) NOT NULL,
  `TermLabel` varchar(1) NOT NULL,
  `TermIndex` int(11) NOT NULL,
  PRIMARY KEY (`CTID`),
  KEY `SchoolID` (`SchoolID`,`SchoolYearID`,`StudentID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `EdFi_Credentials`
--

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

--
-- Table structure for table `EdFi_Descriptors`
--

DROP TABLE IF EXISTS `EdFi_Descriptors`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `EdFi_Descriptors` (
  `DescriptorID` int(11) NOT NULL AUTO_INCREMENT,
  `State` varchar(3) NOT NULL,
  `AcademicYear` int(11) NOT NULL,
  `Descriptor` varchar(255) NOT NULL,
  `Name` varchar(255) NOT NULL,
  `CodeValue` varchar(255) NOT NULL,
  `KeyValue` int(11) NOT NULL,
  PRIMARY KEY (`DescriptorID`),
  KEY `State` (`State`,`Descriptor`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `EdFi_DisciplineActionDisciplines`
--

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

--
-- Table structure for table `EdFi_ExtensionValues`
--

DROP TABLE IF EXISTS `EdFi_ExtensionValues`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `EdFi_ExtensionValues` (
  `EVID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `ExtensionID` int(11) NOT NULL,
  `TargetID` int(11) NOT NULL,
  `Value` varchar(255) NOT NULL,
  PRIMARY KEY (`EVID`),
  KEY `SchoolID` (`SchoolID`,`ExtensionID`),
  KEY `TargetID` (`TargetID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `EdFi_Extensions`
--

DROP TABLE IF EXISTS `EdFi_Extensions`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `EdFi_Extensions` (
  `EID` int(11) NOT NULL AUTO_INCREMENT,
  `State` varchar(3) NOT NULL,
  `Target` varchar(64) NOT NULL,
  `Name` varchar(64) NOT NULL,
  `Label` varchar(32) NOT NULL,
  `DataType` varchar(16) NOT NULL,
  PRIMARY KEY (`EID`),
  KEY `State` (`State`,`Target`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `EdFi_Grades`
--

DROP TABLE IF EXISTS `EdFi_Grades`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `EdFi_Grades` (
  `GradeID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `SchoolYearID` int(11) NOT NULL,
  `ClassID` int(11) NOT NULL,
  `StudentID` int(11) NOT NULL,
  `Number` decimal(5,2) NOT NULL,
  `Letter` varchar(4) NOT NULL,
  `GradeType` int(11) NOT NULL,
  `TermLabel` varchar(1) NOT NULL,
  `TermIndex` int(11) NOT NULL,
  PRIMARY KEY (`GradeID`),
  KEY `SchoolID` (`SchoolID`,`SchoolYearID`,`ClassID`,`StudentID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `EdFi_GradingPeriods`
--

DROP TABLE IF EXISTS `EdFi_GradingPeriods`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `EdFi_GradingPeriods` (
  `GPID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `SchoolYearID` int(11) NOT NULL,
  `TermLabel` varchar(1) NOT NULL,
  `TermIndex` int(11) NOT NULL,
  `GradingPeriod` int(11) NOT NULL,
  PRIMARY KEY (`GPID`),
  KEY `SchoolID` (`SchoolID`,`SchoolYearID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `EdFi_Resources`
--

DROP TABLE IF EXISTS `EdFi_Resources`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `EdFi_Resources` (
  `ResourceID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `AcademicYear` int(11) NOT NULL,
  `Endpoint` varchar(255) NOT NULL,
  `TargetID` varchar(255) NOT NULL,
  `APIID` varchar(32) NOT NULL,
  `Source` int(11) NOT NULL,
  `Data` text NOT NULL,
  `Updated` datetime NOT NULL,
  PRIMARY KEY (`ResourceID`),
  UNIQUE KEY `SchoolID` (`SchoolID`,`AcademicYear`,`Endpoint`,`TargetID`,`Source`),
  KEY `APIID` (`APIID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `EdFi_Sessions`
--

DROP TABLE IF EXISTS `EdFi_Sessions`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `EdFi_Sessions` (
  `SessionID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `SchoolYearID` int(11) NOT NULL,
  `TermLabel` varchar(1) NOT NULL,
  `TermIndex` int(11) NOT NULL,
  `Term` int(11) NOT NULL,
  PRIMARY KEY (`SessionID`),
  KEY `SchoolID` (`SchoolID`,`SchoolYearID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `EdFi_StaffAssignments`
--

DROP TABLE IF EXISTS `EdFi_StaffAssignments`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `EdFi_StaffAssignments` (
  `SAID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `UserID` int(11) NOT NULL,
  `StaffClassification` int(11) NOT NULL,
  `PositionTitle` varchar(128) NOT NULL,
  `BeginDate` date NOT NULL,
  `EndDate` date NOT NULL,
  PRIMARY KEY (`SAID`),
  KEY `SchoolID` (`SchoolID`,`UserID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `EdFi_StudentCTEProgramPrograms`
--

DROP TABLE IF EXISTS `EdFi_StudentCTEProgramPrograms`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `EdFi_StudentCTEProgramPrograms` (
  `SCTEPPID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `SCTEPID` int(11) NOT NULL,
  `Pathway` int(11) NOT NULL,
  `Participation` int(11) NOT NULL,
  PRIMARY KEY (`SCTEPPID`),
  KEY `SchoolID` (`SchoolID`,`SCTEPID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `EdFi_StudentCTEPrograms`
--

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

--
-- Table structure for table `EdFi_StudentCharacteristics`
--

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

--
-- Table structure for table `EdFi_StudentDisabilities`
--

DROP TABLE IF EXISTS `EdFi_StudentDisabilities`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `EdFi_StudentDisabilities` (
  `SDID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `StudentID` int(11) NOT NULL,
  `DisabilityID` int(11) NOT NULL,
  `Level` int(11) NOT NULL COMMENT 'Sev_of_disabil:1-pri,2-sec, etc',
  PRIMARY KEY (`SDID`),
  KEY `SchoolID` (`SchoolID`,`StudentID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `EdFi_StudentDisciplineIncidentBehaviors`
--

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

--
-- Table structure for table `EdFi_StudentDisciplineIncidents`
--

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

--
-- Table structure for table `EdFi_StudentEarlyLearningPrograms`
--

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

--
-- Table structure for table `EdFi_StudentHomelessPrograms`
--

DROP TABLE IF EXISTS `EdFi_StudentHomelessPrograms`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `EdFi_StudentHomelessPrograms` (
  `SHPID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `StudentID` int(11) NOT NULL,
  `SPBID` int(11) NOT NULL,
  `NightResidence` int(11) NOT NULL,
  `Unaccompanied` tinyint(1) NOT NULL,
  PRIMARY KEY (`SHPID`),
  KEY `SchoolID` (`SchoolID`,`StudentID`,`SPBID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `EdFi_StudentLanguages`
--

DROP TABLE IF EXISTS `EdFi_StudentLanguages`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `EdFi_StudentLanguages` (
  `SLID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `StudentID` int(11) NOT NULL,
  `LanguageID` int(11) NOT NULL,
  `Home` tinyint(1) NOT NULL,
  `Spoken` tinyint(1) NOT NULL,
  `Written` tinyint(1) NOT NULL,
  `Correspondence` tinyint(1) NOT NULL,
  `Dominant` tinyint(1) NOT NULL,
  `Native` tinyint(1) NOT NULL,
  `OtherProficiency` tinyint(1) NOT NULL,
  `Other` tinyint(1) NOT NULL,
  PRIMARY KEY (`SLID`),
  KEY `SchoolID` (`SchoolID`,`StudentID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `EdFi_StudentProgramBases`
--

DROP TABLE IF EXISTS `EdFi_StudentProgramBases`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `EdFi_StudentProgramBases` (
  `SPBID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `StudentID` int(11) NOT NULL,
  `ProgramType` int(11) NOT NULL,
  `Name` varchar(255) NOT NULL,
  `BeginDate` date NOT NULL,
  `EndDate` date NOT NULL,
  `ReasonExited` int(11) NOT NULL,
  PRIMARY KEY (`SPBID`),
  KEY `SchoolID` (`SchoolID`,`StudentID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `EdFi_StudentProgramServices`
--

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

--
-- Table structure for table `EdFi_StudentPrograms`
--

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

--
-- Table structure for table `EdFi_StudentSpEdPrograms`
--

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

--
-- Table structure for table `EdFi_StudentTitleIAPrograms`
--

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

--
-- Table structure for table `EdFi_SummaryAttendances`
--

DROP TABLE IF EXISTS `EdFi_SummaryAttendances`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `EdFi_SummaryAttendances` (
  `SAID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `SchoolYearID` int(11) NOT NULL,
  `StudentID` int(11) NOT NULL,
  `Start` date NOT NULL,
  `End` date NOT NULL,
  `Present` decimal(4,1) NOT NULL,
  `Absent` decimal(4,1) NOT NULL,
  `FTE` int(11) NOT NULL,
  PRIMARY KEY (`SAID`),
  KEY `SchoolID` (`SchoolID`,`SchoolYearID`,`StudentID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `EdFi_Syncs`
--

DROP TABLE IF EXISTS `EdFi_Syncs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `EdFi_Syncs` (
  `UpdateID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `SchoolYearID` int(11) NOT NULL,
  `TargetID` int(11) NOT NULL,
  `Target` varchar(255) NOT NULL,
  `Status` int(11) NOT NULL,
  `Message` varchar(255) NOT NULL,
  `Updated` datetime NOT NULL,
  PRIMARY KEY (`UpdateID`),
  KEY `SchoolID` (`SchoolID`,`TargetID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `EdFi_Types`
--

DROP TABLE IF EXISTS `EdFi_Types`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `EdFi_Types` (
  `TypeID` int(11) NOT NULL AUTO_INCREMENT,
  `State` varchar(3) NOT NULL,
  `AcademicYear` int(11) NOT NULL,
  `Type` varchar(255) NOT NULL,
  `Name` varchar(255) NOT NULL,
  `CodeValue` varchar(255) NOT NULL,
  `KeyValue` int(11) NOT NULL,
  PRIMARY KEY (`TypeID`),
  KEY `State` (`State`,`Type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `EdFi_Updates`
--

DROP TABLE IF EXISTS `EdFi_Updates`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `EdFi_Updates` (
  `UpdateID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `StudentID` int(11) NOT NULL,
  `Endpoint` varchar(255) NOT NULL,
  `Updates` text NOT NULL COMMENT 'JSON',
  `Status` int(11) DEFAULT '0',
  `Message` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`UpdateID`),
  KEY `SchoolID` (`SchoolID`,`StudentID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ElemGrades`
--

DROP TABLE IF EXISTS `ElemGrades`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ElemGrades` (
  `ElemGradeID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `StudentID` int(11) NOT NULL DEFAULT '0',
  `SubjectID` int(11) NOT NULL DEFAULT '0',
  `Quarter` int(11) NOT NULL DEFAULT '0',
  `Number` int(11) 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',
  `ClassID` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`ElemGradeID`),
  UNIQUE KEY `ElemGradeID` (`ElemGradeID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ElemSubjects`
--

DROP TABLE IF EXISTS `ElemSubjects`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ElemSubjects` (
  `SubjectID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `Name` varchar(32) NOT NULL DEFAULT '',
  `Description` varchar(128) NOT NULL DEFAULT '',
  PRIMARY KEY (`SubjectID`),
  UNIQUE KEY `SubjectID` (`SubjectID`),
  KEY `SchoolID` (`SchoolID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `EmailAddresses`
--

DROP TABLE IF EXISTS `EmailAddresses`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `EmailAddresses` (
  `EAID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `EmailListID` int(11) NOT NULL DEFAULT '0',
  `EmailAddress` varchar(255) NOT NULL DEFAULT '0',
  `Description` varchar(255) NOT NULL DEFAULT '',
  PRIMARY KEY (`EAID`),
  KEY `EmailListID` (`EmailListID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `EmailList`
--

DROP TABLE IF EXISTS `EmailList`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `EmailList` (
  `EmailListID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `ClassID` int(11) NOT NULL DEFAULT '0',
  `Description` text NOT NULL,
  `Name` varchar(32) NOT NULL DEFAULT '',
  `Private` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`EmailListID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `ClassID` (`ClassID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `EmailVerificationTokens`
--

DROP TABLE IF EXISTS `EmailVerificationTokens`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `EmailVerificationTokens` (
  `TokenID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL,
  `UserID` int(11) NOT NULL,
  `Email` varchar(255) NOT NULL,
  `Token` varchar(255) NOT NULL,
  PRIMARY KEY (`TokenID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `EmployeeDetails`
--

DROP TABLE IF EXISTS `EmployeeDetails`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `EmployeeDetails` (
  `EDID` int(11) NOT NULL AUTO_INCREMENT,
  `SchoolID` int(11) NOT NULL DEFAULT '0',
  `UserID` int(11) NOT NULL DEFAULT '0',
  `Updated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `AuthorID` int(11) NOT NULL DEFAULT '0',
  `NCEAType` int(11) NOT NULL DEFAULT '0' COMMENT '1 FR, 2 MR, 3 Cl, 4 LM, 5 LF',
  `NCEAStatus` int(11) NOT NULL DEFAULT '0' COMMENT '1 = FT, 2 = PT',
  `NCEARace` int(11) NOT NULL DEFAULT '0' COMMENT '1=As, 2=AI/NA, 3=B/AA, 4=NH/OPI, 5=W, 6=2+',
  `Ethnicity` int(11) NOT NULL DEFAULT '0' COMMENT '1 Non H/L, 2 H/L',
  `NCEARaceAutoupd` int(11) NOT NULL DEFAULT '0' COMMENT 'Employee profile = 1',
  `NCEAExclude` int(11) NOT NULL,
  PRIMARY KEY (`EDID`),
  KEY `SchoolID` (`SchoolID`),
  KEY `UserID` (`UserID`),
  KEY `UserID_2` (`UserID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
