-- MySQL dump 10.13  Distrib 5.7.16, for Linux (x86_64)
--
-- Host: mentis-shared-production.cnof9m6ub7m3.us-east-1.rds.amazonaws.com    Database: mentis_temple_production
-- ------------------------------------------------------
-- Server version	5.7.44-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 `Account`
--

DROP TABLE IF EXISTS `Account`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Account` (
  `username` varchar(100) NOT NULL,
  `userId` int(10) unsigned NOT NULL,
  `password` char(40) NOT NULL,
  `ldapId` bigint(20) unsigned DEFAULT NULL,
  PRIMARY KEY (`username`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `Acl`
--

DROP TABLE IF EXISTS `Acl`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Acl` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `module` varchar(128) NOT NULL,
  `controller` varchar(128) NOT NULL,
  `action` varchar(128) NOT NULL,
  `operation` varchar(128) NOT NULL,
  `resourceClass` varchar(128) NOT NULL,
  `ruleClass` varchar(128) NOT NULL,
  `entityId` varchar(128) DEFAULT NULL,
  `roleId` varchar(128) DEFAULT NULL,
  `groupId` varchar(128) DEFAULT NULL,
  `userId` varchar(128) DEFAULT NULL,
  `aclExpr` varchar(255) DEFAULT NULL COMMENT 'eg ({actorHasPendingSignature}) && ({noOtherPersonnelHasPendingSignature})',
  `affiliationId` varchar(128) DEFAULT NULL,
  `updatedBy` varchar(128) DEFAULT NULL,
  `updatedOn` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `actionpath` (`module`,`controller`,`action`,`operation`,`resourceClass`)
) ENGINE=MyISAM AUTO_INCREMENT=868 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `Action`
--

DROP TABLE IF EXISTS `Action`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Action` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(100) NOT NULL,
  `description` text,
  `iconClass` varchar(100) DEFAULT NULL,
  `buttonClass` varchar(200) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=153 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AddressType`
--

DROP TABLE IF EXISTS `AddressType`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `AddressType` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` text NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AdminChangeLog`
--

DROP TABLE IF EXISTS `AdminChangeLog`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `AdminChangeLog` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `actorId` int(10) unsigned DEFAULT NULL,
  `entityId` int(10) unsigned NOT NULL,
  `entityClassName` varchar(255) NOT NULL,
  `actionId` int(1) DEFAULT NULL,
  `message` text,
  `dateCreated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `extras` text,
  PRIMARY KEY (`id`),
  KEY `idx_EntityID_EntityClassName` (`entityClassName`,`entityId`)
) ENGINE=MyISAM AUTO_INCREMENT=4442 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `Affiliation`
--

DROP TABLE IF EXISTS `Affiliation`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Affiliation` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Primary key',
  `name` varchar(45) NOT NULL,
  `isVerified` tinyint(1) unsigned DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8 COMMENT='Stores the affiliation information.';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AffiliationType`
--

DROP TABLE IF EXISTS `AffiliationType`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `AffiliationType` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Primary Key',
  `name` varchar(255) NOT NULL COMMENT 'Type name of Affiliation',
  `isVerified` tinyint(1) unsigned DEFAULT '0',
  `suggesterId` int(10) unsigned DEFAULT NULL COMMENT 'If created, then the ID of that person',
  PRIMARY KEY (`id`),
  KEY `FK_AffType_suggesterId` (`suggesterId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ApiClient`
--

DROP TABLE IF EXISTS `ApiClient`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ApiClient` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `key` char(45) DEFAULT NULL,
  `name` varchar(128) NOT NULL,
  `description` varchar(255) NOT NULL,
  `secret` char(8) NOT NULL,
  `timeIssued` int(11) unsigned NOT NULL,
  `isActive` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `email` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `Application`
--

DROP TABLE IF EXISTS `Application`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Application` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `fullName` varchar(255) DEFAULT NULL,
  `namespace` varchar(100) DEFAULT NULL,
  `description` text,
  `isVisible` tinyint(3) unsigned DEFAULT NULL,
  `priority` int(10) unsigned DEFAULT NULL,
  `dataRetentionPeriod` int(11) DEFAULT NULL,
  `isPubliclyVisible` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `iconClass` varchar(100) DEFAULT NULL,
  `applicationCategoryId` int(10) unsigned NOT NULL,
  `appAdminRoleId` int(10) unsigned DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FK_Application_applicationCategoryId` (`applicationCategoryId`),
  KEY `fk_Application_appAdminRoleId` (`appAdminRoleId`)
) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ApplicationCategory`
--

DROP TABLE IF EXISTS `ApplicationCategory`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ApplicationCategory` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(50) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ApplicationSidebarItem`
--

DROP TABLE IF EXISTS `ApplicationSidebarItem`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ApplicationSidebarItem` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `appId` int(10) unsigned DEFAULT NULL,
  `pluginId` int(10) unsigned DEFAULT NULL,
  `label` varchar(50) DEFAULT NULL,
  `hash` varchar(50) DEFAULT NULL,
  `icon` varchar(100) DEFAULT NULL,
  `priority` int(11) NOT NULL DEFAULT '0',
  `isIndexPage` int(1) DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `FK_ApplicationSidebarItem_appId` (`appId`),
  KEY `FK_ApplicationSidebarItem_pluginId` (`pluginId`)
) ENGINE=InnoDB AUTO_INCREMENT=2618 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ApplicationSidebarResourceMapping`
--

DROP TABLE IF EXISTS `ApplicationSidebarResourceMapping`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ApplicationSidebarResourceMapping` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `appSidebarItemId` int(10) unsigned NOT NULL,
  `resourceClass` varchar(255) NOT NULL,
  `module` varchar(128) NOT NULL,
  `controller` varchar(128) NOT NULL,
  `action` varchar(128) NOT NULL,
  `operation` varchar(128) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `FK_ApplicationSidebarItemResourceMapping_appSidebarItemId` (`appSidebarItemId`)
) ENGINE=InnoDB AUTO_INCREMENT=57 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AreaType`
--

DROP TABLE IF EXISTS `AreaType`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `AreaType` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` text,
  `isVerified` tinyint(1) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `Award`
--

DROP TABLE IF EXISTS `Award`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Award` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` text NOT NULL,
  `description` text,
  `link` varchar(255) DEFAULT NULL,
  `isLifetimeAward` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `isVerified` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `unitId` int(10) unsigned NOT NULL,
  `awardTypeId` int(10) unsigned DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FK_Award_awardTypeId` (`awardTypeId`),
  KEY `FK_Award_unitId` (`unitId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AwardType`
--

DROP TABLE IF EXISTS `AwardType`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `AwardType` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` text NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `CampusMap`
--

DROP TABLE IF EXISTS `CampusMap`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `CampusMap` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` text NOT NULL,
  `abbr` varchar(20) NOT NULL,
  `areaTypeId` int(10) unsigned NOT NULL,
  `parentId` int(10) unsigned DEFAULT NULL,
  `isVerified` tinyint(1) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `FK_CampusMap_areaTypeId` (`areaTypeId`),
  KEY `FK_CampusMap_parentId` (`parentId`)
) ENGINE=InnoDB AUTO_INCREMENT=26 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `Class`
--

DROP TABLE IF EXISTS `Class`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Class` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `sisId` varchar(100) NOT NULL,
  `term` varchar(100) NOT NULL,
  `courseId` int(10) unsigned NOT NULL,
  `instructionalMethod` varchar(255) DEFAULT NULL,
  `scheduleType` varchar(255) DEFAULT NULL,
  `campusMapId` int(10) unsigned DEFAULT NULL,
  `isVerified` tinyint(1) unsigned NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`),
  KEY `FK_Class_courseId` (`courseId`),
  KEY `FK_Class_campusMapId` (`campusMapId`)
) ENGINE=InnoDB AUTO_INCREMENT=4084 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `CoreEntity`
--

DROP TABLE IF EXISTS `CoreEntity`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `CoreEntity` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `displayName` text NOT NULL,
  `entityName` text NOT NULL,
  `modelClassName` text NOT NULL,
  `entityClassName` text NOT NULL,
  `masterEntityName` text NOT NULL,
  `masterModelClassName` text NOT NULL,
  `masterEntityClassName` text NOT NULL,
  `todoActionUrl` text NOT NULL,
  `todoTypeId` int(10) unsigned NOT NULL,
  `appId` int(10) unsigned DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FK_CoreEntity_appId` (`appId`),
  KEY `FK_CoreEntity_todoTypeId` (`todoTypeId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `Country`
--

DROP TABLE IF EXISTS `Country`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Country` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `alpha2` varchar(2) DEFAULT NULL,
  `alpha3` varchar(3) DEFAULT NULL,
  `countryCode` varchar(3) DEFAULT NULL,
  `region` varchar(255) DEFAULT NULL,
  `subRegion` varchar(255) DEFAULT NULL,
  `regionCode` varchar(3) DEFAULT NULL,
  `subRegionCode` varchar(3) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=250 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `Course`
--

DROP TABLE IF EXISTS `Course`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Course` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `subjectId` int(10) unsigned NOT NULL,
  `number` varchar(255) NOT NULL,
  `section` varchar(255) DEFAULT NULL,
  `isLabIncluded` tinyint(1) unsigned DEFAULT '0',
  `isSpecialTopic` tinyint(1) DEFAULT '0',
  `isLab` tinyint(4) DEFAULT NULL,
  `parentId` int(11) DEFAULT NULL,
  `lastUpdated` timestamp NULL DEFAULT NULL,
  `isVerified` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `instructionalMethod` varchar(255) DEFAULT NULL,
  `scheduleType` varchar(255) DEFAULT NULL,
  `degreeLevelId` int(10) unsigned DEFAULT NULL,
  `campusMapId` int(10) unsigned DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `unique_Course` (`subjectId`,`number`,`section`),
  KEY `FK_Course_degreeLevelId` (`degreeLevelId`),
  KEY `FK_Course_campusMapId` (`campusMapId`)
) ENGINE=InnoDB AUTO_INCREMENT=2814 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `CourseTags`
--

DROP TABLE IF EXISTS `CourseTags`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `CourseTags` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(100) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `CourseTagsMapping`
--

DROP TABLE IF EXISTS `CourseTagsMapping`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `CourseTagsMapping` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `courseTagsId` int(10) unsigned NOT NULL,
  `courseId` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  KEY `FK_CourseTagsMapping_courseTagsId` (`courseTagsId`),
  KEY `FK_CourseTagsMapping_courseId` (`courseId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `CustomerConfigInfo`
--

DROP TABLE IF EXISTS `CustomerConfigInfo`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `CustomerConfigInfo` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `membershipStatus` enum('Not a member','Membership pending','Is a member') DEFAULT NULL,
  `membershipStartDate` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `DegreeCategory`
--

DROP TABLE IF EXISTS `DegreeCategory`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `DegreeCategory` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `backupVersion` int(10) NOT NULL,
  `backupPointer` int(10) unsigned NOT NULL,
  `name` varchar(45) NOT NULL,
  `isVerified` tinyint(1) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `backup_idx` (`id`,`backupPointer`,`backupVersion`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `DegreeLevel`
--

DROP TABLE IF EXISTS `DegreeLevel`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `DegreeLevel` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(45) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ELCAgencyContact`
--

DROP TABLE IF EXISTS `ELCAgencyContact`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ELCAgencyContact` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `contactName` varchar(255) DEFAULT NULL,
  `contactDesignation` varchar(255) DEFAULT NULL,
  `contactEmail` varchar(255) DEFAULT NULL,
  `agencyId` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  KEY `FK_ELCAgencyContact_AgencyId` (`agencyId`)
) ENGINE=InnoDB AUTO_INCREMENT=100011 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ELCAuthorizationAgency`
--

DROP TABLE IF EXISTS `ELCAuthorizationAgency`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ELCAuthorizationAgency` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `stateId` int(10) unsigned NOT NULL,
  `contactName` varchar(255) DEFAULT NULL,
  `contactDesignation` varchar(255) DEFAULT NULL,
  `isVerified` tinyint(1) unsigned NOT NULL DEFAULT '1',
  `agencyLink` varchar(255) DEFAULT NULL,
  `regulationsLink` varchar(255) DEFAULT NULL,
  `contactEmail` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FK_ELCAuthorizationAgency_stateId` (`stateId`)
) ENGINE=InnoDB AUTO_INCREMENT=1780 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ELCAuthorizationAgencyTag`
--

DROP TABLE IF EXISTS `ELCAuthorizationAgencyTag`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ELCAuthorizationAgencyTag` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `authorizationAgencyId` int(10) unsigned NOT NULL,
  `tagId` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  KEY `FK_ELCAuthorizationAgencyTag_authorizationAgencyId` (`authorizationAgencyId`),
  KEY `FK_ELCAuthorizationAgencyTag_tagId` (`tagId`)
) ENGINE=InnoDB AUTO_INCREMENT=100171 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ELCAuthorizationRenewBackup`
--

DROP TABLE IF EXISTS `ELCAuthorizationRenewBackup`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ELCAuthorizationRenewBackup` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `onlineProgramAuthorizationAgencyMappingId` int(10) unsigned NOT NULL,
  `renewalDate` timestamp NULL DEFAULT NULL,
  `authorizationDate` timestamp NULL DEFAULT NULL,
  `authorizationValidity` timestamp NULL DEFAULT NULL,
  `authorizationPeriod` enum('Annual','Biennial','Lifetime','Custom') DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FK_ELCOnlineProgramAuthorizationAgencyMappingId` (`onlineProgramAuthorizationAgencyMappingId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ELCCampus`
--

DROP TABLE IF EXISTS `ELCCampus`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ELCCampus` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL COMMENT 'Name of the campus',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ELCConcentration`
--

DROP TABLE IF EXISTS `ELCConcentration`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ELCConcentration` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=397 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ELCConcentrationOnlineProgramMapping`
--

DROP TABLE IF EXISTS `ELCConcentrationOnlineProgramMapping`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ELCConcentrationOnlineProgramMapping` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `onlineProgramId` int(10) unsigned NOT NULL,
  `concentrationId` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `unique_ELCConcentrationOnlineProgramMapping` (`onlineProgramId`,`concentrationId`),
  KEY `FK_ELCConcentrationOnlineProgramMapping_onlineProgramId` (`onlineProgramId`),
  KEY `FK_ELCConcentrationOnlineProgramMapping_concentrationId` (`concentrationId`)
) ENGINE=InnoDB AUTO_INCREMENT=289 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ELCCourseDocumentMapping`
--

DROP TABLE IF EXISTS `ELCCourseDocumentMapping`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ELCCourseDocumentMapping` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Primary key.',
  `courseId` int(10) unsigned DEFAULT NULL COMMENT 'Course for which this file belongs.',
  `programId` int(10) unsigned DEFAULT NULL COMMENT 'Program for which this file belongs.',
  `categoryId` int(10) unsigned DEFAULT NULL COMMENT 'Document category to which this file belongs.',
  `fileId` int(10) unsigned DEFAULT NULL COMMENT 'File representing this document.',
  `documentDate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `fk_ElcCourseDoucmentMapping_categoryId` (`categoryId`),
  KEY `fk_ElcCourseDoucmentMapping_courseId` (`courseId`),
  KEY `fk_ElcCourseDoucmentMapping_fileId` (`fileId`)
) ENGINE=InnoDB AUTO_INCREMENT=151 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ELCDocumentCategory`
--

DROP TABLE IF EXISTS `ELCDocumentCategory`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ELCDocumentCategory` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `description` varchar(255) DEFAULT NULL,
  `isVerified` tinyint(1) unsigned NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ELCEmploymentFootprint`
--

DROP TABLE IF EXISTS `ELCEmploymentFootprint`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ELCEmploymentFootprint` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `userId` int(10) unsigned DEFAULT NULL,
  `uniqueId` varchar(255) DEFAULT NULL,
  `sisId` varchar(255) DEFAULT NULL,
  `firstName` varchar(255) NOT NULL,
  `lastName` varchar(255) NOT NULL,
  `employeeTitleId` int(10) unsigned NOT NULL,
  `unitId` int(10) unsigned NOT NULL,
  `email` varchar(255) NOT NULL,
  `workStateId` int(10) unsigned NOT NULL,
  `addressLine1` varchar(255) NOT NULL,
  `addressLine2` varchar(255) DEFAULT NULL,
  `addressCity` varchar(255) NOT NULL,
  `addressStateId` int(10) unsigned NOT NULL,
  `addressZipcode` varchar(10) NOT NULL,
  `dateOfHire` date NOT NULL,
  `isCurrent` tinyint(1) NOT NULL,
  `dateOfTermination` date DEFAULT NULL,
  `includesTravel` tinyint(1) NOT NULL,
  `includedInWorkersCompensation` tinyint(1) DEFAULT NULL,
  `hasTelecommutingAgreement` tinyint(1) NOT NULL,
  `telecommutingNote` varchar(255) DEFAULT NULL,
  `sentLegalNotices` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `FK_ELCEmploymentFootprint_employeeTitleId` (`employeeTitleId`),
  KEY `FK_ELCEmploymentFootprint_unitId` (`unitId`),
  KEY `FK_ELCEmploymentFootprint_workStateId` (`workStateId`),
  KEY `FK_ELCEmploymentFootprint_addressStateId` (`addressStateId`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ELCException`
--

DROP TABLE IF EXISTS `ELCException`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ELCException` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `onlineProgramAuthorizationAgencyMappingId` int(10) unsigned NOT NULL,
  `onlineProgramId` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `UNIQUE_ELCException` (`onlineProgramAuthorizationAgencyMappingId`,`onlineProgramId`),
  KEY `FK_ELCException_onlineProgramAuthorizationAgencyMappingId` (`onlineProgramAuthorizationAgencyMappingId`),
  KEY `FK_ELCException_onlineProgramId` (`onlineProgramId`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ELCExpense`
--

DROP TABLE IF EXISTS `ELCExpense`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ELCExpense` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Primary key.',
  `onlineProgramAuthorizationAgencyMappingId` int(10) unsigned DEFAULT NULL COMMENT 'Program which this expense belongs.',
  `amount` int(10) NOT NULL COMMENT 'Amount spent.',
  `categoryId` int(10) unsigned DEFAULT NULL COMMENT 'Expense category to which this expense belongs.',
  `dateLastModified` timestamp NULL DEFAULT NULL COMMENT 'Specifies the date the expense was modified.',
  `remark` varchar(255) DEFAULT NULL,
  `expenseDate` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  PRIMARY KEY (`id`),
  KEY `fk_ELCExpense_categoryId` (`categoryId`),
  KEY `fk_ELCExpense_onlineProgramAuthorizationAgencyMappingId` (`onlineProgramAuthorizationAgencyMappingId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ELCExpenseCategory`
--

DROP TABLE IF EXISTS `ELCExpenseCategory`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ELCExpenseCategory` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `description` varchar(255) DEFAULT NULL,
  `isVerified` tinyint(1) unsigned NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ELCFile`
--

DROP TABLE IF EXISTS `ELCFile`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ELCFile` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Primary key.',
  `onlineProgramAuthorizationAgencyMappingId` int(10) unsigned DEFAULT NULL COMMENT 'Program which this file belongs.',
  `categoryId` int(10) unsigned DEFAULT NULL COMMENT 'Document category to which this file belongs.',
  `fileId` int(10) unsigned DEFAULT NULL COMMENT 'File representing this document.',
  `documentDate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `fk_ELCFile_categoryId` (`categoryId`),
  KEY `fk_ELCFile_onlineProgramAuthorizationAgencyMappingId` (`onlineProgramAuthorizationAgencyMappingId`),
  KEY `fk_ELCFile_fileId` (`fileId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ELCInterestLicensureRequirement`
--

DROP TABLE IF EXISTS `ELCInterestLicensureRequirement`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ELCInterestLicensureRequirement` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `interestId` int(10) unsigned NOT NULL,
  `stateLicensureRequirementId` int(10) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `FK_ELCInterestLicensureRequirement_interestId` (`interestId`)
) ENGINE=InnoDB AUTO_INCREMENT=4473 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ELCInterests`
--

DROP TABLE IF EXISTS `ELCInterests`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ELCInterests` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL COMMENT 'Name of the interest',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ELCLicensureRequirement`
--

DROP TABLE IF EXISTS `ELCLicensureRequirement`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ELCLicensureRequirement` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `licensureRequirement` varchar(255) NOT NULL,
  `description` varchar(255) DEFAULT NULL,
  `unit` enum('Hours','Days') NOT NULL DEFAULT 'Hours',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=46 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ELCOnlineCourseProgramMapping`
--

DROP TABLE IF EXISTS `ELCOnlineCourseProgramMapping`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ELCOnlineCourseProgramMapping` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `onlineCourseId` int(10) unsigned NOT NULL,
  `onlineProgramId` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `UNIQUE_ELCOnlineCourseProgramMapping` (`onlineCourseId`,`onlineProgramId`),
  KEY `FK_ELCOnlineCourseProgamMapping_onlineProgramId` (`onlineProgramId`)
) ENGINE=InnoDB AUTO_INCREMENT=28494 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ELCOnlineProgram`
--

DROP TABLE IF EXISTS `ELCOnlineProgram`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ELCOnlineProgram` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL COMMENT 'Name of the online program',
  `isVerified` tinyint(4) DEFAULT '0',
  `description` text,
  `degreeLevelId` int(10) unsigned DEFAULT NULL,
  `levelId` int(10) unsigned DEFAULT NULL,
  `collegeId` int(10) unsigned DEFAULT NULL,
  `cipCode` varchar(255) DEFAULT NULL,
  `programCode` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `fk_ELCOnlineProgram_degreeLevelId` (`degreeLevelId`),
  KEY `fk_ELCOnlineProgram_levelId` (`levelId`),
  KEY `fk_ELCOnlineProgram_collegeId` (`collegeId`)
) ENGINE=InnoDB AUTO_INCREMENT=1100 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ELCOnlineProgramAuthorizationAgencyMapping`
--

DROP TABLE IF EXISTS `ELCOnlineProgramAuthorizationAgencyMapping`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ELCOnlineProgramAuthorizationAgencyMapping` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `statusId` int(10) unsigned NOT NULL,
  `onlineProgramId` int(10) unsigned DEFAULT NULL,
  `authorizationAgencyId` int(10) unsigned NOT NULL,
  `activityDate` timestamp NULL DEFAULT NULL,
  `authorizationDate` timestamp NULL DEFAULT NULL,
  `authorizationValidity` timestamp NULL DEFAULT NULL,
  `authorizationPeriod` enum('Annual','Biennial','Lifetime','Custom') DEFAULT NULL,
  `reminderDate` timestamp NULL DEFAULT NULL,
  `renewalReminderPeriod` int(10) DEFAULT NULL,
  `hasExceptions` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `statusLabelId` int(10) unsigned DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `UNIQUE_ELCOnlineProgramAuthorizationAgencyMapping` (`onlineProgramId`,`authorizationAgencyId`),
  KEY `FK_ELCOnlineProgram_onlineProgramId` (`onlineProgramId`),
  KEY `FK_ELCStatus_statusId` (`statusId`),
  KEY `FK_ELCAuthorizationAgency_authorizationAgencyId` (`authorizationAgencyId`),
  KEY `FK_ELCStatusLabel_statusLabelId` (`statusLabelId`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ELCOnlineProgramTag`
--

DROP TABLE IF EXISTS `ELCOnlineProgramTag`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ELCOnlineProgramTag` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(100) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ELCOnlineProgramTagMapping`
--

DROP TABLE IF EXISTS `ELCOnlineProgramTagMapping`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ELCOnlineProgramTagMapping` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `onlineProgramId` int(10) unsigned NOT NULL,
  `onlineProgramTagId` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `UNIQUE_ELCOnlineProgramTagMapping` (`onlineProgramId`,`onlineProgramTagId`),
  KEY `FK_ELCOnlineProgramTagMapping_onlineProgramId` (`onlineProgramId`),
  KEY `FK_ELCOnlineProgramTagMapping_onlineProgramTagId` (`onlineProgramTagId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ELCPhysicalPresence`
--

DROP TABLE IF EXISTS `ELCPhysicalPresence`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ELCPhysicalPresence` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `categoryId` int(10) unsigned NOT NULL,
  `attribute` varchar(255) DEFAULT '',
  `description` varchar(255) DEFAULT NULL,
  `color` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `fk_ELCPhysicalPresence_categoryId` (`categoryId`)
) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ELCPhysicalPresenceCategory`
--

DROP TABLE IF EXISTS `ELCPhysicalPresenceCategory`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ELCPhysicalPresenceCategory` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `categoryName` varchar(255) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ELCPhysicalPresenceMapping`
--

DROP TABLE IF EXISTS `ELCPhysicalPresenceMapping`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ELCPhysicalPresenceMapping` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `onlineProgramId` int(10) unsigned NOT NULL,
  `primaryTriggerId` int(10) unsigned NOT NULL,
  `subTriggerId` int(10) unsigned DEFAULT NULL,
  `stateId` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `physicalPresenceStateIdMapping` (`stateId`,`subTriggerId`,`primaryTriggerId`,`onlineProgramId`),
  KEY `fk_ELCPhysicalPresenceMapping_subTrigger_idx` (`subTriggerId`),
  KEY `fk_ELCPhysicalPresenceMapping_primaryTrigger_Id` (`primaryTriggerId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ELCProgramCampus`
--

DROP TABLE IF EXISTS `ELCProgramCampus`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ELCProgramCampus` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `programId` int(10) unsigned NOT NULL,
  `campusId` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  KEY `FK_ELCProgramCampus_programId` (`programId`),
  KEY `FK_ELCProgramCampus_campusId` (`campusId`)
) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ELCProgramLicensureRequirement`
--

DROP TABLE IF EXISTS `ELCProgramLicensureRequirement`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ELCProgramLicensureRequirement` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `programId` int(10) unsigned NOT NULL,
  `stateLicensureRequirementId` int(10) unsigned NOT NULL,
  `hours` float NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `FK_ElcProgramLicensureRequirement_programId` (`programId`),
  KEY `FK_ElcProgramLicensureRequirement_stateLicensureRequirementId` (`stateLicensureRequirementId`)
) ENGINE=InnoDB AUTO_INCREMENT=3939 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ELCSaraState`
--

DROP TABLE IF EXISTS `ELCSaraState`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ELCSaraState` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `stateId` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `UNIQUE_ELCSaraState` (`stateId`),
  KEY `FK_ELCSaraState_stateId` (`stateId`)
) ENGINE=InnoDB AUTO_INCREMENT=53 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ELCStateActivity`
--

DROP TABLE IF EXISTS `ELCStateActivity`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ELCStateActivity` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `stateId` int(10) unsigned NOT NULL,
  `primaryTriggerId` int(10) unsigned NOT NULL,
  `subTriggerId` int(10) unsigned DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `fk_ELCStateActivity_stateId` (`stateId`),
  KEY `fk_ELCStateActivity_primaryTrigger_Id` (`primaryTriggerId`),
  KEY `fk_ELCStateActivity_subTrigger` (`subTriggerId`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ELCStateLicensureRequirement`
--

DROP TABLE IF EXISTS `ELCStateLicensureRequirement`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ELCStateLicensureRequirement` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `licensureRequirementId` int(10) unsigned NOT NULL,
  `stateId` int(10) unsigned NOT NULL,
  `programId` int(10) unsigned NOT NULL,
  `actualUnits` float NOT NULL,
  `licensureDisclosure` text,
  `status` int(10) NOT NULL DEFAULT '-1',
  `determinationDate` date DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FK_ElcStateLicensureRequirement_licensureRequirementId` (`licensureRequirementId`),
  KEY `FK_ElcStateLicensureRequirement_stateId` (`stateId`),
  KEY `FK_ElcStateLicensureRequirement_programId` (`programId`)
) ENGINE=InnoDB AUTO_INCREMENT=3939 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ELCStatus`
--

DROP TABLE IF EXISTS `ELCStatus`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ELCStatus` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `color` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ELCStatusLabel`
--

DROP TABLE IF EXISTS `ELCStatusLabel`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ELCStatusLabel` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `statusId` int(10) unsigned NOT NULL,
  `name` varchar(255) NOT NULL,
  `details` text,
  `color` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `fk_ELCStatusLabel_statusId` (`statusId`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ELCStudentEnrollment`
--

DROP TABLE IF EXISTS `ELCStudentEnrollment`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ELCStudentEnrollment` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `stateId` int(10) unsigned NOT NULL,
  `onlineProgramId` int(10) unsigned NOT NULL,
  `yearSemesterId` int(10) unsigned NOT NULL,
  `concentrationId` int(10) unsigned DEFAULT NULL,
  `totalStudents` int(10) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `UNIQUE_ELCStudentEnrollment` (`stateId`,`onlineProgramId`,`yearSemesterId`,`concentrationId`),
  KEY `FK_ELCStudentEnrollment_yearSemesterId` (`yearSemesterId`),
  KEY `FK_ELCStudentEnrollment_concentrationId` (`concentrationId`),
  KEY `FK_ELCStudentEnrollment_onlineProgramId` (`onlineProgramId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ELCStudentInfo`
--

DROP TABLE IF EXISTS `ELCStudentInfo`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ELCStudentInfo` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `term` varchar(100) NOT NULL,
  `class` varchar(100) NOT NULL,
  `programId` int(10) unsigned DEFAULT NULL,
  `concentrationId` varchar(100) DEFAULT NULL,
  `sisId` varchar(100) DEFAULT NULL,
  `ouid` varchar(100) DEFAULT NULL,
  `state` varchar(2) DEFAULT NULL,
  `country` varchar(2) DEFAULT NULL,
  `zipcode` varchar(100) DEFAULT NULL,
  `isVerified` tinyint(1) unsigned NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`),
  KEY `FK_StudentInfo_programId` (`programId`)
) ENGINE=InnoDB AUTO_INCREMENT=91420 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ELCTag`
--

DROP TABLE IF EXISTS `ELCTag`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ELCTag` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(100) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=43 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `Email`
--

DROP TABLE IF EXISTS `Email`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Email` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `to` text NOT NULL,
  `replyTo` varchar(255) DEFAULT NULL,
  `subject` varchar(255) DEFAULT NULL,
  `body` text NOT NULL,
  `dateCreated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `entityClassName` varchar(255) DEFAULT NULL,
  `entityId` varchar(255) DEFAULT NULL,
  `dateSent` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `EmailTemplate`
--

DROP TABLE IF EXISTS `EmailTemplate`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `EmailTemplate` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `applicationId` int(11) unsigned NOT NULL,
  `name` varchar(255) NOT NULL,
  `subject` text NOT NULL,
  `body` text NOT NULL,
  PRIMARY KEY (`id`),
  KEY `FK_EmailTemplate_applicationId` (`applicationId`)
) ENGINE=InnoDB AUTO_INCREMENT=53 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `EmailType`
--

DROP TABLE IF EXISTS `EmailType`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `EmailType` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` text NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `EmployeeTitle`
--

DROP TABLE IF EXISTS `EmployeeTitle`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `EmployeeTitle` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Primary key',
  `name` varchar(255) DEFAULT NULL,
  `isVerified` tinyint(4) DEFAULT '0',
  `code` varchar(10) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `name` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COMMENT='Stores the title of the Employee.';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `EntityAddress`
--

DROP TABLE IF EXISTS `EntityAddress`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `EntityAddress` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `entityClassName` varchar(255) NOT NULL,
  `entityId` int(10) unsigned NOT NULL,
  `addressTypeId` int(10) unsigned NOT NULL,
  `address` text NOT NULL,
  `address2` text,
  `lat` double DEFAULT NULL,
  `long` double DEFAULT NULL,
  `isPrimary` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `isRemovable` tinyint(1) unsigned NOT NULL DEFAULT '1',
  `isVisible` tinyint(1) unsigned NOT NULL DEFAULT '1',
  `campusMapId` int(10) unsigned DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FK_EntityAddress_addressTypeId` (`addressTypeId`),
  KEY `FK_EntityAddress_campusTypeId` (`campusMapId`),
  KEY `idx_EntityID_EntityClassName` (`entityClassName`,`entityId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `EntityEmail`
--

DROP TABLE IF EXISTS `EntityEmail`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `EntityEmail` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `entityClassName` varchar(255) NOT NULL,
  `entityId` int(10) unsigned NOT NULL,
  `email` text NOT NULL,
  `emailTypeId` int(10) unsigned NOT NULL,
  `isPrimary` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `isRemovable` tinyint(1) unsigned NOT NULL DEFAULT '1',
  `isVisible` tinyint(1) unsigned NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`),
  KEY `idx_EntityID_EntityClassName` (`entityClassName`,`entityId`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `EntityFile`
--

DROP TABLE IF EXISTS `EntityFile`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `EntityFile` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `fileId` int(10) unsigned NOT NULL,
  `entityClassName` varchar(45) NOT NULL,
  `entityId` int(10) unsigned NOT NULL,
  `name` text CHARACTER SET utf8,
  `priority` int(10) unsigned NOT NULL DEFAULT '0',
  `dateCreated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `backupPointer` int(10) unsigned DEFAULT NULL,
  `backupVersion` int(10) unsigned DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `entity` (`entityClassName`,`entityId`,`fileId`),
  UNIQUE KEY `backupPointer_idx` (`id`,`entityId`,`entityClassName`,`fileId`,`backupPointer`,`backupVersion`),
  KEY `file` (`fileId`),
  KEY `idx_EntityID_EntityClassName` (`entityClassName`,`entityId`)
) ENGINE=MyISAM AUTO_INCREMENT=233 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `EntityLog`
--

DROP TABLE IF EXISTS `EntityLog`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `EntityLog` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `actorId` int(10) unsigned DEFAULT NULL,
  `entityId` int(10) unsigned NOT NULL,
  `entityClassName` varchar(255) NOT NULL,
  `actionId` int(1) DEFAULT NULL,
  `message` text,
  `dateCreated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `extras` text,
  PRIMARY KEY (`id`),
  KEY `idx_EntityID_EntityClassName` (`entityClassName`,`entityId`)
) ENGINE=MyISAM AUTO_INCREMENT=3245 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `EntityPhone`
--

DROP TABLE IF EXISTS `EntityPhone`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `EntityPhone` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `entityClassName` varchar(255) NOT NULL,
  `entityId` int(10) unsigned NOT NULL,
  `number` text NOT NULL,
  `extension` text,
  `phoneTypeId` int(10) unsigned NOT NULL,
  `isPrimary` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `isFax` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `isRemovable` tinyint(1) unsigned NOT NULL DEFAULT '1',
  `isVisible` tinyint(1) unsigned NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`),
  KEY `FK_EntityPhone_phoneTypeId` (`phoneTypeId`),
  KEY `idx_EntityID_EntityClassName` (`entityClassName`,`entityId`)
) ENGINE=InnoDB AUTO_INCREMENT=1477 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `EntityUpdatesLog`
--

DROP TABLE IF EXISTS `EntityUpdatesLog`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `EntityUpdatesLog` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `actorId` int(10) unsigned DEFAULT NULL,
  `entityId` int(10) unsigned NOT NULL,
  `entityClassName` varchar(255) NOT NULL,
  `actionId` int(1) DEFAULT NULL,
  `message` text,
  `dateCreated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `extras` text,
  PRIMARY KEY (`id`),
  KEY `idx_EntityID_EntityClassName` (`entityClassName`,`entityId`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `EntityUrl`
--

DROP TABLE IF EXISTS `EntityUrl`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `EntityUrl` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `entityClassName` varchar(100) NOT NULL,
  `entityId` int(10) unsigned NOT NULL,
  `link` varchar(255) NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  `backupPointer` int(10) unsigned DEFAULT '0',
  `backupVersion` int(10) unsigned DEFAULT '0',
  `isVisible` tinyint(1) unsigned NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`),
  KEY `idx_EntityID_EntityClassName` (`entityClassName`,`entityId`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `Equipment`
--

DROP TABLE IF EXISTS `Equipment`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Equipment` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `make` varchar(200) DEFAULT NULL,
  `model` varchar(200) DEFAULT NULL,
  `serial` varchar(200) DEFAULT NULL,
  `value` double NOT NULL,
  `primaryContactId` int(11) unsigned DEFAULT NULL,
  `primaryContactName` varchar(255) DEFAULT NULL,
  `primaryContactUrl` varchar(255) DEFAULT NULL,
  `avatarFileName` varchar(255) DEFAULT NULL,
  `isVerified` tinyint(1) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `FK_Equipment_primaryContactId` (`primaryContactId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `Event`
--

DROP TABLE IF EXISTS `Event`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Event` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'primary key',
  `name` text NOT NULL,
  `isVerified` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `EventOccurence`
--

DROP TABLE IF EXISTS `EventOccurence`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `EventOccurence` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'primary key',
  `eventId` int(10) unsigned NOT NULL COMMENT 'id of ''event'' table',
  `entityAddressId` int(10) unsigned DEFAULT NULL COMMENT 'id of ''entityAddress'' table',
  `fromDate` datetime NOT NULL COMMENT 'from Date',
  `toDate` datetime NOT NULL COMMENT 'to Date',
  PRIMARY KEY (`id`),
  KEY `EventOccurse_fk_Event` (`eventId`),
  KEY `EventOccurence_fk_EntityAddress` (`entityAddressId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `EventRegistry`
--

DROP TABLE IF EXISTS `EventRegistry`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `EventRegistry` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `observerClassName` varchar(255) NOT NULL,
  `target` varchar(255) NOT NULL,
  `action` enum('create','read','update','delete') NOT NULL,
  `observerMethod` varchar(255) NOT NULL,
  `executionOrder` enum('before','after') NOT NULL,
  `observerFilePath` varchar(255) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `Key_EventRegistry_targetAndActionIdAndExecutionOrder` (`target`,`action`,`executionOrder`)
) ENGINE=MyISAM AUTO_INCREMENT=230 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ExpertiseLevel`
--

DROP TABLE IF EXISTS `ExpertiseLevel`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ExpertiseLevel` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

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

DROP TABLE IF EXISTS `Facility`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Facility` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) CHARACTER SET latin1 NOT NULL,
  `primaryContactId` int(10) unsigned DEFAULT NULL,
  `isVerified` tinyint(3) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `backup_idx` (`id`),
  KEY `FK_Facility_primaryContactId` (`primaryContactId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `Feed`
--

DROP TABLE IF EXISTS `Feed`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Feed` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `itemId` int(10) unsigned DEFAULT NULL,
  `appId` int(10) unsigned NOT NULL,
  `userId` int(10) unsigned NOT NULL,
  `roleId` int(10) unsigned DEFAULT NULL,
  `dateCreated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `title` text NOT NULL,
  `description` text,
  `actionUrl` text,
  `extra` longtext,
  `priority` tinyint(3) unsigned DEFAULT '0',
  `isRead` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `feedTypeId` tinyint(3) unsigned DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FK_Feed_appId` (`appId`),
  KEY `Fk_Feed_userId` (`userId`),
  KEY `Fk_Feed_feedTypeId` (`feedTypeId`)
) ENGINE=InnoDB AUTO_INCREMENT=146 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `FeedType`
--

DROP TABLE IF EXISTS `FeedType`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `FeedType` (
  `id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `description` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `File`
--

DROP TABLE IF EXISTS `File`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `File` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Primary key',
  `userId` int(10) unsigned NOT NULL COMMENT 'Connects the File to its User.',
  `fileTypeId` int(10) unsigned DEFAULT NULL COMMENT 'Connects the File to its type.',
  `parentId` int(10) unsigned DEFAULT NULL COMMENT 'Connects the File to its parent File.',
  `name` varchar(255) NOT NULL COMMENT 'Speicifies the name of the file.',
  `systemName` varchar(255) DEFAULT NULL,
  `size` bigint(20) unsigned NOT NULL COMMENT 'Specifies the file size.',
  `dateCreated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'Specifies when the file was created.',
  `isFolder` tinyint(1) NOT NULL COMMENT 'Specifies if the file is a folder structure.',
  `description` varchar(255) DEFAULT NULL COMMENT 'Describes the file.',
  `dateLastModified` timestamp NULL DEFAULT NULL COMMENT 'Specifies the date the file was modified.',
  `meta` text,
  `locked` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `hidden` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `deleted` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `read` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `write` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `backupPointer` int(10) NOT NULL DEFAULT '0',
  `backupVersion` int(10) NOT NULL DEFAULT '0',
  `isDuplicate` tinyint(1) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `fk_File_userId` (`userId`),
  KEY `fk_File_parentId` (`parentId`),
  KEY `fk_File_id1` (`fileTypeId`),
  KEY `file_deleted` (`deleted`),
  KEY `file_is_folder` (`isFolder`),
  KEY `file_date_modified` (`dateLastModified`),
  KEY `file_description` (`description`),
  KEY `backup_idx` (`id`,`backupPointer`,`backupVersion`)
) ENGINE=InnoDB AUTO_INCREMENT=253 DEFAULT CHARSET=utf8 COMMENT='Stores all the files and their information.';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `FileNoteMapping`
--

DROP TABLE IF EXISTS `FileNoteMapping`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `FileNoteMapping` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `custId` int(10) unsigned NOT NULL DEFAULT '0',
  `noteId` int(10) unsigned DEFAULT NULL,
  `fileId` int(10) unsigned DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FK_FileNoteMapping_noteId` (`noteId`),
  KEY `FK_FileNoteMapping_fileId` (`fileId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `FileType`
--

DROP TABLE IF EXISTS `FileType`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `FileType` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Primary key.',
  `mime` varchar(255) NOT NULL COMMENT 'Specifies the file mime type',
  `extension` varchar(255) NOT NULL COMMENT 'Specifies the file extension.',
  `description` text COMMENT 'Describes any details about the type of file.',
  `icon` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `unique_FileType` (`mime`,`extension`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1 COMMENT='Stores the type of file information.';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `GroupAcl`
--

DROP TABLE IF EXISTS `GroupAcl`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `GroupAcl` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` text NOT NULL,
  `description` text NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `GroupAclUserMapping`
--

DROP TABLE IF EXISTS `GroupAclUserMapping`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `GroupAclUserMapping` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `groupId` int(10) unsigned NOT NULL,
  `userId` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  KEY `FK_GroupAcl_groupId` (`groupId`),
  KEY `FK_User_UserId` (`userId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `InvalidLoginLog`
--

DROP TABLE IF EXISTS `InvalidLoginLog`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `InvalidLoginLog` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `username` varchar(100) DEFAULT NULL,
  `ipv4` int(10) unsigned DEFAULT NULL,
  `ipv6` binary(16) DEFAULT NULL,
  `activityTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `extras` varchar(255) DEFAULT NULL,
  `isValidated` tinyint(1) DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `Laboratory`
--

DROP TABLE IF EXISTS `Laboratory`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Laboratory` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `primaryContactId` int(10) unsigned DEFAULT NULL,
  `isVerified` tinyint(3) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `FK_Laboratory_primaryContactId` (`primaryContactId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `LdapDeptMap`
--

DROP TABLE IF EXISTS `LdapDeptMap`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `LdapDeptMap` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `deptCode` varchar(10) NOT NULL,
  `unitId` int(10) unsigned DEFAULT NULL,
  `ldapName` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `Fk_LdapDeptMap_UnitId` (`unitId`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `List`
--

DROP TABLE IF EXISTS `List`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `List` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `appId` int(10) unsigned NOT NULL,
  `clazz` varchar(255) NOT NULL,
  `modelClass` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `fk_List_appId_idx` (`appId`)
) ENGINE=InnoDB AUTO_INCREMENT=32 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ListColumn`
--

DROP TABLE IF EXISTS `ListColumn`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ListColumn` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `listId` int(10) unsigned NOT NULL,
  `columnName` varchar(255) NOT NULL,
  `name` varchar(255) NOT NULL,
  `type` varchar(255) NOT NULL DEFAULT 'text',
  `isSortable` tinyint(1) unsigned NOT NULL DEFAULT '1',
  `sortingProcessor` varchar(255) DEFAULT NULL,
  `processor` varchar(255) DEFAULT NULL,
  `isVisible` tinyint(1) unsigned NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`),
  UNIQUE KEY `UQ_ListColumn` (`listId`,`columnName`),
  KEY `fk_ListColumn_listId_idx` (`listId`)
) ENGINE=InnoDB AUTO_INCREMENT=746 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ListExportCache`
--

DROP TABLE IF EXISTS `ListExportCache`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ListExportCache` (
  `userId` int(10) DEFAULT NULL,
  `listId` int(11) DEFAULT NULL,
  `priority` int(10) unsigned NOT NULL DEFAULT '0',
  `rowData` longtext
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ListFilter`
--

DROP TABLE IF EXISTS `ListFilter`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ListFilter` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `listId` int(10) unsigned NOT NULL,
  `name` varchar(255) NOT NULL,
  `filterBy` varchar(255) DEFAULT NULL,
  `processor` varchar(255) DEFAULT NULL,
  `priority` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'lower is higher',
  `isVisible` tinyint(1) unsigned NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`),
  KEY `fk_ListFilter_listId_idx` (`listId`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ListFilterParam`
--

DROP TABLE IF EXISTS `ListFilterParam`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ListFilterParam` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `filterId` int(10) unsigned NOT NULL,
  `paramName` varchar(255) NOT NULL,
  `name` varchar(255) NOT NULL,
  `type` varchar(100) NOT NULL,
  `provider` varchar(255) DEFAULT NULL,
  `isBackend` tinyint(1) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `FK_ListFilterParam` (`filterId`,`paramName`),
  KEY `fk_ListFilterParam_filterId_idx` (`filterId`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ListFormat`
--

DROP TABLE IF EXISTS `ListFormat`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ListFormat` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(200) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ListPreset`
--

DROP TABLE IF EXISTS `ListPreset`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ListPreset` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `listId` int(10) unsigned NOT NULL,
  `userId` int(10) unsigned DEFAULT NULL,
  `name` varchar(200) NOT NULL,
  `description` varchar(255) DEFAULT NULL,
  `isDefault` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `isLast` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `page` int(10) unsigned DEFAULT '0',
  `perPage` int(10) unsigned DEFAULT '20',
  PRIMARY KEY (`id`),
  KEY `FK_ListPreset_userId_idx` (`userId`),
  KEY `FK_ListPreset_listId_idx` (`listId`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ListPresetColumn`
--

DROP TABLE IF EXISTS `ListPresetColumn`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ListPresetColumn` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `presetId` int(10) unsigned NOT NULL,
  `columnId` int(10) unsigned NOT NULL,
  `priority` int(10) unsigned NOT NULL,
  `sortDirection` varchar(45) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `UQ_ListPresetColumn` (`presetId`,`columnId`),
  KEY `FK_ListPresetColumn_columnId_idx` (`presetId`),
  KEY `FK_ListPresetColumn_columnId_idx1` (`columnId`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ListPresetFilter`
--

DROP TABLE IF EXISTS `ListPresetFilter`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ListPresetFilter` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `presetId` int(10) unsigned NOT NULL,
  `filterId` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `UQ_ListPresetFilter` (`presetId`,`filterId`),
  KEY `FK_ListPresetFilter_presetId_idx` (`presetId`),
  KEY `FK_ListPresetFilter_filterId_idx` (`filterId`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ListPresetFilterParam`
--

DROP TABLE IF EXISTS `ListPresetFilterParam`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ListPresetFilterParam` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `presetId` int(10) unsigned NOT NULL,
  `paramId` int(10) unsigned NOT NULL,
  `paramValue` text NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `UQ_ListPresetFilterParam` (`presetId`,`paramId`),
  KEY `FK_ListPresetFilterParam__idx` (`presetId`),
  KEY `FK_ListPresetFilterParam_paramId_idx` (`paramId`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `Major`
--

DROP TABLE IF EXISTS `Major`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Major` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Primary key.',
  `name` varchar(255) NOT NULL COMMENT 'Specifies the name of major.',
  `isVerified` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Stores major information.';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `MasterAddressType`
--

DROP TABLE IF EXISTS `MasterAddressType`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `MasterAddressType` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` text NOT NULL,
  `clientId` int(10) unsigned DEFAULT NULL,
  `isRejected` tinyint(1) DEFAULT '0',
  `isModified` tinyint(1) DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `FK_MasterAddressType_clientId` (`clientId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `MasterELCAuthorizationAgency`
--

DROP TABLE IF EXISTS `MasterELCAuthorizationAgency`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `MasterELCAuthorizationAgency` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `stateId` int(10) unsigned NOT NULL,
  `contactName` varchar(255) DEFAULT NULL,
  `contactDesignation` varchar(255) DEFAULT NULL,
  `isVerified` tinyint(1) unsigned NOT NULL DEFAULT '1',
  `agencyLink` varchar(255) DEFAULT NULL,
  `regulationsLink` varchar(255) DEFAULT NULL,
  `contactEmail` varchar(255) DEFAULT NULL,
  `clientId` int(10) unsigned DEFAULT NULL,
  `isRejected` tinyint(1) DEFAULT '0',
  `isModified` tinyint(1) DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `FK_MasterELCAuthorizationAgency_stateId` (`stateId`),
  KEY `FK_MasterELCAuthorizationAgency_clientId` (`clientId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `MasterELCSaraState`
--

DROP TABLE IF EXISTS `MasterELCSaraState`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `MasterELCSaraState` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `stateId` int(10) unsigned NOT NULL,
  `clientId` int(10) unsigned DEFAULT NULL,
  `isRejected` tinyint(1) DEFAULT '0',
  `isModified` tinyint(1) DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `UNIQUE_MasterELCSaraState` (`stateId`),
  KEY `FK_MasterELCSaraState_stateId` (`stateId`),
  KEY `FK_MasterELCSaraState_clientId` (`clientId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `MasterNotification`
--

DROP TABLE IF EXISTS `MasterNotification`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `MasterNotification` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `notificationType` enum('SystemState') NOT NULL,
  `notificationValue` text NOT NULL,
  `disableLogin` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `notificationType_UNIQUE` (`notificationType`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `NightlyProcess`
--

DROP TABLE IF EXISTS `NightlyProcess`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `NightlyProcess` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `application` varchar(45) DEFAULT NULL,
  `module` varchar(45) DEFAULT NULL,
  `method` varchar(45) DEFAULT NULL,
  `params` text,
  `minute` varchar(32) DEFAULT '*',
  `hour` varchar(32) DEFAULT '*',
  `dayOfMonth` varchar(32) DEFAULT '*',
  `month` varchar(32) DEFAULT '*',
  `dayOfWeek` varchar(32) DEFAULT '*',
  `description` text,
  `lastExec` int(32) DEFAULT '0',
  `isRecurring` tinyint(1) unsigned NOT NULL DEFAULT '1',
  `recurringCount` int(10) unsigned NOT NULL DEFAULT '0',
  `isActive` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `isRequired` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `lastNotificationTime` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `timeIndex` (`dayOfWeek`,`month`,`dayOfMonth`,`hour`,`minute`),
  KEY `moduleIndex` (`application`,`module`,`method`)
) ENGINE=MyISAM AUTO_INCREMENT=18 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `NightlyProcessQueue`
--

DROP TABLE IF EXISTS `NightlyProcessQueue`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `NightlyProcessQueue` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `timeScheduled` int(10) unsigned NOT NULL,
  `priority` int(10) unsigned NOT NULL,
  `description` text,
  `application` varchar(45) NOT NULL,
  `module` varchar(45) NOT NULL,
  `method` varchar(128) NOT NULL,
  `params` text,
  `log` text,
  `status` int(10) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `idx_priority` (`application`,`module`,`method`,`priority`,`timeScheduled`)
) ENGINE=InnoDB AUTO_INCREMENT=32013 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `Note`
--

DROP TABLE IF EXISTS `Note`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Note` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `custId` int(10) unsigned NOT NULL DEFAULT '0',
  `appId` int(10) unsigned DEFAULT NULL,
  `entityId` int(10) unsigned NOT NULL,
  `entityClassName` varchar(255) NOT NULL,
  `title` varchar(255) NOT NULL,
  `note` text NOT NULL,
  `hasAttachedFile` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `isRichText` tinyint(1) unsigned NOT NULL DEFAULT '1',
  `actorId` int(10) unsigned DEFAULT NULL,
  `lastUpdatedOn` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `createdBy` int(10) unsigned NOT NULL,
  `createdOn` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `FK_Note_appId` (`appId`),
  KEY `FK_Note_actorId` (`actorId`),
  KEY `FK_Note_createdBy` (`createdBy`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `NotificationPreference`
--

DROP TABLE IF EXISTS `NotificationPreference`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `NotificationPreference` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `Patent`
--

DROP TABLE IF EXISTS `Patent`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Patent` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` text NOT NULL,
  `number` text NOT NULL,
  `abstract` text,
  `isVerified` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `monthIssued` int(2) DEFAULT NULL,
  `yearIssued` int(4) DEFAULT NULL,
  PRIMARY KEY (`id`,`isVerified`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `PeopleGroup`
--

DROP TABLE IF EXISTS `PeopleGroup`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PeopleGroup` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `primaryContactId` int(10) unsigned DEFAULT NULL,
  `isVerified` tinyint(3) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `FK_Group_primaryContactId` (`primaryContactId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `PhoneType`
--

DROP TABLE IF EXISTS `PhoneType`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PhoneType` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` text NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `Plugin`
--

DROP TABLE IF EXISTS `Plugin`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Plugin` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(50) NOT NULL,
  `label` varchar(50) DEFAULT NULL,
  `appId` int(11) unsigned DEFAULT NULL,
  `description` text,
  PRIMARY KEY (`id`),
  KEY `FK_Plugin_appId` (`appId`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `PluginResourceMapping`
--

DROP TABLE IF EXISTS `PluginResourceMapping`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PluginResourceMapping` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `pluginId` int(10) unsigned NOT NULL,
  `resourceClass` varchar(255) NOT NULL,
  `module` varchar(128) NOT NULL,
  `controller` varchar(128) NOT NULL,
  `action` varchar(128) NOT NULL,
  `operation` varchar(128) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `FK_PluginResourceMapping_pluginId` (`pluginId`)
) ENGINE=InnoDB AUTO_INCREMENT=49 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `Presentation`
--

DROP TABLE IF EXISTS `Presentation`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Presentation` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'primary key',
  `name` text NOT NULL COMMENT 'name',
  `presentationTypeId` int(10) unsigned NOT NULL DEFAULT '1',
  `description` text COMMENT 'description',
  `isVerified` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'admin verifies it. initially 0.',
  `secondaryPresentationTypeId` int(10) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `PresentationType`
--

DROP TABLE IF EXISTS `PresentationType`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PresentationType` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) CHARACTER SET latin1 NOT NULL,
  `priority` int(10) DEFAULT NULL,
  `isVerified` tinyint(1) DEFAULT NULL,
  `suggesterId` int(10) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `priority` (`priority`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `PrfAdministrationOther`
--

DROP TABLE IF EXISTS `PrfAdministrationOther`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PrfAdministrationOther` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `profileId` int(10) unsigned NOT NULL,
  `categoryId` int(10) unsigned NOT NULL,
  `title` text NOT NULL,
  `description` text,
  `monthPerformed` int(2) DEFAULT NULL,
  `yearPerformed` int(4) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FK_PrfAdministrationOther_categoryId` (`categoryId`),
  KEY `FK_PrfAdministrationOther_profileId` (`profileId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `PrfAdministrativeAppointment`
--

DROP TABLE IF EXISTS `PrfAdministrativeAppointment`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PrfAdministrativeAppointment` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `backupVersion` int(10) NOT NULL,
  `backupPointer` int(10) unsigned NOT NULL,
  `profileId` int(10) unsigned NOT NULL,
  `employeeTitleId` int(10) unsigned DEFAULT NULL,
  `unitId` int(10) unsigned NOT NULL,
  `fromMonth` int(2) DEFAULT NULL,
  `toMonth` int(2) DEFAULT NULL,
  `fromYear` int(4) DEFAULT NULL,
  `toYear` int(4) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FK_PrfAdministrativeAppointment` (`profileId`),
  KEY `FK_PrfAdministrativeAppointmentEmployeetitke` (`employeeTitleId`),
  KEY `FK_PrfAdministrativeAppointment_unitId` (`unitId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `PrfAffiliation`
--

DROP TABLE IF EXISTS `PrfAffiliation`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PrfAffiliation` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `affiliationTypeId` int(10) unsigned NOT NULL,
  `profileId` int(10) unsigned NOT NULL,
  `unitId` int(10) unsigned NOT NULL,
  `titleId` int(10) unsigned DEFAULT NULL,
  `fromMonth` int(2) DEFAULT NULL,
  `fromYear` int(4) DEFAULT NULL,
  `toMonth` int(2) DEFAULT NULL,
  `toYear` int(4) DEFAULT NULL,
  `description` text,
  PRIMARY KEY (`id`),
  UNIQUE KEY `backup_idx` (`id`),
  KEY `profileId` (`profileId`),
  KEY `PrfAffiliation_ibfk_AffiliationId` (`affiliationTypeId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `PrfAppointment`
--

DROP TABLE IF EXISTS `PrfAppointment`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PrfAppointment` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `backupVersion` int(10) NOT NULL,
  `backupPointer` int(10) unsigned NOT NULL,
  `profileId` int(10) unsigned NOT NULL,
  `employeeTitleId` int(10) unsigned DEFAULT NULL,
  `unitId` int(10) unsigned NOT NULL,
  `fromYear` int(4) DEFAULT NULL,
  `fromMonth` int(2) DEFAULT NULL,
  `toYear` int(4) DEFAULT NULL,
  `toMonth` int(2) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `backup_idx` (`id`,`backupPointer`,`backupVersion`),
  KEY `FK_PrfAppointmentemployeeTitle` (`employeeTitleId`),
  KEY `FK_PrfAppointmentProfile` (`profileId`),
  KEY `FK_PrfAppointment_unitId` (`unitId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `PrfAward`
--

DROP TABLE IF EXISTS `PrfAward`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PrfAward` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `profileId` int(10) unsigned NOT NULL,
  `awardId` int(10) unsigned NOT NULL,
  `achievements` text,
  `detailURL` varchar(255) DEFAULT NULL,
  `monthReceived` int(2) DEFAULT NULL,
  `yearReceived` int(4) DEFAULT NULL,
  `monthStarted` int(2) DEFAULT NULL,
  `yearStarted` int(4) DEFAULT NULL,
  `monthEnded` int(2) DEFAULT NULL,
  `yearEnded` int(4) DEFAULT NULL,
  `lastUpdated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `lastIndexed` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `refId` int(10) unsigned DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FK_PrfAward_profileId` (`profileId`),
  KEY `FK_PrfAward_awardId` (`awardId`),
  KEY `IK_lastIndexed` (`lastIndexed`,`lastUpdated`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `PrfBenefit`
--

DROP TABLE IF EXISTS `PrfBenefit`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PrfBenefit` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `profileId` int(10) unsigned NOT NULL,
  `content` longtext NOT NULL,
  `lastUpdated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `lastIndexed` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  PRIMARY KEY (`id`),
  KEY `FK_PrfBiography_profileId` (`profileId`),
  KEY `IK_lastIndexed` (`lastIndexed`,`lastUpdated`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `PrfBiography`
--

DROP TABLE IF EXISTS `PrfBiography`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PrfBiography` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `profileId` int(10) unsigned NOT NULL,
  `content` longtext NOT NULL,
  `lastUpdated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `lastIndexed` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  PRIMARY KEY (`id`),
  KEY `FK_PrfBiography_profileId` (`profileId`),
  KEY `IK_lastIndexed` (`lastIndexed`,`lastUpdated`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `PrfCategory`
--

DROP TABLE IF EXISTS `PrfCategory`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PrfCategory` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `PrfCollaborationType`
--

DROP TABLE IF EXISTS `PrfCollaborationType`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PrfCollaborationType` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(45) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `namr` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COMMENT='	';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `PrfCollaborator`
--

DROP TABLE IF EXISTS `PrfCollaborator`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PrfCollaborator` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `userId` int(10) unsigned DEFAULT NULL,
  `name` varchar(256) NOT NULL,
  `collaborationTypeId` int(10) unsigned NOT NULL,
  `description` text NOT NULL,
  `lastIndexed` timestamp NULL DEFAULT '0000-00-00 00:00:00',
  `lastUpdated` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `profileUrl` varchar(256) DEFAULT NULL,
  `profileId` int(10) unsigned NOT NULL,
  `toYear` int(4) DEFAULT NULL,
  `fromYear` int(4) DEFAULT NULL,
  `toMonth` int(2) DEFAULT NULL,
  `fromMonth` int(2) DEFAULT NULL,
  `unitId` int(10) unsigned DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `date` (`collaborationTypeId`),
  KEY `type` (`collaborationTypeId`),
  KEY `name` (`name`(255)),
  KEY `FK_PrfCollaboration_userId` (`userId`),
  KEY `FK_PrfCollaboration_profileIdd_idx` (`profileId`),
  KEY `FK_PrfCollaborator_unitId` (`unitId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `PrfCourse`
--

DROP TABLE IF EXISTS `PrfCourse`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PrfCourse` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `profileId` int(10) unsigned NOT NULL,
  `courseId` int(10) unsigned NOT NULL,
  `sessionId` int(10) unsigned DEFAULT NULL,
  `year` int(10) unsigned NOT NULL,
  `semesterId` int(10) unsigned NOT NULL,
  `title` text,
  `officeLocationId` int(10) unsigned DEFAULT NULL,
  `officeHours` text,
  `officeHoursByAppt` tinyint(3) unsigned NOT NULL DEFAULT '0',
  `officeEmailId` int(10) unsigned DEFAULT NULL,
  `seats` int(10) unsigned NOT NULL,
  `officePhoneId` int(10) unsigned DEFAULT NULL,
  `description` text,
  `duration` int(10) unsigned DEFAULT NULL COMMENT 'number of week',
  `syllabusId` int(11) DEFAULT NULL,
  `syllabusDateUploaded` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `roleId` int(10) unsigned DEFAULT NULL,
  `lastUpdated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `lastIndexed` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `crossListedId` int(10) unsigned NOT NULL,
  `courseNumberCache` varchar(256) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FK_PrfCourse_profileId` (`profileId`),
  KEY `FK_PrfCourse_sessionId` (`sessionId`),
  KEY `FK_PrfCourse_courseId` (`courseId`),
  KEY `FK_PrfCourse_semesterId` (`semesterId`),
  KEY `FK_PrfCourse_roleId` (`roleId`),
  KEY `IK_lastIndexed` (`lastIndexed`,`lastUpdated`),
  KEY `backup_idx` (`id`),
  KEY `courseNumberCacheIdx` (`courseNumberCache`(255)),
  KEY `crossListedId` (`crossListedId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `PrfCreativeOther`
--

DROP TABLE IF EXISTS `PrfCreativeOther`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PrfCreativeOther` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `profileId` int(10) unsigned NOT NULL,
  `categoryId` int(10) unsigned NOT NULL,
  `title` text NOT NULL,
  `description` text,
  `monthPerformed` int(2) DEFAULT NULL,
  `yearPerformed` int(4) DEFAULT NULL,
  `isRefereed` tinyint(3) unsigned DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FK_PrfCreativeOther_categoryId` (`categoryId`),
  KEY `FK_PrfCreativeOther_profileId` (`profileId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `PrfDescription`
--

DROP TABLE IF EXISTS `PrfDescription`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PrfDescription` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `profileId` int(10) unsigned NOT NULL,
  `content` longtext NOT NULL,
  `lastUpdated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `lastIndexed` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  PRIMARY KEY (`id`),
  KEY `FK_PrfDescription_profileId` (`profileId`),
  KEY `IK_lastIndexed` (`lastIndexed`,`lastUpdated`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `PrfExhibition`
--

DROP TABLE IF EXISTS `PrfExhibition`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PrfExhibition` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `profileId` int(10) unsigned NOT NULL,
  `name` text NOT NULL,
  `description` text NOT NULL COMMENT 'description of live performance',
  `lastUpdated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `lastIndexed` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `monthExhibited` int(2) DEFAULT NULL,
  `yearExhibited` int(4) DEFAULT NULL,
  `isRefereed` tinyint(3) unsigned DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `backup_idx` (`id`),
  KEY `FK_PrfProfile_profileId` (`profileId`),
  KEY `IK_lastIndexed` (`lastIndexed`,`lastUpdated`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `PrfFeature`
--

DROP TABLE IF EXISTS `PrfFeature`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PrfFeature` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `profileId` int(10) unsigned NOT NULL,
  `content` longtext NOT NULL,
  `lastUpdated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `lastIndexed` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  PRIMARY KEY (`id`),
  KEY `FK_PrfBiography_profileId` (`profileId`),
  KEY `IK_lastIndexed` (`lastIndexed`,`lastUpdated`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `PrfIntellectualOther`
--

DROP TABLE IF EXISTS `PrfIntellectualOther`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PrfIntellectualOther` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `profileId` int(10) unsigned NOT NULL,
  `categoryId` int(10) unsigned NOT NULL,
  `title` text NOT NULL,
  `description` text,
  `lastIndexed` timestamp NULL DEFAULT NULL,
  `lastUpdated` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `FK_PrfResearchOther_categoryId` (`categoryId`),
  KEY `FK_PrfResearchOther_profileId` (`profileId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `PrfLink`
--

DROP TABLE IF EXISTS `PrfLink`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PrfLink` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `profileId` int(10) unsigned NOT NULL,
  `name` text,
  `link` text NOT NULL,
  `lastUpdated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `lastIndexed` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  PRIMARY KEY (`id`),
  UNIQUE KEY `backup_idx` (`id`),
  KEY `IK_lastIndexed` (`lastIndexed`,`lastUpdated`),
  KEY `IK_profileId` (`profileId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `PrfLivePerformance`
--

DROP TABLE IF EXISTS `PrfLivePerformance`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PrfLivePerformance` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `profileId` int(10) unsigned NOT NULL,
  `name` text NOT NULL,
  `description` text NOT NULL COMMENT 'description of live performance',
  `lastUpdated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `lastIndexed` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `monthPerformed` int(2) DEFAULT NULL,
  `yearPerformed` int(4) DEFAULT NULL,
  `isRefereed` tinyint(3) unsigned DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `backup_idx` (`id`),
  KEY `FK_PrfProfile_profileId` (`profileId`),
  KEY `IK_lastIndexed` (`lastIndexed`,`lastUpdated`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `PrfMember`
--

DROP TABLE IF EXISTS `PrfMember`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PrfMember` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `profileId` int(10) unsigned NOT NULL,
  `userId` int(10) unsigned DEFAULT NULL,
  `name` text,
  `profileUrl` text,
  `lastIndexed` timestamp NULL DEFAULT NULL,
  `lastUpdated` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `unitId` int(10) unsigned DEFAULT NULL,
  PRIMARY KEY (`id`,`profileId`),
  UNIQUE KEY `unique_PrfMember` (`profileId`,`userId`),
  KEY `FK_PrfMember_userId` (`userId`),
  KEY `FK_PrfMember_unitId` (`unitId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `PrfNewsArticle`
--

DROP TABLE IF EXISTS `PrfNewsArticle`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PrfNewsArticle` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `profileId` int(10) unsigned NOT NULL,
  `urlName` varchar(255) CHARACTER SET utf8 NOT NULL,
  `urlLink` varchar(256) CHARACTER SET utf8 DEFAULT NULL,
  `name` varchar(256) CHARACTER SET utf8 NOT NULL,
  `description` text CHARACTER SET utf8,
  `lastUpdated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `lastIndexed` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `monthPublished` int(2) DEFAULT NULL,
  `yearPublished` int(4) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `backup_idx` (`id`),
  KEY `IK_lastIndexed` (`lastIndexed`,`lastUpdated`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `PrfOther`
--

DROP TABLE IF EXISTS `PrfOther`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PrfOther` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `profileId` int(10) unsigned NOT NULL,
  `categoryId` int(10) unsigned NOT NULL,
  `title` text NOT NULL,
  `description` text,
  `lastUpdated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `lastIndexed` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `monthPerformed` int(2) DEFAULT NULL,
  `yearPerformed` int(4) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FK_PrfOther_profileId` (`profileId`),
  KEY `FK_PrfOther_categoryId` (`categoryId`),
  KEY `IK_lastIndexed` (`lastIndexed`,`lastUpdated`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `PrfOtherCategory`
--

DROP TABLE IF EXISTS `PrfOtherCategory`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PrfOtherCategory` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `suggesterId` int(10) unsigned DEFAULT NULL,
  `isVerified` tinyint(1) NOT NULL DEFAULT '0',
  `typeId` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  KEY `FK_PrfOtherCategory_suggesterId` (`suggesterId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `PrfOtherCategoryType`
--

DROP TABLE IF EXISTS `PrfOtherCategoryType`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PrfOtherCategoryType` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(200) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `PrfOverview`
--

DROP TABLE IF EXISTS `PrfOverview`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PrfOverview` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `profileId` int(10) unsigned NOT NULL,
  `content` longtext NOT NULL,
  `lastUpdated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `lastIndexed` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  PRIMARY KEY (`id`),
  KEY `FK_PrfBiography_profileId` (`profileId`),
  KEY `IK_lastIndexed` (`lastIndexed`,`lastUpdated`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `PrfPatent`
--

DROP TABLE IF EXISTS `PrfPatent`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PrfPatent` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `profileId` int(10) unsigned NOT NULL,
  `patentId` int(10) unsigned NOT NULL,
  `lastUpdated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `lastIndexed` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  PRIMARY KEY (`id`),
  UNIQUE KEY `unq_PrfPatent` (`profileId`,`patentId`),
  KEY `FK_PrfPatent_patentId` (`patentId`),
  KEY `IK_lastIndexed` (`lastIndexed`,`lastUpdated`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `PrfPeerMentored`
--

DROP TABLE IF EXISTS `PrfPeerMentored`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PrfPeerMentored` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `profileId` int(10) unsigned NOT NULL,
  `userId` int(10) unsigned DEFAULT NULL,
  `name` text,
  `profileUrl` text,
  `lastIndexed` timestamp NULL DEFAULT NULL,
  `lastUpdated` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `description` text,
  `fromMonth` int(2) unsigned DEFAULT NULL,
  `fromYear` int(4) unsigned DEFAULT NULL,
  `toMonth` int(2) unsigned DEFAULT NULL,
  `toYear` int(4) unsigned DEFAULT NULL,
  `unitId` int(10) unsigned DEFAULT NULL,
  PRIMARY KEY (`id`,`profileId`),
  UNIQUE KEY `unique_PrfPeerMentored` (`profileId`,`userId`),
  KEY `FK_PrfPeerMentored_userId` (`userId`),
  KEY `FK_PrfPeerMentored_unitId` (`unitId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `PrfPresentation`
--

DROP TABLE IF EXISTS `PrfPresentation`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PrfPresentation` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `profileId` int(10) unsigned NOT NULL,
  `presentationId` int(10) unsigned NOT NULL,
  `lastUpdated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `lastIndexed` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `refId` int(10) unsigned DEFAULT NULL,
  `coAuthorIds` text,
  PRIMARY KEY (`id`),
  UNIQUE KEY `backup_idx` (`id`),
  KEY `profileId` (`profileId`),
  KEY `PrfPresentation_fk_Presentation` (`presentationId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `PrfPresentationEvent`
--

DROP TABLE IF EXISTS `PrfPresentationEvent`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PrfPresentationEvent` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `prfPresentationId` int(10) unsigned NOT NULL,
  `eventOccurenceId` int(10) unsigned NOT NULL,
  `datePresented` datetime DEFAULT NULL,
  `monthPresented` int(2) DEFAULT NULL,
  `yearPresented` int(4) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `PrfPresentationEvent_fk_PrfPresentation` (`prfPresentationId`),
  KEY `PrfPresentationEvent_fk_EventOccurence` (`eventOccurenceId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `PrfProblem`
--

DROP TABLE IF EXISTS `PrfProblem`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PrfProblem` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `profileId` int(10) unsigned NOT NULL,
  `content` longtext NOT NULL,
  `lastUpdated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `lastIndexed` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  PRIMARY KEY (`id`),
  KEY `FK_PrfProblem_profileId` (`profileId`),
  KEY `IK_lastIndexed` (`lastIndexed`,`lastUpdated`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `PrfProfessionalPreparation`
--

DROP TABLE IF EXISTS `PrfProfessionalPreparation`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PrfProfessionalPreparation` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `profileId` int(10) unsigned NOT NULL,
  `degreeCategoryId` int(10) unsigned DEFAULT NULL,
  `majorId` int(10) unsigned DEFAULT NULL,
  `minorId` int(10) unsigned DEFAULT NULL,
  `year` int(10) unsigned DEFAULT NULL,
  `unitId` int(10) unsigned DEFAULT NULL,
  `lastUpdated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `lastIndexed` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  PRIMARY KEY (`id`),
  UNIQUE KEY `backup_idx` (`id`),
  KEY `degreeType` (`degreeCategoryId`),
  KEY `profileId` (`profileId`),
  KEY `FK_PrfProfessionalPreparationmajor` (`majorId`),
  KEY `IK_lastIndexed` (`lastIndexed`,`lastUpdated`),
  KEY `FK_PrfProfessionalPreparation_unitId` (`unitId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `PrfProfessionalPreparationUnit`
--

DROP TABLE IF EXISTS `PrfProfessionalPreparationUnit`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PrfProfessionalPreparationUnit` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `professionalPreparationId` int(10) unsigned NOT NULL,
  `unitId` int(10) unsigned NOT NULL,
  `priority` int(10) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `unique_PrfProfessionalPreparation` (`professionalPreparationId`,`unitId`),
  KEY `FK_PrfProfessionalPreparation_unitId` (`unitId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `PrfProfile`
--

DROP TABLE IF EXISTS `PrfProfile`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PrfProfile` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `profileTypeId` int(10) unsigned NOT NULL,
  `objectId` int(11) DEFAULT NULL COMMENT 'The object associate with this profile. e.g. center id, facility id, or user id',
  `alias` varchar(100) DEFAULT NULL,
  `keywords` text,
  `isViewable` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `isSetupDone` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `dateCreated` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `lastUpdated` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  `lastIndexed` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `isManualDataTransferRequested` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `name` varchar(255) DEFAULT NULL,
  `isVisible` tinyint(1) unsigned NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`),
  UNIQUE KEY `backup_idx` (`id`),
  KEY `FK_PrfProfile_profileTypeId` (`profileTypeId`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `PrfProfileCategory`
--

DROP TABLE IF EXISTS `PrfProfileCategory`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PrfProfileCategory` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `profileId` int(10) unsigned NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  `position` int(10) unsigned DEFAULT '0',
  `isVisible` tinyint(1) DEFAULT '1',
  `profileTypeCategoryId` int(10) unsigned DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `backup_idx` (`id`),
  KEY `FK_PrfProfileCategory_profileId` (`profileId`),
  KEY `FK_PrfProfileTypeCategory_profileTypeCategoryId` (`profileTypeCategoryId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `PrfProfileExport`
--

DROP TABLE IF EXISTS `PrfProfileExport`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PrfProfileExport` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `profileId` int(10) unsigned NOT NULL,
  `name` varchar(255) NOT NULL,
  `type` varchar(100) NOT NULL,
  `exportData` text NOT NULL,
  PRIMARY KEY (`id`),
  KEY `FK_PrfProfileExport_profileId` (`profileId`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `PrfProfileSection`
--

DROP TABLE IF EXISTS `PrfProfileSection`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PrfProfileSection` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `profileId` int(10) unsigned NOT NULL,
  `profileTypeCategorySectionId` int(10) unsigned NOT NULL,
  `position` int(10) unsigned DEFAULT NULL,
  `isVisible` tinyint(3) unsigned NOT NULL DEFAULT '0',
  `name` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `profileId` (`profileId`,`profileTypeCategorySectionId`),
  UNIQUE KEY `backup_idx` (`id`),
  KEY `FK_PrfProfileSection_profileTypeCategorySectionId` (`profileTypeCategorySectionId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `PrfProfileType`
--

DROP TABLE IF EXISTS `PrfProfileType`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PrfProfileType` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(200) NOT NULL,
  `normalizedName` varchar(100) DEFAULT NULL,
  `description` text,
  `isApprovalRequired` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `backup_idx` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `PrfProfileTypeCategory`
--

DROP TABLE IF EXISTS `PrfProfileTypeCategory`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PrfProfileTypeCategory` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `profileTypeId` int(10) unsigned NOT NULL,
  `categoryId` int(10) unsigned NOT NULL,
  `name` text,
  `isNameChangeable` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `isMovable` tinyint(3) unsigned NOT NULL DEFAULT '0',
  `isHideable` tinyint(3) unsigned NOT NULL DEFAULT '0',
  `position` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id`,`categoryId`),
  UNIQUE KEY `unique_PrfProfileTypeCategory` (`profileTypeId`,`categoryId`),
  KEY `FK_PrfProfileTypeCategory_categoryId` (`categoryId`)
) ENGINE=InnoDB AUTO_INCREMENT=39 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `PrfProfileTypeCategorySection`
--

DROP TABLE IF EXISTS `PrfProfileTypeCategorySection`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PrfProfileTypeCategorySection` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `profileTypeCategoryId` int(10) unsigned NOT NULL,
  `sectionId` int(10) unsigned NOT NULL,
  `isHideable` tinyint(3) unsigned NOT NULL DEFAULT '0',
  `isMovable` tinyint(3) unsigned NOT NULL DEFAULT '0',
  `position` int(10) unsigned NOT NULL,
  `isNameChangeable` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `name` varchar(255) DEFAULT NULL,
  `isCreationAllowed` tinyint(3) unsigned NOT NULL DEFAULT '1',
  `isSelfLinkAllowed` tinyint(3) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `unique_PrfProfileTypeCategorySection` (`profileTypeCategoryId`,`sectionId`),
  KEY `FK_PrfProfileTypeCategorySection_sectionId` (`sectionId`)
) ENGINE=InnoDB AUTO_INCREMENT=154 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `PrfProfileUserRole`
--

DROP TABLE IF EXISTS `PrfProfileUserRole`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PrfProfileUserRole` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `profileId` int(10) unsigned NOT NULL,
  `userId` int(10) unsigned NOT NULL,
  `roleId` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `unique_PrfProfileUserRole` (`profileId`,`userId`,`roleId`),
  UNIQUE KEY `backup_idx` (`id`),
  KEY `FK_PrfProfileUserRole_roleId` (`roleId`),
  KEY `FK_PrfProfileUserRole_userId` (`userId`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `PrfProfileUserRolePrivilege`
--

DROP TABLE IF EXISTS `PrfProfileUserRolePrivilege`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PrfProfileUserRolePrivilege` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `profileUserRoleId` int(10) unsigned NOT NULL,
  `privilegeId` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `UQ_PrfProfileUserRolePrivilege` (`profileUserRoleId`,`privilegeId`),
  UNIQUE KEY `backup_idx` (`id`),
  KEY `FK_ProfileUserRolePrivilege_privilegeId` (`privilegeId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `PrfProfileUserRoleSectionPrivilege`
--

DROP TABLE IF EXISTS `PrfProfileUserRoleSectionPrivilege`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PrfProfileUserRoleSectionPrivilege` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `profileUserRoleId` int(10) unsigned NOT NULL,
  `profileSectionId` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `UQ_PrfProfileUserRoleSectionPrivilege` (`profileUserRoleId`,`profileSectionId`),
  UNIQUE KEY `backup_idx` (`id`),
  KEY `FK_ProfileUserRoleSectionPrivilege_profileSectionId` (`profileSectionId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `PrfProject`
--

DROP TABLE IF EXISTS `PrfProject`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PrfProject` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `profileId` int(10) unsigned NOT NULL,
  `name` varchar(256) NOT NULL,
  `description` text,
  `lastUpdated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `lastIndexed` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `fromMonth` int(2) DEFAULT NULL,
  `toMonth` int(2) DEFAULT NULL,
  `fromYear` int(4) DEFAULT NULL,
  `toYear` int(4) DEFAULT NULL,
  `roleId` int(10) unsigned DEFAULT NULL,
  `principalInvestigator` varchar(255) DEFAULT NULL,
  `collaboratorIds` text,
  PRIMARY KEY (`id`),
  UNIQUE KEY `backup_idx` (`id`),
  KEY `profileId` (`profileId`),
  KEY `IK_lastIndexed` (`lastIndexed`,`lastUpdated`),
  KEY `FK_PrfProject_roleId` (`roleId`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `PrfProjectRole`
--

DROP TABLE IF EXISTS `PrfProjectRole`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PrfProjectRole` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `PrfPublication`
--

DROP TABLE IF EXISTS `PrfPublication`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PrfPublication` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `profileId` int(10) unsigned NOT NULL,
  `citation` text NOT NULL,
  `publicationTypeId` int(10) unsigned NOT NULL,
  `publicationSecondaryTypeId` int(10) unsigned DEFAULT NULL,
  `isRefereed` tinyint(3) unsigned NOT NULL,
  `publicationStatusId` int(10) unsigned NOT NULL,
  `refId` int(10) unsigned DEFAULT NULL,
  `lastUpdated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `lastIndexed` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `yearPublished` int(4) unsigned DEFAULT NULL,
  `keywords` text,
  `coAuthorIds` text,
  PRIMARY KEY (`id`),
  UNIQUE KEY `backup_idx` (`id`),
  KEY `profileId` (`profileId`),
  KEY `FK_PrfPublication_publicationTypeId` (`publicationTypeId`),
  KEY `FK_PrfPublication_publicationStatudId` (`publicationStatusId`),
  KEY `FK_PrfPublication_refId` (`refId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `PrfRecording`
--

DROP TABLE IF EXISTS `PrfRecording`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PrfRecording` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `profileId` int(10) unsigned NOT NULL,
  `name` text NOT NULL,
  `description` text NOT NULL COMMENT 'description of live performance',
  `lastUpdated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `lastIndexed` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `monthRecorded` int(2) DEFAULT NULL,
  `yearRecorded` int(4) DEFAULT NULL,
  `isRefereed` tinyint(3) unsigned DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `backup_idx` (`id`),
  KEY `FK_PrfProfile_profileId` (`profileId`),
  KEY `IK_lastIndexed` (`lastIndexed`,`lastUpdated`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `PrfResearch`
--

DROP TABLE IF EXISTS `PrfResearch`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PrfResearch` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `profileId` int(10) unsigned NOT NULL,
  `name` text NOT NULL,
  `description` text NOT NULL COMMENT 'interest/topic for research',
  `lastUpdated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `lastIndexed` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `expertiseLevelId` int(10) unsigned NOT NULL,
  `researchTypeId` int(10) unsigned NOT NULL,
  `keywords` text,
  `collaboratorIds` text,
  PRIMARY KEY (`id`),
  UNIQUE KEY `backup_idx` (`id`),
  KEY `FK_PrfProfile_profileId` (`profileId`),
  KEY `IK_lastIndexed` (`lastIndexed`,`lastUpdated`),
  KEY `FK_PrfResearch_expertiseLevelId` (`expertiseLevelId`),
  KEY `FK_PrfResearch_researchTypeId` (`researchTypeId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `PrfResearchOther`
--

DROP TABLE IF EXISTS `PrfResearchOther`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PrfResearchOther` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `profileId` int(10) unsigned NOT NULL,
  `categoryId` int(10) unsigned NOT NULL,
  `title` text NOT NULL,
  `description` text,
  `monthPerformed` int(2) DEFAULT NULL,
  `yearPerformed` int(4) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FK_PrfResearchOther_categoryId` (`categoryId`),
  KEY `FK_PrfResearchOther_profileId` (`profileId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `PrfRole`
--

DROP TABLE IF EXISTS `PrfRole`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PrfRole` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(200) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `backup_idx` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `PrfSection`
--

DROP TABLE IF EXISTS `PrfSection`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PrfSection` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `entity` varchar(100) NOT NULL,
  `name` varchar(255) NOT NULL,
  `description` text NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `backup_idx` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=50 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `PrfSectionEntity`
--

DROP TABLE IF EXISTS `PrfSectionEntity`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PrfSectionEntity` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `entityClassName` varchar(100) NOT NULL,
  `entityId` int(10) unsigned NOT NULL,
  `tags` text,
  `isVisible` tinyint(1) NOT NULL DEFAULT '1',
  `position` int(10) unsigned NOT NULL,
  `dateCreated` timestamp NULL DEFAULT NULL,
  `dateLastEdited` timestamp NULL DEFAULT NULL,
  `creatorId` int(10) unsigned DEFAULT NULL,
  `editorId` int(10) unsigned DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `backup_idx` (`id`),
  KEY `entityIdx` (`entityClassName`,`entityId`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `PrfSectionEntityProfile`
--

DROP TABLE IF EXISTS `PrfSectionEntityProfile`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PrfSectionEntityProfile` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `entityId` int(10) unsigned NOT NULL,
  `profileId` int(10) unsigned NOT NULL,
  `className` varchar(255) NOT NULL,
  PRIMARY KEY (`id`,`profileId`),
  KEY `idx_className` (`entityId`,`profileId`,`className`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `PrfService`
--

DROP TABLE IF EXISTS `PrfService`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PrfService` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `serviceTypeId` int(10) unsigned NOT NULL,
  `profileId` int(10) unsigned NOT NULL,
  `name` text NOT NULL,
  `description` text NOT NULL,
  `fromDate` datetime DEFAULT NULL,
  `toDate` datetime DEFAULT NULL,
  `lastUpdated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `lastIndexed` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  PRIMARY KEY (`id`),
  KEY `FK_PrfProfile_profileId` (`profileId`),
  KEY `IK_lastIndexed` (`lastIndexed`,`lastUpdated`),
  KEY `FK_ServiceType_Id` (`serviceTypeId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `PrfServiceCommunity`
--

DROP TABLE IF EXISTS `PrfServiceCommunity`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PrfServiceCommunity` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `profileId` int(10) unsigned NOT NULL,
  `name` text NOT NULL,
  `description` text NOT NULL,
  `serviceInitiativeTypeId` int(10) unsigned NOT NULL,
  `lastUpdated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `lastIndexed` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `fromMonth` int(2) DEFAULT NULL,
  `toMonth` int(2) DEFAULT NULL,
  `fromYear` int(4) DEFAULT NULL,
  `toYear` int(4) DEFAULT NULL,
  `projectTypeId` int(10) unsigned DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FK_PrfProfile_profileId` (`profileId`),
  KEY `FK_PrfServiceCommunity_serviceInitiativeTypeId` (`serviceInitiativeTypeId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `PrfServiceOther`
--

DROP TABLE IF EXISTS `PrfServiceOther`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PrfServiceOther` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `profileId` int(10) unsigned NOT NULL,
  `categoryId` int(10) unsigned NOT NULL,
  `title` text NOT NULL,
  `description` text,
  `monthPerformed` int(2) DEFAULT NULL,
  `yearPerformed` int(4) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FK_PrfServiceOther_categoryId` (`categoryId`),
  KEY `FK_PrfServiceOther_profileId` (`profileId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `PrfServiceProfession`
--

DROP TABLE IF EXISTS `PrfServiceProfession`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PrfServiceProfession` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `profileId` int(10) unsigned NOT NULL,
  `name` text NOT NULL,
  `description` text NOT NULL,
  `serviceInitiativeTypeId` int(10) unsigned NOT NULL,
  `lastUpdated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `lastIndexed` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `fromMonth` int(2) DEFAULT NULL,
  `toMonth` int(4) DEFAULT NULL,
  `fromYear` int(2) DEFAULT NULL,
  `toYear` int(4) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FK_PrfServiceProfession` (`profileId`),
  KEY `FK_PrfServiceProfession_serviceInitiativeTypeId` (`serviceInitiativeTypeId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `PrfServiceUniversity`
--

DROP TABLE IF EXISTS `PrfServiceUniversity`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PrfServiceUniversity` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `profileId` int(10) unsigned NOT NULL,
  `name` text NOT NULL,
  `description` text NOT NULL,
  `serviceInitiativeTypeId` int(10) unsigned NOT NULL,
  `lastUpdated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `lastIndexed` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `fromMonth` int(2) DEFAULT NULL,
  `toMonth` int(4) DEFAULT NULL,
  `fromYear` int(2) DEFAULT NULL,
  `toYear` int(4) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FK_PrfServiceUniversity` (`profileId`),
  KEY `FK_PrfServiceUniversity_serviceInitiativeTypeId` (`serviceInitiativeTypeId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `PrfSocialProfile`
--

DROP TABLE IF EXISTS `PrfSocialProfile`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PrfSocialProfile` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `profileId` int(10) unsigned NOT NULL,
  `socialNetworkId` int(10) unsigned NOT NULL,
  `alias` varchar(256) NOT NULL,
  `data` text,
  PRIMARY KEY (`id`),
  UNIQUE KEY `backup_idx` (`id`),
  KEY `profileId` (`profileId`),
  KEY `socialNetworkId` (`socialNetworkId`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `PrfSolution`
--

DROP TABLE IF EXISTS `PrfSolution`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PrfSolution` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `profileId` int(10) unsigned NOT NULL,
  `content` longtext NOT NULL,
  `lastUpdated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `lastIndexed` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  PRIMARY KEY (`id`),
  KEY `FK_PrfBiography_profileId` (`profileId`),
  KEY `IK_lastIndexed` (`lastIndexed`,`lastUpdated`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `PrfStudentCategory`
--

DROP TABLE IF EXISTS `PrfStudentCategory`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PrfStudentCategory` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(45) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8 COMMENT='    ';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `PrfStudentSupervised`
--

DROP TABLE IF EXISTS `PrfStudentSupervised`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PrfStudentSupervised` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `profileId` int(10) unsigned NOT NULL,
  `userId` int(10) unsigned DEFAULT NULL,
  `name` text,
  `profileUrl` text,
  `lastIndexed` timestamp NULL DEFAULT NULL,
  `lastUpdated` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `description` text,
  `studentCategoryId` int(10) unsigned DEFAULT NULL,
  `toYear` int(4) DEFAULT NULL,
  `toMonth` int(2) DEFAULT NULL,
  `unitId` int(10) unsigned DEFAULT NULL,
  `fromYear` int(4) DEFAULT NULL,
  `fromMonth` int(2) DEFAULT NULL,
  PRIMARY KEY (`id`,`profileId`),
  UNIQUE KEY `unique_PrfStudentSupervised` (`profileId`,`userId`),
  KEY `FK_PrfStudentSupervised_userId` (`userId`),
  KEY `FK_PrfStudentSupervised_studentCategory` (`studentCategoryId`),
  KEY `FK_PrfStudentSupervised_unitId` (`unitId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `PrfSupport`
--

DROP TABLE IF EXISTS `PrfSupport`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PrfSupport` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `profileId` int(10) unsigned NOT NULL,
  `title` varchar(256) NOT NULL,
  `amount` double unsigned NOT NULL,
  `fromMonth` int(2) DEFAULT NULL,
  `toMonth` int(2) DEFAULT NULL,
  `fromYear` int(4) DEFAULT NULL,
  `toYear` int(4) DEFAULT NULL,
  `sponsorId` int(10) unsigned DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `backup_idx` (`id`),
  KEY `FK_PrfSupport_Profile` (`profileId`),
  KEY `FK_PrfSupport_sponsorId` (`sponsorId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `PrfTeachingOther`
--

DROP TABLE IF EXISTS `PrfTeachingOther`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PrfTeachingOther` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `profileId` int(10) unsigned NOT NULL,
  `categoryId` int(10) unsigned NOT NULL,
  `title` text NOT NULL,
  `description` text,
  `monthPerformed` int(2) DEFAULT NULL,
  `yearPerformed` int(4) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FK_PrfTeachingOther_categoryId` (`categoryId`),
  KEY `FK_PrfTeachingOther_profileId` (`profileId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `PrfUnitHead`
--

DROP TABLE IF EXISTS `PrfUnitHead`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PrfUnitHead` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `unitId` int(10) unsigned NOT NULL,
  `userId` int(10) unsigned DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `unique_PrfUnitHead` (`unitId`),
  KEY `fk_PrfUnitHead_userId` (`userId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `Privilege`
--

DROP TABLE IF EXISTS `Privilege`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Privilege` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Primary key.',
  `name` varchar(255) NOT NULL COMMENT 'Specifies the privilege.',
  `description` text,
  `position` int(10) unsigned DEFAULT NULL,
  `applicationId` int(10) unsigned DEFAULT NULL,
  `scope` varchar(45) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `fkap_idx` (`applicationId`),
  KEY `scope` (`scope`)
) ENGINE=InnoDB AUTO_INCREMENT=32 DEFAULT CHARSET=utf8 COMMENT='Stores the previleges that can alloted to the roles.';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `PublicationStatus`
--

DROP TABLE IF EXISTS `PublicationStatus`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PublicationStatus` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Primary key.',
  `name` varchar(255) NOT NULL COMMENT 'Specifies status name.',
  `isVerified` tinyint(1) unsigned DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8 COMMENT='Stores the status that can be assigned to the publication.';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `PublicationType`
--

DROP TABLE IF EXISTS `PublicationType`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PublicationType` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Primary key.',
  `name` varchar(255) NOT NULL COMMENT 'Specifies the type name for the publications.',
  `priority` int(10) unsigned NOT NULL DEFAULT '0',
  `isVerified` tinyint(1) unsigned DEFAULT '0',
  `suggesterId` int(10) unsigned DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FK_PubType_suggesterId` (`suggesterId`)
) ENGINE=InnoDB AUTO_INCREMENT=44 DEFAULT CHARSET=utf8 COMMENT='Stores all the types of publication.';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ReportTag`
--

DROP TABLE IF EXISTS `ReportTag`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ReportTag` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(100) NOT NULL,
  `isPrestigious` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `unique_ReportTag` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ReportTagMapping`
--

DROP TABLE IF EXISTS `ReportTagMapping`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ReportTagMapping` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `awardId` int(10) unsigned NOT NULL,
  `reportTagId` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `unique_ReportTagMapping` (`awardId`,`reportTagId`),
  KEY `FK_ReportTagMapping_awardId` (`awardId`),
  KEY `FK_ReportTagMapping_reportTagId` (`reportTagId`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ResearchType`
--

DROP TABLE IF EXISTS `ResearchType`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ResearchType` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `priority` int(10) unsigned NOT NULL,
  `isVerified` tinyint(1) unsigned DEFAULT '0',
  `suggesterId` int(10) unsigned DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FK_researchType_suggesterId` (`suggesterId`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `Role`
--

DROP TABLE IF EXISTS `Role`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Role` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Primary key.',
  `role` varchar(45) NOT NULL COMMENT 'Specifies the roles that can be assigned to the user',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2604 DEFAULT CHARSET=latin1 COMMENT='Stores the various user roles.';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `RptReport`
--

DROP TABLE IF EXISTS `RptReport`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `RptReport` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(100) NOT NULL,
  `title` varchar(100) NOT NULL,
  `level` tinyint(10) unsigned DEFAULT '1',
  `shortDescription` varchar(100) DEFAULT NULL,
  `longDescription` varchar(255) DEFAULT NULL,
  `appId` int(10) unsigned DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `unique_RptReport` (`name`,`appId`),
  KEY `FK_RptReport_appId` (`appId`)
) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `RptReportWidgetMapping`
--

DROP TABLE IF EXISTS `RptReportWidgetMapping`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `RptReportWidgetMapping` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `reportId` int(10) unsigned NOT NULL,
  `widgetId` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `UNIQUE_RptReportWidgetMapping` (`reportId`,`widgetId`),
  KEY `FK_RptReportWidgetMapping_reportId` (`reportId`),
  KEY `FK_RptReportWidgetMapping_widgetId` (`widgetId`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `RptWidget`
--

DROP TABLE IF EXISTS `RptWidget`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `RptWidget` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(100) NOT NULL,
  `shortDescription` varchar(100) DEFAULT NULL,
  `longDescription` varchar(255) DEFAULT NULL,
  `appId` int(10) unsigned DEFAULT NULL,
  `position` int(10) unsigned DEFAULT NULL,
  `title` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `unique_Widget` (`name`,`appId`),
  KEY `FK_RptWidget_appId` (`appId`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `Scope`
--

DROP TABLE IF EXISTS `Scope`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Scope` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `Semester`
--

DROP TABLE IF EXISTS `Semester`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Semester` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(100) NOT NULL,
  `abbr` varchar(100) NOT NULL COMMENT 'abbreviation from LDAP',
  PRIMARY KEY (`id`),
  UNIQUE KEY `abbr` (`abbr`)
) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `SemesterSession`
--

DROP TABLE IF EXISTS `SemesterSession`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `SemesterSession` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` text NOT NULL,
  `isVerified` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `isDefault` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `abbr` varchar(100) NOT NULL COMMENT 'ldap semester mapping',
  PRIMARY KEY (`id`),
  UNIQUE KEY `abbr` (`abbr`)
) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ServiceInitiativeType`
--

DROP TABLE IF EXISTS `ServiceInitiativeType`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ServiceInitiativeType` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `isVerified` tinyint(1) unsigned DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ServiceType`
--

DROP TABLE IF EXISTS `ServiceType`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ServiceType` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `isVerified` tinyint(1) unsigned DEFAULT '0',
  `suggesterId` int(10) unsigned DEFAULT NULL COMMENT 'If created, then the ID of that person',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `Session`
--

DROP TABLE IF EXISTS `Session`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Session` (
  `id` varchar(32) NOT NULL,
  `modified` int(11) DEFAULT NULL,
  `lifetime` int(11) DEFAULT NULL,
  `data` text,
  `userId` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `SocialNetwork`
--

DROP TABLE IF EXISTS `SocialNetwork`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `SocialNetwork` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(64) NOT NULL,
  `iconClass` varchar(256) DEFAULT NULL,
  `baseUrl` varchar(256) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `State`
--

DROP TABLE IF EXISTS `State`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `State` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL COMMENT 'Name of the state',
  `abbr` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=57 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `Subject`
--

DROP TABLE IF EXISTS `Subject`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Subject` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `abbr` varchar(10) NOT NULL,
  `name` text NOT NULL,
  `isVerified` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `unitId` int(10) unsigned DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `unique_Subject` (`abbr`),
  KEY `fk_Subjects_UnitId` (`unitId`)
) ENGINE=InnoDB AUTO_INCREMENT=273 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `SystemLog`
--

DROP TABLE IF EXISTS `SystemLog`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `SystemLog` (
  `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `priority` int(11) NOT NULL,
  `priorityName` varchar(50) DEFAULT NULL,
  `message` text NOT NULL,
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'sorry but i need this to keep track of the order things index. single-second resolution isn''t enough',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=354708 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `Technology`
--

DROP TABLE IF EXISTS `Technology`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Technology` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `status` tinyint(1) DEFAULT NULL,
  `usPtoNumber` text,
  `email` text,
  `phoneNumber` text,
  `extension` text,
  `contactPersonId` int(10) unsigned DEFAULT NULL,
  `isVerified` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `fkContactPerson` (`contactPersonId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `Term`
--

DROP TABLE IF EXISTS `Term`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Term` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(100) NOT NULL,
  `code` varchar(100) NOT NULL,
  `yearSemesterId` int(10) unsigned NOT NULL,
  `isVerified` tinyint(1) unsigned NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`),
  UNIQUE KEY `code` (`code`),
  KEY `FK_Term_yearSemesterId` (`yearSemesterId`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `Todo`
--

DROP TABLE IF EXISTS `Todo`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Todo` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `itemId` int(10) unsigned DEFAULT NULL,
  `appId` int(10) unsigned NOT NULL,
  `userId` int(10) unsigned DEFAULT NULL,
  `roleId` int(10) unsigned DEFAULT NULL,
  `dueDate` datetime DEFAULT NULL,
  `dateCreated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `title` text NOT NULL,
  `description` text,
  `actionUrl` text,
  `extra` longtext,
  `todoTypeId` int(10) unsigned DEFAULT NULL,
  `isManual` tinyint(1) DEFAULT '0',
  `isDone` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FK_Todo_appId` (`appId`),
  KEY `Fk_Todo_roleId` (`roleId`),
  KEY `FK_Todo_userId` (`userId`),
  KEY `Idx_Todo_itemId` (`itemId`),
  KEY `FK_Todo_todoTypeId` (`todoTypeId`)
) ENGINE=InnoDB AUTO_INCREMENT=259663 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `TodoType`
--

DROP TABLE IF EXISTS `TodoType`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `TodoType` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `description` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2602 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `Unit`
--

DROP TABLE IF EXISTS `Unit`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Unit` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Primary key',
  `unit` varchar(255) NOT NULL COMMENT 'Specifies the Unit Name.',
  `acronyms` varchar(20) DEFAULT NULL,
  `parentId` int(10) unsigned DEFAULT '0' COMMENT 'Connects the Unit to its parent Unit.',
  `isActive` tinyint(1) DEFAULT '1',
  `isExternal` tinyint(1) unsigned NOT NULL DEFAULT '1',
  `isVerified` tinyint(1) unsigned DEFAULT '0',
  `hits` int(10) unsigned NOT NULL DEFAULT '0',
  `suggesterId` int(10) unsigned DEFAULT NULL,
  `primaryContactId` int(10) unsigned DEFAULT NULL,
  `primaryContactName` varchar(255) DEFAULT NULL,
  `email` varchar(100) DEFAULT NULL,
  `phone` varchar(50) DEFAULT NULL,
  `avatarFileName` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FK_Unit_suggesterId` (`suggesterId`)
) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=utf8 COMMENT='Stores the information about the Unit.';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `UnitTag`
--

DROP TABLE IF EXISTS `UnitTag`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `UnitTag` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `unitId` int(10) unsigned NOT NULL,
  `unitTypeId` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  KEY `FK_UnitTag_unitId` (`unitId`),
  KEY `FK_UnitTag_unitTypeId` (`unitTypeId`)
) ENGINE=InnoDB AUTO_INCREMENT=28 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `UnitType`
--

DROP TABLE IF EXISTS `UnitType`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `UnitType` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(100) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `User`
--

DROP TABLE IF EXISTS `User`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `User` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `ouserid` varchar(255) NOT NULL COMMENT 'University User Id',
  `ldapId` bigint(20) unsigned DEFAULT NULL,
  `displayFirstName` varchar(255) DEFAULT NULL,
  `displayMiddleName` varchar(255) DEFAULT NULL,
  `displayLastName` varchar(255) DEFAULT NULL,
  `firstName` varchar(255) NOT NULL,
  `middleName` varchar(255) DEFAULT NULL,
  `lastName` varchar(255) NOT NULL,
  `prefix` varchar(255) DEFAULT NULL,
  `suffix` varchar(255) DEFAULT NULL,
  `status` enum('Active','Inactive','Retired','OnLeave','Other') NOT NULL,
  `lastUpdated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `imageId` int(10) unsigned DEFAULT NULL,
  `gender` enum('Male','Female','Other') DEFAULT NULL,
  `notificationPreferenceId` int(10) unsigned NOT NULL DEFAULT '1',
  `avatarFileName` varchar(255) DEFAULT '0',
  `employmentPercentTime` double DEFAULT NULL,
  `employeeType` enum('hourly','monthly') DEFAULT NULL,
  `expectedGraduation` varchar(50) DEFAULT NULL,
  `isSetupDone` tinyint(3) unsigned NOT NULL DEFAULT '1',
  `badgeCache` longtext,
  PRIMARY KEY (`id`),
  UNIQUE KEY `ouserid` (`ouserid`),
  UNIQUE KEY `cedarid` (`ldapId`),
  KEY `notificationPreferenceId` (`notificationPreferenceId`)
) ENGINE=InnoDB AUTO_INCREMENT=1000000009 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `UserActivityLog`
--

DROP TABLE IF EXISTS `UserActivityLog`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `UserActivityLog` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `userId` int(10) DEFAULT NULL,
  `impersonateAs` int(10) DEFAULT NULL,
  `ipv4` int(10) unsigned DEFAULT NULL,
  `ipv6` binary(16) DEFAULT NULL,
  `activityType` enum('login','logout','impersonate','switchback') DEFAULT NULL,
  `activityTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `extras` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=646 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `UserEid`
--

DROP TABLE IF EXISTS `UserEid`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `UserEid` (
  `userId` int(10) unsigned NOT NULL,
  `eid` varchar(50) NOT NULL,
  PRIMARY KEY (`userId`,`eid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `UserEmployeeTitle`
--

DROP TABLE IF EXISTS `UserEmployeeTitle`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `UserEmployeeTitle` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Primary key.',
  `userId` int(10) unsigned NOT NULL COMMENT 'Connects the UserEmployeeTitle with the User table.',
  `unitId` int(10) unsigned DEFAULT NULL COMMENT 'Connects the UserEmployeeTitle with the Unit table.',
  `employeeTitleId` int(10) unsigned NOT NULL COMMENT 'Connects the UserEmployeeTitle with the EmployeeTitle table.',
  `isPrimary` tinyint(1) NOT NULL DEFAULT '1' COMMENT 'Specifies which one is the primary employee title.',
  `isVisible` tinyint(1) unsigned NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`),
  UNIQUE KEY `unique_UserEmployeeTitle` (`userId`,`unitId`,`employeeTitleId`),
  KEY `fk_UserEmployeeTitle_employeeTitleId` (`employeeTitleId`),
  KEY `fk_UserEmployeeTitle_userId` (`userId`),
  KEY `fk_UserEmployeeTitle_unitId` (`unitId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Connects the User to his/her Employee title and the unit aff';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `UserFavoriteApplication`
--

DROP TABLE IF EXISTS `UserFavoriteApplication`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `UserFavoriteApplication` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `userId` int(10) unsigned NOT NULL,
  `applicationId` int(11) unsigned NOT NULL,
  `priority` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `unique_UserFavoriteApplication` (`applicationId`,`userId`),
  KEY `FK_UserFavoriteApplication_userId` (`userId`),
  KEY `FK_UserFavoriteApplication_applicationId` (`applicationId`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `UserLoginFailedAttempts`
--

DROP TABLE IF EXISTS `UserLoginFailedAttempts`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `UserLoginFailedAttempts` (
  `accountName` varchar(255) NOT NULL,
  `totalLoginFailures` int(11) DEFAULT NULL,
  PRIMARY KEY (`accountName`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `UserTitle`
--

DROP TABLE IF EXISTS `UserTitle`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `UserTitle` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `userId` int(10) unsigned NOT NULL,
  `employeeTitleId` int(10) unsigned NOT NULL,
  `isVisible` tinyint(3) unsigned NOT NULL DEFAULT '1',
  `isPrimary` tinyint(3) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `FK_UserTitle_userId` (`userId`),
  KEY `FK_UserTitle_employeeTitleId` (`employeeTitleId`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `UserTitleUnit`
--

DROP TABLE IF EXISTS `UserTitleUnit`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `UserTitleUnit` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `unitId` int(10) unsigned NOT NULL,
  `userTitleId` int(10) unsigned NOT NULL,
  `priority` int(10) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `unique_UserTitleUnit` (`unitId`,`userTitleId`),
  KEY `FK_UserTitleUnit_userTitleId` (`userTitleId`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `UserUnitAffiliation`
--

DROP TABLE IF EXISTS `UserUnitAffiliation`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `UserUnitAffiliation` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Primary key',
  `userId` int(10) unsigned NOT NULL COMMENT 'Connects the UserUnitAffiliation with the User table.',
  `unitId` int(10) unsigned NOT NULL COMMENT 'Connects the UserUnitAffiliation with the Unit table.',
  `affiliationId` int(10) unsigned NOT NULL DEFAULT '8' COMMENT 'Connects the UserUnitAffiliation with the Affiliation table.',
  `isPrimaryForUser` int(1) unsigned NOT NULL DEFAULT '1' COMMENT 'Specifies it is the primary affiliation for the user.',
  `isPrimaryForUnit` int(1) unsigned NOT NULL DEFAULT '1' COMMENT 'Specifies it is the primary affiliation for the unit.',
  `startsOn` timestamp NULL DEFAULT NULL COMMENT 'Speicifies when does the affiliation start.',
  `expiresOn` timestamp NULL DEFAULT NULL COMMENT 'Specifies when does the affiliation end.',
  PRIMARY KEY (`id`),
  UNIQUE KEY `unique_UserUnitAffiliation` (`userId`,`unitId`,`affiliationId`),
  KEY `fk_UserUnitAffiliation_unitId` (`unitId`),
  KEY `fk_UserUnitAffiliation_userId` (`userId`),
  KEY `fk_UserUnitAffiliation_affiliationId` (`affiliationId`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COMMENT='Stores the user''s affiliation with the unit.';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `UserUnitRole`
--

DROP TABLE IF EXISTS `UserUnitRole`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `UserUnitRole` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Primary key.',
  `roleId` int(10) unsigned DEFAULT NULL COMMENT 'Connects the UserUnitRole to the Role.',
  `userId` int(10) unsigned DEFAULT NULL COMMENT 'Connects the UserUnitRole to the User.',
  `unitId` int(10) unsigned DEFAULT NULL COMMENT 'Connects the UserUnitRole to the Unit.',
  `affiliationId` int(10) unsigned DEFAULT NULL COMMENT 'Connects the UserUnitRole to the Affiliation information.',
  `description` text,
  PRIMARY KEY (`id`),
  KEY `fk_UserUnitRole_roleId` (`roleId`),
  KEY `fk_UserUnitRole_userId` (`userId`),
  KEY `fk_UserUnitRole_unitId` (`unitId`),
  KEY `fk_UserUnitRole_affiliationId` (`affiliationId`),
  KEY `fk_UserUnit_Role_userId` (`userId`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 COMMENT='Table for connecting the User with his Role, Unit affiliated';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `Workflow`
--

DROP TABLE IF EXISTS `Workflow`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Workflow` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `className` varchar(255) NOT NULL,
  `appId` int(10) unsigned NOT NULL,
  `itemClassName` varchar(255) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `FK_Workflow_appId` (`appId`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `WorkflowAttribute`
--

DROP TABLE IF EXISTS `WorkflowAttribute`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `WorkflowAttribute` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `workflowId` int(10) unsigned DEFAULT NULL,
  `name` varchar(255) NOT NULL,
  `method` varchar(255) DEFAULT NULL,
  `description` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FK_WorkflowAttribute_workflowId` (`workflowId`)
) ENGINE=InnoDB AUTO_INCREMENT=57 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `WorkflowInstruction`
--

DROP TABLE IF EXISTS `WorkflowInstruction`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `WorkflowInstruction` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `workflowId` int(10) unsigned NOT NULL,
  `statusId` int(10) unsigned NOT NULL,
  `viewerUserGroupId` int(10) unsigned NOT NULL,
  `validationExpr` varchar(255) DEFAULT NULL,
  `message` varchar(1000) NOT NULL,
  `messageClass` varchar(255) DEFAULT NULL,
  `priority` int(10) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `fk_WorkflowInstruction_workflowId_idx` (`workflowId`),
  KEY `fk_WorkflowInstruction_statusId_idx` (`statusId`),
  KEY `fk_WorkflowInstruction_viewerUserGroupId_idx` (`viewerUserGroupId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `WorkflowItem`
--

DROP TABLE IF EXISTS `WorkflowItem`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `WorkflowItem` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `itemId` int(10) unsigned NOT NULL,
  `statusId` int(10) unsigned NOT NULL,
  `workflowId` int(10) unsigned NOT NULL,
  `isRecalled` tinyint(1) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `UQ_WorkflowItem` (`itemId`,`workflowId`),
  KEY `FK_WorkflowItem_statusId` (`statusId`),
  KEY `FK_WorkflowItem_workflowId` (`workflowId`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `WorkflowItemActivity`
--

DROP TABLE IF EXISTS `WorkflowItemActivity`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `WorkflowItemActivity` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `actorId` int(10) unsigned NOT NULL,
  `roleId` int(10) unsigned NOT NULL,
  `actionId` int(10) unsigned NOT NULL,
  `workflowItemId` int(10) unsigned NOT NULL,
  `postStatusId` int(10) unsigned NOT NULL,
  `preStatusId` int(10) unsigned DEFAULT NULL,
  `dateCreated` datetime NOT NULL,
  `aclExpr` varchar(255) DEFAULT NULL,
  `title` text NOT NULL,
  `description` text,
  `extras` longtext,
  `inRespondingToId` int(10) unsigned DEFAULT NULL,
  `fulfilledStatus` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '0 - no action taken, 1 - request was fulfilled, 2 - request was ignored',
  PRIMARY KEY (`id`),
  KEY `FK_WorkflowItemActivity_actionId` (`actionId`),
  KEY `FK_WorkflowItemActivity_actorId` (`actorId`),
  KEY `FK_WorkflowItemActivity_roleId` (`roleId`),
  KEY `FK_WorkflowItemActivity_preStatusId` (`preStatusId`),
  KEY `FK_WorkflowItemActivity_postStatusId` (`postStatusId`),
  KEY `FK_WorkflowItemActivity_workflowItemId` (`workflowItemId`),
  KEY `FK_WorkflowItemActivity_inRespondingToId` (`inRespondingToId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `WorkflowItemActivityRecipient`
--

DROP TABLE IF EXISTS `WorkflowItemActivityRecipient`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `WorkflowItemActivityRecipient` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `workflowItemActivityId` int(10) unsigned NOT NULL,
  `userId` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  KEY `FK_WorkflowItemActivityRecipient_workflowItemActivityId` (`workflowItemActivityId`),
  KEY `FK_WorkflowItemActivityRecipient_userId` (`userId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `WorkflowItemActivityUserGroup`
--

DROP TABLE IF EXISTS `WorkflowItemActivityUserGroup`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `WorkflowItemActivityUserGroup` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `workflowItemActivityId` int(10) unsigned NOT NULL,
  `workflowUserGroupId` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  KEY `FK_WorkflowItemActivityUserGroup_workflowItemActivityId` (`workflowItemActivityId`),
  KEY `FK_WorkflowItemActivityUserGroup_workflowUserGroupId` (`workflowUserGroupId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `WorkflowItemUserRole`
--

DROP TABLE IF EXISTS `WorkflowItemUserRole`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `WorkflowItemUserRole` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `roleId` int(10) unsigned NOT NULL,
  `userId` int(10) unsigned NOT NULL,
  `workflowItemId` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  KEY `FK_WorkflowItemUserRole_userId` (`userId`),
  KEY `FK_WorkflowItemUserRole_roleId` (`roleId`),
  KEY `FK_WorkflowItemUserRole_workflowItemId` (`workflowItemId`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `WorkflowPostTaskType`
--

DROP TABLE IF EXISTS `WorkflowPostTaskType`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `WorkflowPostTaskType` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `WorkflowProcessingMethod`
--

DROP TABLE IF EXISTS `WorkflowProcessingMethod`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `WorkflowProcessingMethod` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `workflowId` int(10) unsigned DEFAULT NULL,
  `method` varchar(255) NOT NULL,
  `description` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FK_WorkflowProcessingMethod_workflowId` (`workflowId`)
) ENGINE=InnoDB AUTO_INCREMENT=105 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `WorkflowRule`
--

DROP TABLE IF EXISTS `WorkflowRule`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `WorkflowRule` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `workflowId` int(10) unsigned DEFAULT NULL,
  `actionId` int(10) unsigned NOT NULL,
  `statusId` int(10) unsigned DEFAULT NULL,
  `aclExpr` varchar(255) DEFAULT NULL,
  `processingMethodId` int(10) unsigned DEFAULT NULL,
  `isEntry` tinyint(3) unsigned NOT NULL DEFAULT '0',
  `postStatusId` int(10) unsigned DEFAULT NULL,
  `isActionVisible` tinyint(3) unsigned NOT NULL DEFAULT '1',
  `isCommentRequired` tinyint(3) unsigned NOT NULL DEFAULT '0',
  `commentLabel` varchar(255) DEFAULT NULL,
  `isConfirmationRequired` tinyint(3) unsigned NOT NULL DEFAULT '1',
  `isSignatureRequired` tinyint(3) unsigned NOT NULL DEFAULT '0',
  `signatureLabel` varchar(500) DEFAULT NULL,
  `confirmationLabel` varchar(500) DEFAULT NULL,
  `actionName` varchar(255) DEFAULT NULL,
  `actionIconClass` varchar(100) DEFAULT NULL,
  `actionButtonClass` varchar(100) DEFAULT NULL,
  `actionDescription` varchar(255) DEFAULT NULL,
  `priority` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  KEY `FK_WorkflowRule_workflowId` (`workflowId`),
  KEY `FK_WorkflowRule_postStatusId` (`postStatusId`),
  KEY `FK_WorkflowRule_actionId` (`actionId`),
  KEY `FK_WorkflowRule_statusId` (`statusId`),
  KEY `FK_WorkflowRule_processingMethodId` (`processingMethodId`)
) ENGINE=InnoDB AUTO_INCREMENT=162 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `WorkflowRuleActorGroup`
--

DROP TABLE IF EXISTS `WorkflowRuleActorGroup`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `WorkflowRuleActorGroup` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `workflowRuleId` int(10) unsigned NOT NULL,
  `workflowUserGroupId` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  KEY `fk_WorkflowRuleActorGroup_workflowUserGroupId_idx` (`workflowUserGroupId`),
  KEY `fk_WorkflowRuleActorGroup_workflowRuleId_idx` (`workflowRuleId`)
) ENGINE=InnoDB AUTO_INCREMENT=98 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `WorkflowRuleExecutionAcl`
--

DROP TABLE IF EXISTS `WorkflowRuleExecutionAcl`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `WorkflowRuleExecutionAcl` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `workflowRuleId` int(10) unsigned NOT NULL,
  `name` varchar(255) NOT NULL,
  `expr` varchar(255) NOT NULL,
  `successMessage` varchar(255) DEFAULT NULL,
  `failureMessage` varchar(255) DEFAULT NULL,
  `priority` int(10) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `FK_WorkflowRuleExecutionAcl_workflowRuleId` (`workflowRuleId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `WorkflowRulePostTask`
--

DROP TABLE IF EXISTS `WorkflowRulePostTask`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `WorkflowRulePostTask` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `purpose` varchar(255) DEFAULT NULL,
  `workflowRuleId` int(10) unsigned NOT NULL,
  `workflowTaskTypeId` int(10) unsigned NOT NULL,
  `validationExpr` text,
  `title` text,
  `description` text,
  `priority` int(10) unsigned NOT NULL,
  `runtimeAclExpr` varchar(255) DEFAULT NULL,
  `isRemoveNotificationAfterDelivery` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT 'in case of email, set it to 1 if you want to remove the email after delivery',
  `notificationDeliveryInterval` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'how long (in minutes) would you like the notifications to be created',
  `dueDateAttributeId` int(10) unsigned DEFAULT NULL,
  `activityLogExtrasAttributeId` int(10) unsigned DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FK_WorkflowNotificationTemplate_notificationTypeId` (`workflowTaskTypeId`),
  KEY `FK_WorkflowNotificationTemplate_workflowRuleId` (`workflowRuleId`),
  KEY `FK_WorkflowRulePostTask_dueDateAttributeId` (`dueDateAttributeId`),
  KEY `FK_WorkflowRulePostTask_activityLogExtrasAttributeId` (`activityLogExtrasAttributeId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `WorkflowRulePostTaskRecipient`
--

DROP TABLE IF EXISTS `WorkflowRulePostTaskRecipient`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `WorkflowRulePostTaskRecipient` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `workflowRulePostTaskId` int(10) unsigned NOT NULL,
  `workflowUserGroupId` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  KEY `fk_WorkflowPostTaskRecipient_workflowUserGroupId_idx` (`workflowUserGroupId`),
  KEY `fk_WorkflowRulePostTaskRecipient_workflowRulePostTaskId_idx` (`workflowRulePostTaskId`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `WorkflowStatus`
--

DROP TABLE IF EXISTS `WorkflowStatus`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `WorkflowStatus` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `workflowId` int(10) unsigned DEFAULT NULL,
  `name` varchar(255) NOT NULL,
  `priority` int(10) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `FK_WorkflowStatus_workflowId` (`workflowId`)
) ENGINE=InnoDB AUTO_INCREMENT=39 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `WorkflowUserGroup`
--

DROP TABLE IF EXISTS `WorkflowUserGroup`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `WorkflowUserGroup` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `workflowId` int(10) unsigned DEFAULT NULL,
  `name` varchar(255) NOT NULL,
  `description` varchar(255) DEFAULT NULL,
  `isVisible` tinyint(1) unsigned NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`),
  KEY `fk_WorkflowUserGroup_workflowId_idx` (`workflowId`)
) ENGINE=InnoDB AUTO_INCREMENT=50 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `WorkflowUserGroupAttribute`
--

DROP TABLE IF EXISTS `WorkflowUserGroupAttribute`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `WorkflowUserGroupAttribute` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `workflowUserGroupId` int(10) unsigned NOT NULL,
  `attribute` varchar(255) DEFAULT NULL,
  `attributeId` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  KEY `FK_WorkflowUserGroupAttribute_workflowId_idx` (`workflowUserGroupId`),
  KEY `fk_WorkflowUserGroupAttribute_attributeId` (`attributeId`)
) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `WorkflowUserGroupRole`
--

DROP TABLE IF EXISTS `WorkflowUserGroupRole`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `WorkflowUserGroupRole` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `workflowUserGroupId` int(10) unsigned NOT NULL,
  `roleId` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  KEY `FK_WorkflowUserGroupRole_workflowId_idx` (`workflowUserGroupId`),
  KEY `FK_WorkflowUserGroupRole_roleId_idx` (`roleId`)
) ENGINE=InnoDB AUTO_INCREMENT=71 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `WorkflowUserGroupUser`
--

DROP TABLE IF EXISTS `WorkflowUserGroupUser`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `WorkflowUserGroupUser` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `workflowUserGroupId` int(10) unsigned NOT NULL,
  `userId` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  KEY `FK_WorkflowUserGroupUser_userId_idx` (`userId`),
  KEY `FK_WorkflowUserGroupUser_workflowId_idx` (`workflowUserGroupId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `WorkflowUserUnitRole`
--

DROP TABLE IF EXISTS `WorkflowUserUnitRole`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `WorkflowUserUnitRole` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `workflowId` int(10) unsigned NOT NULL,
  `userUnitRoleId` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  KEY `FK_WorkflowUserUnitRole_userUnitRoleId` (`userUnitRoleId`),
  KEY `FK_WorkflowUserUnitRole_workflowId` (`workflowId`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `YearSemester`
--

DROP TABLE IF EXISTS `YearSemester`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `YearSemester` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `year` int(10) unsigned NOT NULL,
  `semesterId` int(10) unsigned NOT NULL,
  `startDate` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `endDate` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `censusDate` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `lastDropDate` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `durationId` int(10) unsigned DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `UNIQUE_YEAR_SEMESTER_SESSION` (`year`,`semesterId`,`durationId`,`startDate`,`endDate`),
  KEY `FK_YearSemester_semesterId` (`semesterId`),
  KEY `FK_YearSemester_durationId` (`durationId`)
) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `phinxlog`
--

DROP TABLE IF EXISTS `phinxlog`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `phinxlog` (
  `version` bigint(14) NOT NULL,
  `start_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `end_time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

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

-- Dump completed on 2026-01-05  9:32:40
