-- MySQL dump 10.11 -- -- Host: localhost Database: mifos -- ------------------------------------------------------ -- Server version 5.0.67-community-nt-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 `accepted_payment_type` -- DROP TABLE IF EXISTS `accepted_payment_type`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `accepted_payment_type` ( `ACCEPTED_PAYMENT_TYPE_ID` smallint(6) NOT NULL auto_increment, `TRANSACTION_ID` smallint(6) NOT NULL, `PAYMENT_TYPE_ID` smallint(6) NOT NULL, PRIMARY KEY (`ACCEPTED_PAYMENT_TYPE_ID`), KEY `TRANSACTION_ID` (`TRANSACTION_ID`), KEY `PAYMENT_TYPE_ID` (`PAYMENT_TYPE_ID`), CONSTRAINT `accepted_payment_type_ibfk_1` FOREIGN KEY (`TRANSACTION_ID`) REFERENCES `transaction_type` (`TRANSACTION_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `accepted_payment_type_ibfk_2` FOREIGN KEY (`PAYMENT_TYPE_ID`) REFERENCES `payment_type` (`PAYMENT_TYPE_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `account` -- DROP TABLE IF EXISTS `account`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `account` ( `ACCOUNT_ID` int(11) NOT NULL auto_increment, `GLOBAL_ACCOUNT_NUM` varchar(100) default NULL, `CUSTOMER_ID` int(11) default NULL, `ACCOUNT_STATE_ID` smallint(6) default NULL, `ACCOUNT_TYPE_ID` smallint(6) NOT NULL default '0', `OFFICE_ID` smallint(6) default NULL, `PERSONNEL_ID` smallint(6) default NULL, `CREATED_BY` smallint(6) NOT NULL default '0', `CREATED_DATE` date NOT NULL default '0000-00-00', `UPDATED_BY` smallint(6) default NULL, `UPDATED_DATE` date default NULL, `CLOSED_DATE` date default NULL, `VERSION_NO` int(11) default NULL, `OFFSETTING_ALLOWABLE` smallint(6) NOT NULL, PRIMARY KEY (`ACCOUNT_ID`), UNIQUE KEY `ACCOUNT_GLOBAL_IDX` (`GLOBAL_ACCOUNT_NUM`), KEY `ACCOUNT_STATE_ID` (`ACCOUNT_STATE_ID`), KEY `ACCOUNT_TYPE_ID` (`ACCOUNT_TYPE_ID`), KEY `PERSONNEL_ID` (`PERSONNEL_ID`), KEY `OFFICE_ID` (`OFFICE_ID`), KEY `CUSTOMER_ID_ACCOUNT_IDX` (`CUSTOMER_ID`), CONSTRAINT `account_ibfk_1` FOREIGN KEY (`ACCOUNT_STATE_ID`) REFERENCES `account_state` (`ACCOUNT_STATE_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `account_ibfk_2` FOREIGN KEY (`ACCOUNT_TYPE_ID`) REFERENCES `account_type` (`ACCOUNT_TYPE_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `account_ibfk_3` FOREIGN KEY (`CUSTOMER_ID`) REFERENCES `customer` (`CUSTOMER_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `account_ibfk_4` FOREIGN KEY (`PERSONNEL_ID`) REFERENCES `personnel` (`PERSONNEL_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `account_ibfk_5` FOREIGN KEY (`OFFICE_ID`) REFERENCES `office` (`OFFICE_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=2019095 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `account_action` -- DROP TABLE IF EXISTS `account_action`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `account_action` ( `ACCOUNT_ACTION_ID` smallint(6) NOT NULL default '0', `LOOKUP_ID` int(11) NOT NULL default '0', PRIMARY KEY (`ACCOUNT_ACTION_ID`), KEY `LOOKUP_ID` (`LOOKUP_ID`), CONSTRAINT `account_action_ibfk_1` FOREIGN KEY (`LOOKUP_ID`) REFERENCES `lookup_value` (`LOOKUP_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `account_activity` -- DROP TABLE IF EXISTS `account_activity`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `account_activity` ( `ACTIVITY_ID` int(11) NOT NULL auto_increment, `ACCOUNT_ID` int(11) NOT NULL default '0', `PERSONNEL_ID` smallint(6) NOT NULL default '0', `ACTIVITY_NAME` varchar(50) NOT NULL default '', `PRINCIPAL` decimal(10,3) default NULL, `PRINCIPAL_CURRENCY_ID` smallint(6) default NULL, `PRINCIPAL_OUTSTANDING` decimal(10,3) default NULL, `PRINCIPAL_OUTSTANDING_CURRENCY_ID` smallint(6) default NULL, `INTEREST` decimal(13,10) default NULL, `INTEREST_CURRENCY_ID` smallint(6) default NULL, `INTEREST_OUTSTANDING` decimal(13,10) default NULL, `INTEREST_OUTSTANDING_CURRENCY_ID` smallint(6) default NULL, `FEE` decimal(13,2) default NULL, `FEE_CURRENCY_ID` smallint(6) default NULL, `FEE_OUTSTANDING` decimal(13,2) default NULL, `FEE_OUTSTANDING_CURRENCY_ID` smallint(6) default NULL, `PENALTY` decimal(13,10) default NULL, `PENALTY_CURRENCY_ID` smallint(6) default NULL, `PENALTY_OUTSTANDING` decimal(13,10) default NULL, `PENALTY_OUTSTANDING_CURRENCY_ID` smallint(6) default NULL, PRIMARY KEY (`ACTIVITY_ID`), KEY `ACCOUNT_ID` (`ACCOUNT_ID`), KEY `PRINCIPAL_CURRENCY_ID` (`PRINCIPAL_CURRENCY_ID`), KEY `PRINCIPAL_OUTSTANDING_CURRENCY_ID` (`PRINCIPAL_OUTSTANDING_CURRENCY_ID`), KEY `INTEREST_CURRENCY_ID` (`INTEREST_CURRENCY_ID`), KEY `INTEREST_OUTSTANDING_CURRENCY_ID` (`INTEREST_OUTSTANDING_CURRENCY_ID`), KEY `FEE_CURRENCY_ID` (`FEE_CURRENCY_ID`), KEY `FEE_OUTSTANDING_CURRENCY_ID` (`FEE_OUTSTANDING_CURRENCY_ID`), KEY `PENALTY_CURRENCY_ID` (`PENALTY_CURRENCY_ID`), KEY `PENALTY_OUTSTANDING_CURRENCY_ID` (`PENALTY_OUTSTANDING_CURRENCY_ID`), CONSTRAINT `account_activity_ibfk_1` FOREIGN KEY (`ACCOUNT_ID`) REFERENCES `account` (`ACCOUNT_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `account_activity_ibfk_2` FOREIGN KEY (`PRINCIPAL_CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `account_activity_ibfk_3` FOREIGN KEY (`PRINCIPAL_OUTSTANDING_CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `account_activity_ibfk_4` FOREIGN KEY (`INTEREST_CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `account_activity_ibfk_5` FOREIGN KEY (`INTEREST_OUTSTANDING_CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `account_activity_ibfk_6` FOREIGN KEY (`FEE_CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `account_activity_ibfk_7` FOREIGN KEY (`FEE_OUTSTANDING_CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `account_activity_ibfk_8` FOREIGN KEY (`PENALTY_CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `account_activity_ibfk_9` FOREIGN KEY (`PENALTY_OUTSTANDING_CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `account_custom_field` -- DROP TABLE IF EXISTS `account_custom_field`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `account_custom_field` ( `ACCOUNT_CUSTOM_FIELD_ID` int(11) NOT NULL auto_increment, `ACCOUNT_ID` int(11) NOT NULL default '0', `FIELD_ID` smallint(6) NOT NULL default '0', `FIELD_VALUE` varchar(200) default NULL, PRIMARY KEY (`ACCOUNT_CUSTOM_FIELD_ID`), KEY `FIELD_ID` (`FIELD_ID`), KEY `ACCOUNT_ID` (`ACCOUNT_ID`), CONSTRAINT `account_custom_field_ibfk_1` FOREIGN KEY (`FIELD_ID`) REFERENCES `custom_field_definition` (`FIELD_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `account_custom_field_ibfk_2` FOREIGN KEY (`ACCOUNT_ID`) REFERENCES `account` (`ACCOUNT_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=1388806 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `account_fees` -- DROP TABLE IF EXISTS `account_fees`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `account_fees` ( `ACCOUNT_FEE_ID` int(11) NOT NULL auto_increment, `ACCOUNT_ID` int(11) NOT NULL default '0', `FEE_ID` smallint(6) NOT NULL default '0', `FEE_FREQUENCY` int(11) default NULL, `STATUS` smallint(6) default NULL, `INHERITED_FLAG` smallint(6) default NULL, `START_DATE` date default NULL, `END_DATE` date default NULL, `ACCOUNT_FEE_AMNT` decimal(10,3) NOT NULL default '0.000', `ACCOUNT_FEE_AMNT_CURRENCY_ID` smallint(6) default NULL, `FEE_AMNT` decimal(10,3) NOT NULL default '0.000', `FEE_AMNT_CURRENCY_ID` smallint(6) default NULL, `FEE_STATUS` smallint(6) default NULL, `STATUS_CHANGE_DATE` date default NULL, `VERSION_NO` int(11) NOT NULL default '0', `LAST_APPLIED_DATE` date default NULL, PRIMARY KEY (`ACCOUNT_FEE_ID`), KEY `FEE_ID` (`FEE_ID`), KEY `ACCOUNT_FEE_AMNT_CURRENCY_ID` (`ACCOUNT_FEE_AMNT_CURRENCY_ID`), KEY `FEE_AMNT_CURRENCY_ID` (`FEE_AMNT_CURRENCY_ID`), KEY `FEE_FREQUENCY` (`FEE_FREQUENCY`), KEY `ACCOUNT_FEES_ID_IDX` (`ACCOUNT_ID`,`FEE_ID`), CONSTRAINT `account_fees_ibfk_1` FOREIGN KEY (`ACCOUNT_ID`) REFERENCES `account` (`ACCOUNT_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `account_fees_ibfk_2` FOREIGN KEY (`FEE_ID`) REFERENCES `fees` (`FEE_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `account_fees_ibfk_3` FOREIGN KEY (`ACCOUNT_FEE_AMNT_CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `account_fees_ibfk_4` FOREIGN KEY (`FEE_AMNT_CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `account_fees_ibfk_5` FOREIGN KEY (`FEE_FREQUENCY`) REFERENCES `recurrence_detail` (`DETAILS_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=1893586 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `account_flag_detail` -- DROP TABLE IF EXISTS `account_flag_detail`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `account_flag_detail` ( `ACCOUNT_FLAG_ID` int(11) NOT NULL auto_increment, `ACCOUNT_ID` int(11) NOT NULL default '0', `FLAG_ID` smallint(6) NOT NULL default '0', `CREATED_BY` smallint(6) NOT NULL default '0', `CREATED_DATE` date NOT NULL default '0000-00-00', PRIMARY KEY (`ACCOUNT_FLAG_ID`), KEY `ACCOUNT_ID` (`ACCOUNT_ID`), KEY `FLAG_ID` (`FLAG_ID`), KEY `CREATED_BY` (`CREATED_BY`), CONSTRAINT `account_flag_detail_ibfk_1` FOREIGN KEY (`ACCOUNT_ID`) REFERENCES `account` (`ACCOUNT_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `account_flag_detail_ibfk_2` FOREIGN KEY (`FLAG_ID`) REFERENCES `account_state_flag` (`FLAG_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `account_flag_detail_ibfk_3` FOREIGN KEY (`CREATED_BY`) REFERENCES `personnel` (`PERSONNEL_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=36180 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `account_notes` -- DROP TABLE IF EXISTS `account_notes`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `account_notes` ( `ACCOUNT_NOTES_ID` int(11) NOT NULL auto_increment, `ACCOUNT_ID` int(11) NOT NULL default '0', `NOTE` text NOT NULL, `COMMENT_DATE` date NOT NULL default '0000-00-00', `OFFICER_ID` smallint(6) NOT NULL default '0', PRIMARY KEY (`ACCOUNT_NOTES_ID`), KEY `ACCOUNT_ID` (`ACCOUNT_ID`), KEY `OFFICER_ID` (`OFFICER_ID`), CONSTRAINT `account_notes_ibfk_1` FOREIGN KEY (`ACCOUNT_ID`) REFERENCES `account` (`ACCOUNT_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `account_notes_ibfk_2` FOREIGN KEY (`OFFICER_ID`) REFERENCES `personnel` (`PERSONNEL_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=1428387 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `account_payment` -- DROP TABLE IF EXISTS `account_payment`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `account_payment` ( `PAYMENT_ID` int(11) NOT NULL auto_increment, `ACCOUNT_ID` int(11) NOT NULL default '0', `PAYMENT_TYPE_ID` smallint(6) NOT NULL default '0', `CURRENCY_ID` smallint(6) default NULL, `AMOUNT` decimal(10,3) NOT NULL default '0.000', `RECEIPT_NUMBER` varchar(25) default NULL, `VOUCHER_NUMBER` varchar(50) default NULL, `CHECK_NUMBER` varchar(50) default NULL, `PAYMENT_DATE` date NOT NULL default '0000-00-00', `RECEIPT_DATE` date default NULL, `BANK_NAME` varchar(50) default NULL, PRIMARY KEY (`PAYMENT_ID`), KEY `CURRENCY_ID` (`CURRENCY_ID`), KEY `PAYMENT_TYPE_ID` (`PAYMENT_TYPE_ID`), KEY `ACCOUNT_ID_ACCOUNT_PAYMENT_IDX` (`ACCOUNT_ID`), CONSTRAINT `account_payment_ibfk_1` FOREIGN KEY (`ACCOUNT_ID`) REFERENCES `account` (`ACCOUNT_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `account_payment_ibfk_2` FOREIGN KEY (`CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `account_payment_ibfk_3` FOREIGN KEY (`PAYMENT_TYPE_ID`) REFERENCES `payment_type` (`PAYMENT_TYPE_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=36425303 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `account_state` -- DROP TABLE IF EXISTS `account_state`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `account_state` ( `ACCOUNT_STATE_ID` smallint(6) NOT NULL auto_increment, `LOOKUP_ID` int(11) NOT NULL default '0', `PRD_TYPE_ID` smallint(6) NOT NULL default '0', `CURRENTLY_IN_USE` smallint(6) NOT NULL default '0', `STATUS_DESCRIPTION` varchar(200) default NULL, PRIMARY KEY (`ACCOUNT_STATE_ID`), KEY `LOOKUP_ID` (`LOOKUP_ID`), CONSTRAINT `account_state_ibfk_1` FOREIGN KEY (`LOOKUP_ID`) REFERENCES `lookup_value` (`LOOKUP_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `account_state_flag` -- DROP TABLE IF EXISTS `account_state_flag`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `account_state_flag` ( `FLAG_ID` smallint(6) NOT NULL auto_increment, `LOOKUP_ID` int(11) NOT NULL default '0', `STATUS_ID` smallint(6) NOT NULL default '0', `FLAG_DESCRIPTION` varchar(200) default NULL, `RETAIN_FLAG` smallint(6) NOT NULL default '0', PRIMARY KEY (`FLAG_ID`), KEY `STATUS_ID` (`STATUS_ID`), KEY `LOOKUP_ID` (`LOOKUP_ID`), CONSTRAINT `account_state_flag_ibfk_1` FOREIGN KEY (`STATUS_ID`) REFERENCES `account_state` (`ACCOUNT_STATE_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `account_state_flag_ibfk_2` FOREIGN KEY (`LOOKUP_ID`) REFERENCES `lookup_value` (`LOOKUP_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `account_status_change_history` -- DROP TABLE IF EXISTS `account_status_change_history`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `account_status_change_history` ( `ACCOUNT_STATUS_CHANGE_ID` int(11) NOT NULL auto_increment, `ACCOUNT_ID` int(11) NOT NULL default '0', `OLD_STATUS` smallint(6) default NULL, `NEW_STATUS` smallint(6) NOT NULL default '0', `CHANGED_BY` smallint(6) NOT NULL default '0', `CHANGED_DATE` date NOT NULL default '0000-00-00', PRIMARY KEY (`ACCOUNT_STATUS_CHANGE_ID`), KEY `ACCOUNT_ID` (`ACCOUNT_ID`), KEY `OLD_STATUS` (`OLD_STATUS`), KEY `NEW_STATUS` (`NEW_STATUS`), KEY `CHANGED_BY` (`CHANGED_BY`), CONSTRAINT `account_status_change_history_ibfk_1` FOREIGN KEY (`ACCOUNT_ID`) REFERENCES `account` (`ACCOUNT_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `account_status_change_history_ibfk_2` FOREIGN KEY (`OLD_STATUS`) REFERENCES `account_state` (`ACCOUNT_STATE_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `account_status_change_history_ibfk_3` FOREIGN KEY (`NEW_STATUS`) REFERENCES `account_state` (`ACCOUNT_STATE_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `account_status_change_history_ibfk_4` FOREIGN KEY (`CHANGED_BY`) REFERENCES `personnel` (`PERSONNEL_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=5685215 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `account_trxn` -- DROP TABLE IF EXISTS `account_trxn`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `account_trxn` ( `ACCOUNT_TRXN_ID` int(11) NOT NULL auto_increment, `ACCOUNT_ID` int(11) NOT NULL default '0', `PAYMENT_ID` int(11) NOT NULL default '0', `PERSONNEL_ID` int(11) default NULL, `ACCOUNT_ACTION_ID` smallint(6) NOT NULL default '0', `CURRENCY_ID` smallint(6) default NULL, `AMOUNT_CURRENCY_ID` smallint(6) default NULL, `AMOUNT` decimal(10,3) NOT NULL default '0.000', `DUE_DATE` date default NULL, `COMMENTS` varchar(200) default NULL, `ACTION_DATE` date NOT NULL default '0000-00-00', `CREATED_DATE` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, `CUSTOMER_ID` int(11) default NULL, `INSTALLMENT_ID` smallint(6) default NULL, `RELATED_TRXN_ID` int(11) default NULL, PRIMARY KEY (`ACCOUNT_TRXN_ID`), KEY `ACCOUNT_ACTION_ID` (`ACCOUNT_ACTION_ID`), KEY `PAYMENT_ID` (`PAYMENT_ID`), KEY `CURRENCY_ID` (`CURRENCY_ID`), KEY `AMOUNT_CURRENCY_ID` (`AMOUNT_CURRENCY_ID`), KEY `CUSTOMER_ID` (`CUSTOMER_ID`), KEY `ACCOUNT_ID_ACCOUNT_TRXN_IDX` (`ACCOUNT_ID`), CONSTRAINT `account_trxn_ibfk_1` FOREIGN KEY (`ACCOUNT_ID`) REFERENCES `account` (`ACCOUNT_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `account_trxn_ibfk_2` FOREIGN KEY (`ACCOUNT_ACTION_ID`) REFERENCES `account_action` (`ACCOUNT_ACTION_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `account_trxn_ibfk_3` FOREIGN KEY (`PAYMENT_ID`) REFERENCES `account_payment` (`PAYMENT_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `account_trxn_ibfk_4` FOREIGN KEY (`CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `account_trxn_ibfk_5` FOREIGN KEY (`AMOUNT_CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `account_trxn_ibfk_6` FOREIGN KEY (`CUSTOMER_ID`) REFERENCES `customer` (`CUSTOMER_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=61472500 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `account_type` -- DROP TABLE IF EXISTS `account_type`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `account_type` ( `ACCOUNT_TYPE_ID` smallint(6) NOT NULL auto_increment, `LOOKUP_ID` int(11) NOT NULL default '0', `DESCRIPTION` varchar(50) default NULL, PRIMARY KEY (`ACCOUNT_TYPE_ID`), KEY `LOOKUP_ID` (`LOOKUP_ID`), CONSTRAINT `account_type_ibfk_1` FOREIGN KEY (`LOOKUP_ID`) REFERENCES `lookup_value` (`LOOKUP_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `activity` -- DROP TABLE IF EXISTS `activity`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `activity` ( `ACTIVITY_ID` smallint(6) NOT NULL auto_increment, `PARENT_ID` smallint(6) default NULL, `ACTIVITY_NAME_LOOKUP_ID` int(11) NOT NULL default '0', `DESCRIPTION_LOOKUP_ID` int(11) NOT NULL default '0', PRIMARY KEY (`ACTIVITY_ID`), KEY `PARENT_ID` (`PARENT_ID`), KEY `ACTIVITY_NAME_LOOKUP_ID` (`ACTIVITY_NAME_LOOKUP_ID`), KEY `DESCRIPTION_LOOKUP_ID` (`DESCRIPTION_LOOKUP_ID`), CONSTRAINT `activity_ibfk_1` FOREIGN KEY (`PARENT_ID`) REFERENCES `activity` (`ACTIVITY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `activity_ibfk_2` FOREIGN KEY (`ACTIVITY_NAME_LOOKUP_ID`) REFERENCES `lookup_value` (`LOOKUP_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `activity_ibfk_3` FOREIGN KEY (`DESCRIPTION_LOOKUP_ID`) REFERENCES `lookup_value` (`LOOKUP_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=233 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `admin_document` -- DROP TABLE IF EXISTS `admin_document`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `admin_document` ( `ADMIN_DOCUMENT_ID` int(11) NOT NULL auto_increment, `ADMIN_DOCUMENT_NAME` varchar(200) default NULL, `ADMIN_DOCUMENT_IDENTIFIER` varchar(100) default NULL, `ADMIN_DOCUMENT_ACTIVE` smallint(6) default NULL, `CREATED_BY` smallint(6) default NULL, `CREATED_DATE` date default NULL, `UPDATED_BY` smallint(6) default NULL, `UPDATED_DATE` date default NULL, `VERSION_NO` int(11) default NULL, PRIMARY KEY (`ADMIN_DOCUMENT_ID`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `admin_document_acc_state_mix` -- DROP TABLE IF EXISTS `admin_document_acc_state_mix`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `admin_document_acc_state_mix` ( `ADMIN_DOC_ACC_STATE_MIX_ID` int(11) NOT NULL auto_increment, `ACCOUNT_STATE_ID` smallint(6) NOT NULL, `ADMIN_DOCUMENT_ID` int(11) NOT NULL, `CREATED_BY` smallint(6) default NULL, `CREATED_DATE` date default NULL, `UPDATED_BY` smallint(6) default NULL, `UPDATED_DATE` date default NULL, `VERSION_NO` int(11) default NULL, PRIMARY KEY (`ADMIN_DOC_ACC_STATE_MIX_ID`), KEY `admin_document_acc_state_mix_fk` (`ACCOUNT_STATE_ID`), KEY `admin_document_acc_state_mix_fk1` (`ADMIN_DOCUMENT_ID`), CONSTRAINT `admin_document_acc_state_mix_fk` FOREIGN KEY (`ACCOUNT_STATE_ID`) REFERENCES `account_state` (`ACCOUNT_STATE_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `admin_document_acc_state_mix_fk1` FOREIGN KEY (`ADMIN_DOCUMENT_ID`) REFERENCES `admin_document` (`ADMIN_DOCUMENT_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `arrear_details` -- DROP TABLE IF EXISTS `arrear_details`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `arrear_details` ( `ID` int(11) NOT NULL auto_increment, `Creation_Date` date default NULL, `ACCOUNT_ID` int(11) NOT NULL default '0', `CUSTOMER_ID` int(11) NOT NULL default '0', `CUSTOMER_NAME` varchar(200) default NULL, `PARENT_CUSTOMER_ID` int(11) default NULL, `OFFICE_ID` smallint(6) NOT NULL default '0', `DAYS_IN_ARREARS` smallint(6) NOT NULL default '0', `OVERDUE_PRINCIPAL` decimal(10,3) default NULL, `OVERDUE_PRINCIPAL_CURRENCY_ID` smallint(6) default '2', `OVERDUE_INTEREST` decimal(10,3) default NULL, `OVERDUE_INTEREST_CURRENCY_ID` smallint(6) default '2', `OVERDUE_BALANCE` decimal(10,3) default NULL, `OVERDUE_BALANCE_CURRENCY_ID` smallint(6) default '2', `UNPAID_PRINCIPAL` decimal(10,3) default NULL, `UNPAID_PRINCIPAL_CURRENCY_ID` smallint(6) default '2', `UNPAID_INTEREST` decimal(10,3) default NULL, `UNPAID_INTEREST_CURRENCY_ID` smallint(6) default '2', `UNPAID_BALANCE` decimal(10,3) default NULL, `UNPAID_BALANCE_CURRENCY_ID` smallint(6) default '2', PRIMARY KEY (`ID`), KEY `ACCOUNT_ID` (`ACCOUNT_ID`), KEY `Creation_Date` (`Creation_Date`), KEY `CUSTOMER_ID` (`CUSTOMER_ID`), KEY `PARENT_CUSTOMER_ID` (`PARENT_CUSTOMER_ID`), KEY `OFFICE_ID` (`OFFICE_ID`), KEY `OVERDUE_PRINCIPAL_CURRENCY_ID` (`OVERDUE_PRINCIPAL_CURRENCY_ID`), KEY `OVERDUE_INTEREST_CURRENCY_ID` (`OVERDUE_INTEREST_CURRENCY_ID`), KEY `OVERDUE_BALANCE_CURRENCY_ID` (`OVERDUE_BALANCE_CURRENCY_ID`), KEY `UNPAID_PRINCIPAL_CURRENCY_ID` (`UNPAID_PRINCIPAL_CURRENCY_ID`), KEY `UNPAID_INTEREST_CURRENCY_ID` (`UNPAID_INTEREST_CURRENCY_ID`), KEY `UNPAID_BALANCE_CURRENCY_ID` (`UNPAID_BALANCE_CURRENCY_ID`) ) ENGINE=InnoDB AUTO_INCREMENT=7662 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `arrearsdata` -- DROP TABLE IF EXISTS `arrearsdata`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `arrearsdata` ( `arreardate` varchar(10) NOT NULL default '', `offid` smallint(6) default NULL, `kid` int(11) default '0', `cid` int(11) default NULL, `accid` int(11) default '0', `duePrincipal` double(15,3) default NULL, `DueInterest` double(15,3) default NULL, `OverduePrincipal` double(15,3) default NULL, `OverdueInterest` double(15,3) default NULL, `PrincipalOutstanding` double(15,3) default NULL, `InterestOutstanding` double(15,3) default NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `attendance` -- DROP TABLE IF EXISTS `attendance`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `attendance` ( `MEETING_ID` int(11) NOT NULL default '0', `MEETING_DATE` date NOT NULL default '0000-00-00', `ATTENDANCE` smallint(6) default NULL, `NOTES` varchar(200) NOT NULL default '', PRIMARY KEY (`MEETING_ID`,`MEETING_DATE`), CONSTRAINT `attendance_ibfk_1` FOREIGN KEY (`MEETING_ID`) REFERENCES `customer_meeting` (`CUSTOMER_MEETING_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `batch_branch_cash_confirmation_report` -- DROP TABLE IF EXISTS `batch_branch_cash_confirmation_report`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `batch_branch_cash_confirmation_report` ( `BRANCH_CASH_CONFIRMATION_REPORT_ID` int(11) NOT NULL auto_increment, `BRANCH_ID` smallint(6) NOT NULL, `RUN_DATE` date NOT NULL, PRIMARY KEY (`BRANCH_CASH_CONFIRMATION_REPORT_ID`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `batch_branch_confirmation_disbursement` -- DROP TABLE IF EXISTS `batch_branch_confirmation_disbursement`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `batch_branch_confirmation_disbursement` ( `ID` int(11) NOT NULL auto_increment, `BRANCH_CASH_CONFIRMATION_REPORT_ID` int(11) NOT NULL, `PRODUCT_NAME` varchar(50) NOT NULL, `ACTUAL` decimal(20,3) NOT NULL, `ACTUAL_CURRENCY_ID` smallint(6) NOT NULL, PRIMARY KEY (`ID`), KEY `BRANCH_CASH_CONFIRMATION_REPORT_ID` (`BRANCH_CASH_CONFIRMATION_REPORT_ID`), CONSTRAINT `batch_branch_confirmation_disbursement_ibfk_1` FOREIGN KEY (`BRANCH_CASH_CONFIRMATION_REPORT_ID`) REFERENCES `batch_branch_cash_confirmation_report` (`BRANCH_CASH_CONFIRMATION_REPORT_ID`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `batch_branch_confirmation_issue` -- DROP TABLE IF EXISTS `batch_branch_confirmation_issue`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `batch_branch_confirmation_issue` ( `ID` int(11) NOT NULL auto_increment, `BRANCH_CASH_CONFIRMATION_REPORT_ID` int(11) NOT NULL, `PRODUCT_NAME` varchar(50) NOT NULL, `ACTUAL` decimal(20,3) NOT NULL, `ACTUAL_CURRENCY_ID` smallint(6) NOT NULL, PRIMARY KEY (`ID`), KEY `BRANCH_CASH_CONFIRMATION_REPORT_ID` (`BRANCH_CASH_CONFIRMATION_REPORT_ID`), CONSTRAINT `batch_branch_confirmation_issue_ibfk_1` FOREIGN KEY (`BRANCH_CASH_CONFIRMATION_REPORT_ID`) REFERENCES `batch_branch_cash_confirmation_report` (`BRANCH_CASH_CONFIRMATION_REPORT_ID`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `batch_branch_confirmation_recovery` -- DROP TABLE IF EXISTS `batch_branch_confirmation_recovery`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `batch_branch_confirmation_recovery` ( `RECOVERY_ID` int(11) NOT NULL auto_increment, `BRANCH_CASH_CONFIRMATION_REPORT_ID` int(11) NOT NULL, `PRODUCT_NAME` varchar(50) NOT NULL, `DUE` decimal(20,3) NOT NULL, `DUE_CURRENCY_ID` smallint(6) NOT NULL, `ACTUAL` decimal(20,3) NOT NULL, `ACTUAL_CURRENCY_ID` smallint(6) NOT NULL, `ARREARS` decimal(20,3) NOT NULL, `ARREARS_CURRENCY_ID` smallint(6) NOT NULL, PRIMARY KEY (`RECOVERY_ID`), KEY `BRANCH_CASH_CONFIRMATION_REPORT_ID` (`BRANCH_CASH_CONFIRMATION_REPORT_ID`), CONSTRAINT `batch_branch_confirmation_recovery_ibfk_1` FOREIGN KEY (`BRANCH_CASH_CONFIRMATION_REPORT_ID`) REFERENCES `batch_branch_cash_confirmation_report` (`BRANCH_CASH_CONFIRMATION_REPORT_ID`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `batch_branch_report` -- DROP TABLE IF EXISTS `batch_branch_report`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `batch_branch_report` ( `BRANCH_REPORT_ID` int(11) NOT NULL auto_increment, `BRANCH_ID` smallint(6) NOT NULL, `RUN_DATE` date NOT NULL, PRIMARY KEY (`BRANCH_REPORT_ID`) ) ENGINE=InnoDB AUTO_INCREMENT=17060 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `batch_client_summary` -- DROP TABLE IF EXISTS `batch_client_summary`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `batch_client_summary` ( `CLIENT_SUMMARY_ID` int(11) NOT NULL auto_increment, `BRANCH_REPORT_ID` int(11) NOT NULL, `FIELD_NAME` varchar(50) NOT NULL, `TOTAL` varchar(50) default NULL, `VPOOR_TOTAL` varchar(50) default NULL, PRIMARY KEY (`CLIENT_SUMMARY_ID`), KEY `BRANCH_REPORT_ID` (`BRANCH_REPORT_ID`), CONSTRAINT `batch_client_summary_ibfk_1` FOREIGN KEY (`BRANCH_REPORT_ID`) REFERENCES `batch_branch_report` (`BRANCH_REPORT_ID`) ) ENGINE=InnoDB AUTO_INCREMENT=204709 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `batch_loan_arrears_aging` -- DROP TABLE IF EXISTS `batch_loan_arrears_aging`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `batch_loan_arrears_aging` ( `LOAN_ARREARS_AGING_ID` int(11) NOT NULL auto_increment, `AGING_PERIOD_ID` int(11) NOT NULL, `BRANCH_REPORT_ID` int(11) NOT NULL, `CLIENTS_AGING` int(11) NOT NULL, `LOANS_AGING` int(11) NOT NULL, `AMOUNT_AGING` decimal(20,3) NOT NULL, `AMOUNT_AGING_CURRENCY_ID` smallint(6) NOT NULL, `AMOUNT_OUTSTANDING_AGING` decimal(20,3) NOT NULL, `AMOUNT_OUTSTANDING_AGING_CURRENCY_ID` smallint(6) NOT NULL, `INTEREST_AGING` decimal(20,3) NOT NULL, `INTEREST_AGING_CURRENCY_ID` smallint(6) NOT NULL, PRIMARY KEY (`LOAN_ARREARS_AGING_ID`), KEY `BRANCH_REPORT_ID` (`BRANCH_REPORT_ID`), CONSTRAINT `batch_loan_arrears_aging_ibfk_1` FOREIGN KEY (`BRANCH_REPORT_ID`) REFERENCES `batch_branch_report` (`BRANCH_REPORT_ID`) ) ENGINE=InnoDB AUTO_INCREMENT=119414 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `batch_loan_arrears_profile` -- DROP TABLE IF EXISTS `batch_loan_arrears_profile`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `batch_loan_arrears_profile` ( `LOAN_ARREARS_PROFILE_ID` int(11) NOT NULL auto_increment, `BRANCH_REPORT_ID` int(11) NOT NULL, `LOANS_IN_ARREARS` int(11) NOT NULL, `CLIENTS_IN_ARREARS` int(11) NOT NULL, `OVERDUE_BALANCE` decimal(20,3) NOT NULL, `OVERDUE_BALANCE_CURRENCY_ID` smallint(6) NOT NULL, `UNPAID_BALANCE` decimal(20,3) NOT NULL, `UNPAID_BALANCE_CURRENCY_ID` smallint(6) NOT NULL, `LOANS_AT_RISK` int(11) NOT NULL, `OUTSTANDING_AMOUNT_AT_RISK` decimal(20,3) NOT NULL, `OUTSTANDING_AMOUNT_AT_RISK_CURRENCY_ID` smallint(6) NOT NULL, `OVERDUE_AMOUNT_AT_RISK` decimal(20,3) NOT NULL, `OVERDUE_AMOUNT_AT_RISK_CURRENCY_ID` smallint(6) NOT NULL, `CLIENTS_AT_RISK` int(11) NOT NULL, PRIMARY KEY (`LOAN_ARREARS_PROFILE_ID`), KEY `BRANCH_REPORT_ID` (`BRANCH_REPORT_ID`), CONSTRAINT `batch_loan_arrears_profile_ibfk_1` FOREIGN KEY (`BRANCH_REPORT_ID`) REFERENCES `batch_branch_report` (`BRANCH_REPORT_ID`) ) ENGINE=InnoDB AUTO_INCREMENT=17060 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `batch_loan_details` -- DROP TABLE IF EXISTS `batch_loan_details`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `batch_loan_details` ( `LOAN_DETAILS_ID` int(11) NOT NULL auto_increment, `BRANCH_REPORT_ID` int(11) NOT NULL, `PRODUCT_NAME` varchar(50) NOT NULL, `NUMBER_OF_LOANS_ISSUED` int(11) NOT NULL, `LOAN_AMOUNT_ISSUED` decimal(20,3) NOT NULL, `LOAN_AMOUNT_ISSUED_CURRENCY_ID` smallint(6) NOT NULL, `LOAN_INTEREST_ISSUED` decimal(20,3) NOT NULL, `LOAN_INTEREST_ISSUED_CURRENCY_ID` smallint(6) NOT NULL, `NUMBER_OF_LOANS_OUTSTANDING` int(11) NOT NULL, `LOAN_OUTSTANDING_AMOUNT` decimal(20,3) NOT NULL, `LOAN_OUTSTANDING_AMOUNT_CURRENCY_ID` smallint(6) NOT NULL, `LOAN_OUTSTANDING_INTEREST` decimal(20,3) NOT NULL, `LOAN_OUTSTANDING_INTEREST_CURRENCY_ID` smallint(6) NOT NULL, PRIMARY KEY (`LOAN_DETAILS_ID`), KEY `BRANCH_REPORT_ID` (`BRANCH_REPORT_ID`), CONSTRAINT `batch_loan_details_ibfk_1` FOREIGN KEY (`BRANCH_REPORT_ID`) REFERENCES `batch_branch_report` (`BRANCH_REPORT_ID`) ) ENGINE=InnoDB AUTO_INCREMENT=129444 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `batch_staff_summary` -- DROP TABLE IF EXISTS `batch_staff_summary`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `batch_staff_summary` ( `STAFF_SUMMARY_ID` int(11) NOT NULL auto_increment, `BRANCH_REPORT_ID` int(11) NOT NULL, `PERSONNEL_ID` smallint(6) NOT NULL, `PERSONNEL_NAME` varchar(50) NOT NULL, `JOINING_DATE` date default NULL, `ACTIVE_BORROWERS` int(11) NOT NULL, `ACTIVE_LOANS` int(11) NOT NULL, `CENTER_COUNT` int(11) NOT NULL, `CLIENT_COUNT` int(11) NOT NULL, `LOAN_AMOUNT_OUTSTANDING` decimal(20,3) NOT NULL, `LOAN_AMOUNT_OUTSTANDING_CURRENCY_ID` smallint(6) NOT NULL, `INTEREST_FEES_OUTSTANDING` decimal(20,3) NOT NULL, `INTEREST_FEES_OUTSTANDING_CURRENCY_ID` smallint(6) NOT NULL, `PORTFOLIO_AT_RISK` decimal(20,3) NOT NULL, `TOTAL_CLIENTS_ENROLLED` int(11) NOT NULL, `CLIENTS_ENROLLED_THIS_MONTH` int(11) NOT NULL, `LOAN_ARREARS_AMOUNT` decimal(20,3) NOT NULL, `LOAN_ARREARS_AMOUNT_CURRENCY_ID` smallint(6) NOT NULL, PRIMARY KEY (`STAFF_SUMMARY_ID`), KEY `BRANCH_REPORT_ID` (`BRANCH_REPORT_ID`), CONSTRAINT `batch_staff_summary_ibfk_1` FOREIGN KEY (`BRANCH_REPORT_ID`) REFERENCES `batch_branch_report` (`BRANCH_REPORT_ID`) ) ENGINE=InnoDB AUTO_INCREMENT=124919 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `batch_staffing_level_summary` -- DROP TABLE IF EXISTS `batch_staffing_level_summary`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `batch_staffing_level_summary` ( `STAFFING_LEVEL_SUMMARY_ID` int(11) NOT NULL auto_increment, `BRANCH_REPORT_ID` int(11) NOT NULL, `ROLE_ID` int(11) NOT NULL, `ROLE_NAME` varchar(50) NOT NULL, `PERSONNEL_COUNT` int(11) NOT NULL, PRIMARY KEY (`STAFFING_LEVEL_SUMMARY_ID`), KEY `BRANCH_REPORT_ID` (`BRANCH_REPORT_ID`), CONSTRAINT `batch_staffing_level_summary_ibfk_1` FOREIGN KEY (`BRANCH_REPORT_ID`) REFERENCES `batch_branch_report` (`BRANCH_REPORT_ID`) ) ENGINE=InnoDB AUTO_INCREMENT=59509 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `branch_ho_update` -- DROP TABLE IF EXISTS `branch_ho_update`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `branch_ho_update` ( `OFFICE_ID` smallint(6) NOT NULL default '0', `LAST_UPDATED_DATE` date default NULL, PRIMARY KEY (`OFFICE_ID`), CONSTRAINT `branch_ho_update_ibfk_1` FOREIGN KEY (`OFFICE_ID`) REFERENCES `office` (`OFFICE_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `branchinfo` -- DROP TABLE IF EXISTS `branchinfo`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `branchinfo` ( `office_id` int(10) NOT NULL default '0', `Branch_Name` varchar(255) character set latin1 default NULL, `District` varchar(255) character set latin1 default NULL, `Region` varchar(255) character set latin1 default NULL, `AM` varchar(255) character set latin1 default NULL, `DM` varchar(255) character set latin1 default NULL, `AGM` varchar(255) character set latin1 default NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `category_type` -- DROP TABLE IF EXISTS `category_type`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `category_type` ( `CATEGORY_ID` smallint(6) NOT NULL default '0', `CATEGORY_LOOKUP_ID` int(11) NOT NULL default '0', PRIMARY KEY (`CATEGORY_ID`), KEY `CATEGORY_LOOKUP_ID` (`CATEGORY_LOOKUP_ID`), CONSTRAINT `category_type_ibfk_1` FOREIGN KEY (`CATEGORY_LOOKUP_ID`) REFERENCES `lookup_value` (`LOOKUP_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `change_log` -- DROP TABLE IF EXISTS `change_log`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `change_log` ( `CHANGE_LOG_ID` int(11) NOT NULL auto_increment, `CHANGED_BY` smallint(6) NOT NULL default '0', `MODIFIER_NAME` varchar(50) NOT NULL default '', `ENTITY_ID` int(11) default NULL, `ENTITY_TYPE` smallint(6) default NULL, `CHANGED_DATE` date default NULL, `FIELDS_CHANGED` varchar(250) default NULL, PRIMARY KEY (`CHANGE_LOG_ID`), KEY `CHANGED_BY` (`CHANGED_BY`), KEY `CHANGE_LOG_IDX` (`ENTITY_TYPE`,`ENTITY_ID`,`CHANGED_DATE`), CONSTRAINT `change_log_ibfk_1` FOREIGN KEY (`CHANGED_BY`) REFERENCES `personnel` (`PERSONNEL_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=304848 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `change_log_detail` -- DROP TABLE IF EXISTS `change_log_detail`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `change_log_detail` ( `SEQUENCE_NUM` int(11) NOT NULL auto_increment, `CHANGE_LOG_ID` int(11) NOT NULL default '0', `FIELD_NAME` varchar(100) default NULL, `OLD_VALUE` varchar(200) default NULL, `NEW_VALUE` varchar(200) default NULL, PRIMARY KEY (`SEQUENCE_NUM`), KEY `CHANGE_LOG_ID` (`CHANGE_LOG_ID`), CONSTRAINT `change_log_detail_ibfk_1` FOREIGN KEY (`CHANGE_LOG_ID`) REFERENCES `change_log` (`CHANGE_LOG_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=395568 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `checklist` -- DROP TABLE IF EXISTS `checklist`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `checklist` ( `CHECKLIST_ID` smallint(6) NOT NULL auto_increment, `CHECKLIST_NAME` varchar(100) default NULL, `CHECKLIST_STATUS` smallint(6) NOT NULL default '1', `LOCALE_ID` smallint(6) NOT NULL default '0', `CREATED_BY` smallint(6) default NULL, `CREATED_DATE` date default NULL, `UPDATED_BY` smallint(6) default NULL, `UPDATED_DATE` date default NULL, PRIMARY KEY (`CHECKLIST_ID`), KEY `LOCALE_ID` (`LOCALE_ID`), KEY `CREATED_BY` (`CREATED_BY`), KEY `UPDATED_BY` (`UPDATED_BY`), CONSTRAINT `checklist_ibfk_1` FOREIGN KEY (`LOCALE_ID`) REFERENCES `supported_locale` (`LOCALE_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `checklist_ibfk_2` FOREIGN KEY (`CREATED_BY`) REFERENCES `personnel` (`PERSONNEL_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `checklist_ibfk_3` FOREIGN KEY (`UPDATED_BY`) REFERENCES `personnel` (`PERSONNEL_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `checklist_detail` -- DROP TABLE IF EXISTS `checklist_detail`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `checklist_detail` ( `DETAIL_ID` int(11) NOT NULL auto_increment, `CHECKLIST_ID` smallint(6) default NULL, `LOCALE_ID` smallint(6) default NULL, `DETAIL_TEXT` varchar(250) default NULL, `ANSWER_TYPE` smallint(6) NOT NULL default '0', PRIMARY KEY (`DETAIL_ID`), KEY `LOCALE_ID` (`LOCALE_ID`), KEY `CHK_DETAIL_IDX` (`CHECKLIST_ID`,`LOCALE_ID`), CONSTRAINT `checklist_detail_ibfk_1` FOREIGN KEY (`CHECKLIST_ID`) REFERENCES `checklist` (`CHECKLIST_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `checklist_detail_ibfk_2` FOREIGN KEY (`LOCALE_ID`) REFERENCES `supported_locale` (`LOCALE_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `claccount` -- DROP TABLE IF EXISTS `claccount`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `claccount` ( `account_id` int(11) NOT NULL default '0', `account_state_id` smallint(6) default NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `client_initial_savings_offering` -- DROP TABLE IF EXISTS `client_initial_savings_offering`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `client_initial_savings_offering` ( `CLIENT_OFFERING_ID` int(11) NOT NULL auto_increment, `CUSTOMER_ID` int(11) NOT NULL default '0', `PRD_OFFERING_ID` smallint(6) NOT NULL default '0', PRIMARY KEY (`CLIENT_OFFERING_ID`), KEY `CUSTOMER_ID` (`CUSTOMER_ID`), KEY `PRD_OFFERING_ID` (`PRD_OFFERING_ID`), CONSTRAINT `client_initial_savings_offering_ibfk_1` FOREIGN KEY (`CUSTOMER_ID`) REFERENCES `customer` (`CUSTOMER_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `client_initial_savings_offering_ibfk_2` FOREIGN KEY (`PRD_OFFERING_ID`) REFERENCES `prd_offering` (`PRD_OFFERING_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `client_perf_history` -- DROP TABLE IF EXISTS `client_perf_history`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `client_perf_history` ( `ID` int(11) NOT NULL auto_increment, `CUSTOMER_ID` int(11) NOT NULL default '0', `LAST_LOAN_AMNT` decimal(10,3) default NULL, `LAST_LOAN_AMNT_CURRENCY_ID` smallint(6) default NULL, `TOTAL_ACTIVE_LOANS` smallint(6) default NULL, `TOTAL_SAVINGS_AMNT` decimal(10,3) default NULL, `TOTAL_SAVINGS_AMNT_CURRENCY_ID` smallint(6) default NULL, `DELINQUINT_PORTFOLIO` decimal(10,3) default NULL, `DELINQUINT_PORTFOLIO_CURRENCY_ID` smallint(6) default NULL, PRIMARY KEY (`ID`), KEY `CUSTOMER_ID` (`CUSTOMER_ID`), CONSTRAINT `client_perf_history_ibfk_1` FOREIGN KEY (`CUSTOMER_ID`) REFERENCES `customer` (`CUSTOMER_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=312231 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `coa` -- DROP TABLE IF EXISTS `coa`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `coa` ( `COA_ID` smallint(6) NOT NULL auto_increment, `COA_Name` varchar(150) NOT NULL default '', `GLCODE_ID` smallint(6) NOT NULL default '0', `CATEGORY_TYPE` varchar(20) default NULL, PRIMARY KEY (`COA_ID`), KEY `GLCODE_ID` (`GLCODE_ID`), CONSTRAINT `coa_ibfk_1` FOREIGN KEY (`GLCODE_ID`) REFERENCES `gl_code` (`GLCODE_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=58 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `coa_idmapper` -- DROP TABLE IF EXISTS `coa_idmapper`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `coa_idmapper` ( `CONSTANT_ID` smallint(6) NOT NULL default '0', `COA_ID` smallint(6) NOT NULL default '0', `DESCRIPTION` varchar(50) default NULL, PRIMARY KEY (`CONSTANT_ID`), KEY `COA_ID` (`COA_ID`), CONSTRAINT `coa_idmapper_ibfk_1` FOREIGN KEY (`COA_ID`) REFERENCES `coa` (`COA_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `coahierarchy` -- DROP TABLE IF EXISTS `coahierarchy`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `coahierarchy` ( `COA_ID` smallint(6) NOT NULL default '0', `PARENT_COAID` smallint(6) default NULL, KEY `COA_ID` (`COA_ID`), KEY `PARENT_COAID` (`PARENT_COAID`), CONSTRAINT `coahierarchy_ibfk_1` FOREIGN KEY (`COA_ID`) REFERENCES `coa` (`COA_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `coahierarchy_ibfk_2` FOREIGN KEY (`PARENT_COAID`) REFERENCES `coa` (`COA_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `coll_sheet` -- DROP TABLE IF EXISTS `coll_sheet`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `coll_sheet` ( `COLL_SHEET_ID` int(11) NOT NULL auto_increment, `COLL_SHEET_DATE` date NOT NULL default '0000-00-00', `STATUS_FLAG` smallint(6) NOT NULL default '0', `RUN_DATE` date NOT NULL default '0000-00-00', PRIMARY KEY (`COLL_SHEET_ID`) ) ENGINE=InnoDB AUTO_INCREMENT=99 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `coll_sheet_customer` -- DROP TABLE IF EXISTS `coll_sheet_customer`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `coll_sheet_customer` ( `COLL_SHEET_CUST_ID` bigint(20) NOT NULL auto_increment, `COLL_SHEET_ID` int(11) NOT NULL default '0', `CUST_ID` int(11) NOT NULL default '0', `CUST_DISPLAY_NAME` varchar(200) NOT NULL default '', `TOTAL_DUE_SAVINGS_LOAN` decimal(10,3) default NULL, `TOTAL_DUE_SAVINGS_LOAN_CURRENCY` smallint(6) default NULL, `CUST_ACCNT_FEE` decimal(10,3) default NULL, `CUST_ACCNT_FEE_CURRENCY` smallint(6) default NULL, `CUST__ACCNT_PENALTY` decimal(10,3) default NULL, `CUST__ACCNT_PENALTY_CURRENCY` smallint(6) default NULL, `CUST_LEVEL` smallint(6) NOT NULL default '0', `CUST_ACCNT_ID` int(11) default NULL, `CUST_OFFICE_ID` smallint(6) NOT NULL default '0', `SEARCH_ID` varchar(100) NOT NULL default '', `PARENT_CUSTOMER_ID` int(11) default NULL, `COLLECTIVE_LN_AMNT_DUE` decimal(10,3) default NULL, `COLLECTIVE_LN_AMNT_DUE_CURRENCY` smallint(6) default NULL, `COLLECTIVE_LN_DISBURSAL` decimal(10,3) default NULL, `COLLECTIVE_LN_DISBURSAL_CURRENCY` smallint(6) default NULL, `COLLECTIVE_SAVINGS_DUE` decimal(10,3) default NULL, `COLLECTIVE_SAVINGS_DUE_CURRENCY` smallint(6) default NULL, `COLLECTIVE_ACCNT_CHARGES` decimal(10,3) default NULL, `COLLECTIVE_ACCNT_CHARGES_CURRENCY` smallint(6) default NULL, `COLLECTIVE_TOTAL_CHARGES` decimal(10,3) default NULL, `COLLECTIVE_TOTAL_CHARGES_CURRENCY` smallint(6) default NULL, `COLLECTIVE_NET_CASH_IN` decimal(10,3) default NULL, `COLLECTIVE_NET_CASH_IN_CURRENCY` smallint(6) default NULL, `LOAN_OFFICER_ID` smallint(6) default NULL, PRIMARY KEY (`COLL_SHEET_CUST_ID`), KEY `TOTAL_DUE_SAVINGS_LOAN_CURRENCY` (`TOTAL_DUE_SAVINGS_LOAN_CURRENCY`), KEY `CUST_ACCNT_FEE_CURRENCY` (`CUST_ACCNT_FEE_CURRENCY`), KEY `CUST__ACCNT_PENALTY_CURRENCY` (`CUST__ACCNT_PENALTY_CURRENCY`), KEY `COLLECTIVE_LN_AMNT_DUE_CURRENCY` (`COLLECTIVE_LN_AMNT_DUE_CURRENCY`), KEY `COLLECTIVE_LN_DISBURSAL_CURRENCY` (`COLLECTIVE_LN_DISBURSAL_CURRENCY`), KEY `COLLECTIVE_SAVINGS_DUE_CURRENCY` (`COLLECTIVE_SAVINGS_DUE_CURRENCY`), KEY `COLLECTIVE_ACCNT_CHARGES_CURRENCY` (`COLLECTIVE_ACCNT_CHARGES_CURRENCY`), KEY `COLLECTIVE_TOTAL_CHARGES_CURRENCY` (`COLLECTIVE_TOTAL_CHARGES_CURRENCY`), KEY `COLLECTIVE_NET_CASH_IN_CURRENCY` (`COLLECTIVE_NET_CASH_IN_CURRENCY`), CONSTRAINT `coll_sheet_customer_ibfk_1` FOREIGN KEY (`TOTAL_DUE_SAVINGS_LOAN_CURRENCY`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `coll_sheet_customer_ibfk_2` FOREIGN KEY (`CUST_ACCNT_FEE_CURRENCY`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `coll_sheet_customer_ibfk_3` FOREIGN KEY (`CUST__ACCNT_PENALTY_CURRENCY`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `coll_sheet_customer_ibfk_4` FOREIGN KEY (`COLLECTIVE_LN_AMNT_DUE_CURRENCY`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `coll_sheet_customer_ibfk_5` FOREIGN KEY (`COLLECTIVE_LN_DISBURSAL_CURRENCY`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `coll_sheet_customer_ibfk_6` FOREIGN KEY (`COLLECTIVE_SAVINGS_DUE_CURRENCY`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `coll_sheet_customer_ibfk_7` FOREIGN KEY (`COLLECTIVE_ACCNT_CHARGES_CURRENCY`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `coll_sheet_customer_ibfk_8` FOREIGN KEY (`COLLECTIVE_TOTAL_CHARGES_CURRENCY`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `coll_sheet_customer_ibfk_9` FOREIGN KEY (`COLLECTIVE_NET_CASH_IN_CURRENCY`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=67220 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `coll_sheet_loan_details` -- DROP TABLE IF EXISTS `coll_sheet_loan_details`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `coll_sheet_loan_details` ( `LOAN_DETAILS_ID` bigint(20) NOT NULL auto_increment, `COLL_SHEET_CUST_ID` bigint(20) NOT NULL default '0', `ACCNT_ID` int(11) NOT NULL default '0', `TOTAL_PRIN_DUE` decimal(10,3) NOT NULL default '0.000', `TOTAL_PRIN_DUE_CURRENCY` smallint(6) default NULL, `ORIG_LOAN_AMNT` decimal(10,3) NOT NULL default '0.000', `ORIG_LOAN_AMNT_CURRENCY` smallint(6) default NULL, `AMNT_TO_CLOSE_LOAN` decimal(10,3) NOT NULL default '0.000', `AMNT_TO_CLOSE_LOAN_CURRENCY` smallint(6) default NULL, `TOTAL_NO_OF_INSTALLMENTS` smallint(6) NOT NULL default '0', `CURRENT_INSTALLMENT_NO` smallint(6) default NULL, `PRINCIPAL_DUE` decimal(10,3) default NULL, `PRINCIPAL_DUE_CURRENCY` smallint(6) default NULL, `INTEREST_DUE` decimal(10,3) default NULL, `INTEREST_DUE_CURRENCY` smallint(6) default NULL, `FEES_DUE` decimal(10,3) default NULL, `FEES_DUE_CURRENCY` smallint(6) default NULL, `PENALTY_DUE` decimal(10,3) default NULL, `PENALTY_DUE_CURRENCY` smallint(6) default NULL, `TOTAL_SCHEDULED_AMNT_DUE` decimal(10,3) default NULL, `TOTAL_SCHEDULED_AMNT_DUE_CURRENCY` smallint(6) default NULL, `PRINCIPAL_OVERDUE` decimal(10,3) default NULL, `PRINCIPAL_OVERDUE_CURRENCY` smallint(6) default NULL, `INTEREST_OVERDUE` decimal(10,3) default NULL, `INTEREST_OVERDUE_CURRENCY` smallint(6) default NULL, `FEES_OVERDUE` decimal(10,3) default NULL, `FEES_OVERDUE_CURRENCY` smallint(6) default NULL, `PENALTY_OVERDUE` decimal(10,3) default NULL, `PENALTY_OVERDUE_CURRENCY` smallint(6) default NULL, `TOTAL_AMNT_OVERDUE` decimal(10,3) default NULL, `TOTAL_AMNT_OVERDUE_CURRENCY` smallint(6) default NULL, `TOTAL_AMNT_DUE` decimal(10,3) default NULL, `TOTAL_AMNT_DUE_CURRENCY` smallint(6) default NULL, `AMNT_TOBE_DISBURSED` decimal(10,3) default NULL, `AMNT_TOBE_DISBURSED_CURRENCY` smallint(6) default NULL, PRIMARY KEY (`LOAN_DETAILS_ID`), KEY `ORIG_LOAN_AMNT_CURRENCY` (`ORIG_LOAN_AMNT_CURRENCY`), KEY `AMNT_TO_CLOSE_LOAN_CURRENCY` (`AMNT_TO_CLOSE_LOAN_CURRENCY`), KEY `PRINCIPAL_DUE_CURRENCY` (`PRINCIPAL_DUE_CURRENCY`), KEY `INTEREST_DUE_CURRENCY` (`INTEREST_DUE_CURRENCY`), KEY `FEES_DUE_CURRENCY` (`FEES_DUE_CURRENCY`), KEY `PENALTY_DUE_CURRENCY` (`PENALTY_DUE_CURRENCY`), KEY `TOTAL_SCHEDULED_AMNT_DUE_CURRENCY` (`TOTAL_SCHEDULED_AMNT_DUE_CURRENCY`), KEY `PRINCIPAL_OVERDUE_CURRENCY` (`PRINCIPAL_OVERDUE_CURRENCY`), KEY `INTEREST_OVERDUE_CURRENCY` (`INTEREST_OVERDUE_CURRENCY`), KEY `FEES_OVERDUE_CURRENCY` (`FEES_OVERDUE_CURRENCY`), KEY `PENALTY_OVERDUE_CURRENCY` (`PENALTY_OVERDUE_CURRENCY`), KEY `TOTAL_AMNT_OVERDUE_CURRENCY` (`TOTAL_AMNT_OVERDUE_CURRENCY`), KEY `TOTAL_AMNT_DUE_CURRENCY` (`TOTAL_AMNT_DUE_CURRENCY`), KEY `AMNT_TOBE_DISBURSED_CURRENCY` (`AMNT_TOBE_DISBURSED_CURRENCY`), KEY `TOTAL_PRIN_DUE_CURRENCY` (`TOTAL_PRIN_DUE_CURRENCY`), CONSTRAINT `coll_sheet_loan_details_ibfk_1` FOREIGN KEY (`ORIG_LOAN_AMNT_CURRENCY`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `coll_sheet_loan_details_ibfk_10` FOREIGN KEY (`FEES_OVERDUE_CURRENCY`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `coll_sheet_loan_details_ibfk_11` FOREIGN KEY (`PENALTY_OVERDUE_CURRENCY`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `coll_sheet_loan_details_ibfk_12` FOREIGN KEY (`TOTAL_AMNT_OVERDUE_CURRENCY`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `coll_sheet_loan_details_ibfk_13` FOREIGN KEY (`TOTAL_AMNT_DUE_CURRENCY`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `coll_sheet_loan_details_ibfk_14` FOREIGN KEY (`AMNT_TOBE_DISBURSED_CURRENCY`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `coll_sheet_loan_details_ibfk_15` FOREIGN KEY (`TOTAL_PRIN_DUE_CURRENCY`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `coll_sheet_loan_details_ibfk_2` FOREIGN KEY (`AMNT_TO_CLOSE_LOAN_CURRENCY`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `coll_sheet_loan_details_ibfk_3` FOREIGN KEY (`PRINCIPAL_DUE_CURRENCY`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `coll_sheet_loan_details_ibfk_4` FOREIGN KEY (`INTEREST_DUE_CURRENCY`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `coll_sheet_loan_details_ibfk_5` FOREIGN KEY (`FEES_DUE_CURRENCY`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `coll_sheet_loan_details_ibfk_6` FOREIGN KEY (`PENALTY_DUE_CURRENCY`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `coll_sheet_loan_details_ibfk_7` FOREIGN KEY (`TOTAL_SCHEDULED_AMNT_DUE_CURRENCY`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `coll_sheet_loan_details_ibfk_8` FOREIGN KEY (`PRINCIPAL_OVERDUE_CURRENCY`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `coll_sheet_loan_details_ibfk_9` FOREIGN KEY (`INTEREST_OVERDUE_CURRENCY`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=80500 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `coll_sheet_savings_details` -- DROP TABLE IF EXISTS `coll_sheet_savings_details`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `coll_sheet_savings_details` ( `SAVINGS_DETAILS_ID` bigint(20) NOT NULL auto_increment, `COLL_SHEET_CUST_ID` int(11) NOT NULL default '0', `ACCNT_ID` int(11) NOT NULL default '0', `ACCNT_BALANCE` decimal(10,3) default NULL, `ACCNT_BALANCE_CURRENCY` smallint(6) default NULL, `RECOMMENDED_AMNT_DUE` decimal(10,3) default NULL, `RECOMMENDED_AMNT_DUE_CURRENCY` smallint(6) default NULL, `AMNT_OVERDUE` decimal(10,3) default NULL, `AMNT_OVERDUE_CURRENCY` smallint(6) default NULL, `INSTALLMENT_ID` smallint(6) NOT NULL default '0', `TOTAL_SAVINGS_AMNT_DUE` decimal(10,3) default NULL, `TOTAL_SAVINGS_AMNT_DUE_CURRENCY` smallint(6) default NULL, PRIMARY KEY (`SAVINGS_DETAILS_ID`), KEY `ACCNT_BALANCE_CURRENCY` (`ACCNT_BALANCE_CURRENCY`), KEY `RECOMMENDED_AMNT_DUE_CURRENCY` (`RECOMMENDED_AMNT_DUE_CURRENCY`), KEY `AMNT_OVERDUE_CURRENCY` (`AMNT_OVERDUE_CURRENCY`), KEY `TOTAL_SAVINGS_AMNT_DUE_CURRENCY` (`TOTAL_SAVINGS_AMNT_DUE_CURRENCY`), CONSTRAINT `coll_sheet_savings_details_ibfk_1` FOREIGN KEY (`ACCNT_BALANCE_CURRENCY`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `coll_sheet_savings_details_ibfk_2` FOREIGN KEY (`RECOMMENDED_AMNT_DUE_CURRENCY`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `coll_sheet_savings_details_ibfk_3` FOREIGN KEY (`AMNT_OVERDUE_CURRENCY`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `coll_sheet_savings_details_ibfk_4` FOREIGN KEY (`TOTAL_SAVINGS_AMNT_DUE_CURRENCY`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `config_key_value_integer` -- DROP TABLE IF EXISTS `config_key_value_integer`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `config_key_value_integer` ( `CONFIGURATION_ID` int(11) NOT NULL auto_increment, `CONFIGURATION_KEY` varchar(100) NOT NULL, `CONFIGURATION_VALUE` int(11) NOT NULL, PRIMARY KEY (`CONFIGURATION_ID`), UNIQUE KEY `CONFIGURATION_KEY` (`CONFIGURATION_KEY`) ) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `country` -- DROP TABLE IF EXISTS `country`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `country` ( `COUNTRY_ID` smallint(6) NOT NULL default '0', `COUNTRY_NAME` varchar(100) default NULL, `COUNTRY_SHORT_NAME` varchar(10) default NULL, PRIMARY KEY (`COUNTRY_ID`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `currency` -- DROP TABLE IF EXISTS `currency`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `currency` ( `CURRENCY_ID` smallint(6) NOT NULL auto_increment, `CURRENCY_NAME` varchar(50) default NULL, `DISPLAY_SYMBOL` varchar(50) default NULL, `ROUNDING_MODE` smallint(6) default NULL, `ROUNDING_AMOUNT` decimal(6,3) default NULL, `DEFAULT_CURRENCY` smallint(6) default NULL, `DEFAULT_DIGITS_AFTER_DECIMAL` smallint(6) NOT NULL default '0', `CURRENCY_CODE` varchar(3) default NULL, PRIMARY KEY (`CURRENCY_ID`) ) ENGINE=InnoDB AUTO_INCREMENT=180 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `cust_perf_history` -- DROP TABLE IF EXISTS `cust_perf_history`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `cust_perf_history` ( `CUSTOMER_ID` int(11) NOT NULL default '0', `LOAN_CYCLE_COUNTER` smallint(6) default NULL, `LAST_LOAN_AMNT` decimal(10,3) default NULL, `ACTIVE_LOANS_COUNT` smallint(6) default NULL, `TOTAL_SAVINGS_AMNT` decimal(10,3) default NULL, `DELINQUINT_PORTFOLIO` decimal(10,3) default NULL, PRIMARY KEY (`CUSTOMER_ID`), CONSTRAINT `cust_perf_history_ibfk_1` FOREIGN KEY (`CUSTOMER_ID`) REFERENCES `customer` (`CUSTOMER_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `custom_field_definition` -- DROP TABLE IF EXISTS `custom_field_definition`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `custom_field_definition` ( `FIELD_ID` smallint(6) NOT NULL auto_increment, `ENTITY_ID` smallint(6) NOT NULL default '0', `LEVEL_ID` smallint(6) default NULL, `FIELD_TYPE` smallint(6) default NULL, `ENTITY_TYPE` smallint(6) NOT NULL default '0', `MANDATORY_FLAG` smallint(6) NOT NULL default '0', `DEFAULT_VALUE` varchar(200) default NULL, PRIMARY KEY (`FIELD_ID`), KEY `LEVEL_ID` (`LEVEL_ID`), KEY `ENTITY_ID` (`ENTITY_ID`), KEY `ENTITY_TYPE` (`ENTITY_TYPE`), CONSTRAINT `custom_field_definition_ibfk_1` FOREIGN KEY (`LEVEL_ID`) REFERENCES `customer_level` (`LEVEL_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `custom_field_definition_ibfk_2` FOREIGN KEY (`ENTITY_ID`) REFERENCES `lookup_entity` (`ENTITY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `custom_field_definition_ibfk_3` FOREIGN KEY (`ENTITY_TYPE`) REFERENCES `entity_master` (`ENTITY_TYPE_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `customer` -- DROP TABLE IF EXISTS `customer`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `customer` ( `CUSTOMER_ID` int(11) NOT NULL auto_increment, `CUSTOMER_LEVEL_ID` smallint(6) NOT NULL default '0', `GLOBAL_CUST_NUM` varchar(100) default NULL, `LOAN_OFFICER_ID` smallint(6) default NULL, `CUSTOMER_FORMEDBY_ID` smallint(6) default NULL, `STATUS_ID` smallint(6) default NULL, `BRANCH_ID` smallint(6) default NULL, `DISPLAY_NAME` varchar(200) default NULL, `DISPLAY_ADDRESS` text, `EXTERNAL_ID` varchar(50) default NULL, `DATE_OF_BIRTH` date default NULL, `GROUP_FLAG` smallint(6) default NULL, `TRAINED` smallint(6) default NULL, `TRAINED_DATE` date default NULL, `PARENT_CUSTOMER_ID` int(11) default NULL, `CREATED_DATE` date default NULL, `UPDATED_DATE` date default NULL, `SEARCH_ID` varchar(100) default NULL, `MAX_CHILD_COUNT` int(11) default NULL, `HO_UPDATED` smallint(6) default NULL, `CLIENT_CONFIDENTIAL` smallint(6) default NULL, `MFI_JOINING_DATE` date default NULL, `GOVERNMENT_ID` varchar(50) default NULL, `CUSTOMER_ACTIVATION_DATE` date default NULL, `CREATED_BY` smallint(6) default NULL, `UPDATED_BY` smallint(6) default NULL, `BLACKLISTED` smallint(6) default NULL, `DISCRIMINATOR` varchar(20) default NULL, `VERSION_NO` int(11) NOT NULL default '0', `FIRST_NAME` varchar(200) default NULL, `LAST_NAME` varchar(200) default NULL, `SECOND_LAST_NAME` varchar(200) default NULL, PRIMARY KEY (`CUSTOMER_ID`), UNIQUE KEY `CUST_GLOBAL_IDX` (`GLOBAL_CUST_NUM`), KEY `CUSTOMER_LEVEL_ID` (`CUSTOMER_LEVEL_ID`), KEY `STATUS_ID` (`STATUS_ID`), KEY `BRANCH_ID` (`BRANCH_ID`), KEY `CUSTOMER_FORMEDBY_ID` (`CUSTOMER_FORMEDBY_ID`), KEY `CUST_LO_IDX` (`LOAN_OFFICER_ID`,`BRANCH_ID`), KEY `CUST_ACIVE_DATE_IDX` (`CUSTOMER_ACTIVATION_DATE`), KEY `CUST_SEARCH_IDX` USING BTREE (`SEARCH_ID`), CONSTRAINT `customer_ibfk_1` FOREIGN KEY (`CUSTOMER_LEVEL_ID`) REFERENCES `customer_level` (`LEVEL_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `customer_ibfk_2` FOREIGN KEY (`STATUS_ID`) REFERENCES `customer_state` (`STATUS_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `customer_ibfk_3` FOREIGN KEY (`BRANCH_ID`) REFERENCES `office` (`OFFICE_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `customer_ibfk_4` FOREIGN KEY (`LOAN_OFFICER_ID`) REFERENCES `personnel` (`PERSONNEL_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `customer_ibfk_5` FOREIGN KEY (`CUSTOMER_FORMEDBY_ID`) REFERENCES `personnel` (`PERSONNEL_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=350081 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `customer_account` -- DROP TABLE IF EXISTS `customer_account`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `customer_account` ( `ACCOUNT_ID` int(11) NOT NULL default '0', PRIMARY KEY (`ACCOUNT_ID`), CONSTRAINT `customer_account_ibfk_1` FOREIGN KEY (`ACCOUNT_ID`) REFERENCES `account` (`ACCOUNT_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `customer_account_activity` -- DROP TABLE IF EXISTS `customer_account_activity`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `customer_account_activity` ( `CUSTOMER_ACCOUNT_ACTIVITY_ID` int(11) NOT NULL auto_increment, `ACCOUNT_ID` int(11) NOT NULL default '0', `DESCRIPTION` varchar(200) NOT NULL default '', `AMOUNT` decimal(10,3) default NULL, `FEE_AMOUNT_CURRENCY_ID` smallint(6) default NULL, `CREATED_DATE` date NOT NULL default '0000-00-00', `CREATED_BY` smallint(6) default NULL, PRIMARY KEY (`CUSTOMER_ACCOUNT_ACTIVITY_ID`), KEY `ACCOUNT_ID` (`ACCOUNT_ID`), KEY `FEE_AMOUNT_CURRENCY_ID` (`FEE_AMOUNT_CURRENCY_ID`), KEY `CREATED_BY` (`CREATED_BY`), CONSTRAINT `customer_account_activity_ibfk_1` FOREIGN KEY (`ACCOUNT_ID`) REFERENCES `account` (`ACCOUNT_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `customer_account_activity_ibfk_2` FOREIGN KEY (`FEE_AMOUNT_CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `customer_account_activity_ibfk_3` FOREIGN KEY (`CREATED_BY`) REFERENCES `personnel` (`PERSONNEL_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=828184 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `customer_address_detail` -- DROP TABLE IF EXISTS `customer_address_detail`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `customer_address_detail` ( `CUSTOMER_ADDRESS_ID` int(11) NOT NULL auto_increment, `CUSTOMER_ID` int(11) default NULL, `LOCALE_ID` smallint(6) default NULL, `ADDRESS_NAME` varchar(100) default NULL, `LINE_1` varchar(200) default NULL, `LINE_2` varchar(200) default NULL, `LINE_3` varchar(200) default NULL, `CITY` varchar(100) default NULL, `STATE` varchar(100) default NULL, `COUNTRY` varchar(100) default NULL, `ZIP` varchar(20) default NULL, `ADDRESS_STATUS` smallint(6) default NULL, `PHONE_NUMBER` varchar(20) default NULL, PRIMARY KEY (`CUSTOMER_ADDRESS_ID`), KEY `LOCALE_ID` (`LOCALE_ID`), KEY `CUST_ADDRESS_IDX` (`CUSTOMER_ID`), CONSTRAINT `customer_address_detail_ibfk_1` FOREIGN KEY (`CUSTOMER_ID`) REFERENCES `customer` (`CUSTOMER_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `customer_address_detail_ibfk_2` FOREIGN KEY (`LOCALE_ID`) REFERENCES `supported_locale` (`LOCALE_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=350090 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `customer_attendance` -- DROP TABLE IF EXISTS `customer_attendance`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `customer_attendance` ( `ID` int(11) NOT NULL auto_increment, `MEETING_DATE` date NOT NULL default '0000-00-00', `CUSTOMER_ID` int(11) NOT NULL default '0', `ATTENDANCE` smallint(6) default NULL, PRIMARY KEY (`ID`), KEY `CUSTOMER_ID` (`CUSTOMER_ID`), KEY `idx_mtg_date` (`MEETING_DATE`,`CUSTOMER_ID`), KEY `idx_sunguard` (`MEETING_DATE`), CONSTRAINT `customer_attendance_ibfk_1` FOREIGN KEY (`CUSTOMER_ID`) REFERENCES `customer` (`CUSTOMER_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=29831940 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `customer_attendance_types` -- DROP TABLE IF EXISTS `customer_attendance_types`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `customer_attendance_types` ( `ATTENDANCE_ID` smallint(6) NOT NULL auto_increment, `ATTENDANCE_LOOKUP_ID` int(11) NOT NULL default '0', `DESCRIPTION` varchar(50) default NULL, PRIMARY KEY (`ATTENDANCE_ID`), KEY `ATTENDANCE_LOOKUP_ID` (`ATTENDANCE_LOOKUP_ID`), CONSTRAINT `customer_attendance_types_ibfk_1` FOREIGN KEY (`ATTENDANCE_LOOKUP_ID`) REFERENCES `lookup_value` (`LOOKUP_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `customer_checklist` -- DROP TABLE IF EXISTS `customer_checklist`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `customer_checklist` ( `CHECKLIST_ID` smallint(6) NOT NULL default '0', `LEVEL_ID` smallint(6) NOT NULL default '0', `CUSTOMER_STATUS_ID` smallint(6) NOT NULL default '0', PRIMARY KEY (`CHECKLIST_ID`), KEY `LEVEL_ID` (`LEVEL_ID`), KEY `CUSTOMER_STATUS_ID` (`CUSTOMER_STATUS_ID`), CONSTRAINT `customer_checklist_ibfk_1` FOREIGN KEY (`CHECKLIST_ID`) REFERENCES `checklist` (`CHECKLIST_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `customer_checklist_ibfk_2` FOREIGN KEY (`LEVEL_ID`) REFERENCES `customer_level` (`LEVEL_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `customer_checklist_ibfk_3` FOREIGN KEY (`CUSTOMER_STATUS_ID`) REFERENCES `customer_state` (`STATUS_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `customer_custom_field` -- DROP TABLE IF EXISTS `customer_custom_field`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `customer_custom_field` ( `CUSTOMER_CUSTOMFIELD_ID` int(11) NOT NULL auto_increment, `CUSTOMER_ID` int(11) NOT NULL default '0', `FIELD_ID` smallint(6) NOT NULL default '0', `FIELD_VALUE` varchar(200) default NULL, PRIMARY KEY (`CUSTOMER_CUSTOMFIELD_ID`), KEY `FIELD_ID` (`FIELD_ID`), KEY `CUSTOMER_ID` (`CUSTOMER_ID`), CONSTRAINT `customer_custom_field_ibfk_1` FOREIGN KEY (`FIELD_ID`) REFERENCES `custom_field_definition` (`FIELD_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `customer_custom_field_ibfk_2` FOREIGN KEY (`CUSTOMER_ID`) REFERENCES `customer` (`CUSTOMER_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=931664 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `customer_detail` -- DROP TABLE IF EXISTS `customer_detail`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `customer_detail` ( `CUSTOMER_ID` int(11) NOT NULL default '0', `ETHINICITY` int(11) default NULL, `CITIZENSHIP` int(11) default NULL, `HANDICAPPED` int(11) default NULL, `BUSINESS_ACTIVITIES` int(11) default NULL, `MARITAL_STATUS` int(11) default NULL, `EDUCATION_LEVEL` int(11) default NULL, `NUM_CHILDREN` smallint(6) default NULL, `GENDER` smallint(6) default NULL, `DATE_STARTED` date default NULL, `HANDICAPPED_DETAILS` varchar(200) default NULL, `POVERTY_STATUS` int(11) default NULL, `POVERTY_LHOOD_PCT` decimal(10,3) default NULL, PRIMARY KEY (`CUSTOMER_ID`), KEY `CITIZENSHIP` (`CITIZENSHIP`), KEY `EDUCATION_LEVEL` (`EDUCATION_LEVEL`), KEY `ETHINICITY` (`ETHINICITY`), KEY `HANDICAPPED` (`HANDICAPPED`), KEY `MARITAL_STATUS` (`MARITAL_STATUS`), KEY `POVERTY_STATUS` (`POVERTY_STATUS`), CONSTRAINT `customer_detail_ibfk_1` FOREIGN KEY (`CUSTOMER_ID`) REFERENCES `customer` (`CUSTOMER_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `customer_detail_ibfk_2` FOREIGN KEY (`CITIZENSHIP`) REFERENCES `lookup_value` (`LOOKUP_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `customer_detail_ibfk_3` FOREIGN KEY (`EDUCATION_LEVEL`) REFERENCES `lookup_value` (`LOOKUP_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `customer_detail_ibfk_4` FOREIGN KEY (`ETHINICITY`) REFERENCES `lookup_value` (`LOOKUP_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `customer_detail_ibfk_5` FOREIGN KEY (`HANDICAPPED`) REFERENCES `lookup_value` (`LOOKUP_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `customer_detail_ibfk_6` FOREIGN KEY (`MARITAL_STATUS`) REFERENCES `lookup_value` (`LOOKUP_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `customer_detail_ibfk_7` FOREIGN KEY (`POVERTY_STATUS`) REFERENCES `lookup_value` (`LOOKUP_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `customer_fee_schedule` -- DROP TABLE IF EXISTS `customer_fee_schedule`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `customer_fee_schedule` ( `ACCOUNT_FEES_DETAIL_ID` int(11) NOT NULL auto_increment, `ID` int(11) NOT NULL default '0', `INSTALLMENT_ID` int(11) NOT NULL default '0', `FEE_ID` smallint(6) NOT NULL default '0', `ACCOUNT_FEE_ID` int(11) NOT NULL default '0', `AMOUNT` decimal(10,3) default NULL, `AMOUNT_CURRENCY_ID` smallint(6) default NULL, `AMOUNT_PAID` decimal(10,3) default NULL, `AMOUNT_PAID_CURRENCY_ID` smallint(6) default NULL, `VERSION_NO` int(11) NOT NULL default '0', PRIMARY KEY (`ACCOUNT_FEES_DETAIL_ID`), KEY `ID` (`ID`), KEY `AMOUNT_CURRENCY_ID` (`AMOUNT_CURRENCY_ID`), KEY `AMOUNT_PAID_CURRENCY_ID` (`AMOUNT_PAID_CURRENCY_ID`), KEY `FEE_ID` (`FEE_ID`), KEY `ACCOUNT_FEE_ID` (`ACCOUNT_FEE_ID`), CONSTRAINT `customer_fee_schedule_ibfk_1` FOREIGN KEY (`ID`) REFERENCES `customer_schedule` (`ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `customer_fee_schedule_ibfk_2` FOREIGN KEY (`AMOUNT_CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `customer_fee_schedule_ibfk_3` FOREIGN KEY (`AMOUNT_PAID_CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `customer_fee_schedule_ibfk_4` FOREIGN KEY (`FEE_ID`) REFERENCES `fees` (`FEE_ID`), CONSTRAINT `customer_fee_schedule_ibfk_5` FOREIGN KEY (`ACCOUNT_FEE_ID`) REFERENCES `account_fees` (`ACCOUNT_FEE_ID`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `customer_flag_detail` -- DROP TABLE IF EXISTS `customer_flag_detail`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `customer_flag_detail` ( `CUSTOMER_FLAG_ID` int(11) NOT NULL auto_increment, `CUSTOMER_ID` int(11) NOT NULL default '0', `FLAG_ID` smallint(6) NOT NULL default '0', `CREATED_BY` smallint(6) default NULL, `CREATED_DATE` date default NULL, `VERSION_NO` int(11) default NULL, PRIMARY KEY (`CUSTOMER_FLAG_ID`), KEY `CUSTOMER_ID` (`CUSTOMER_ID`), KEY `FLAG_ID` (`FLAG_ID`), KEY `CREATED_BY` (`CREATED_BY`), CONSTRAINT `customer_flag_detail_ibfk_1` FOREIGN KEY (`CUSTOMER_ID`) REFERENCES `customer` (`CUSTOMER_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `customer_flag_detail_ibfk_2` FOREIGN KEY (`FLAG_ID`) REFERENCES `customer_state_flag` (`FLAG_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `customer_flag_detail_ibfk_3` FOREIGN KEY (`CREATED_BY`) REFERENCES `personnel` (`PERSONNEL_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=50013 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `customer_hierarchy` -- DROP TABLE IF EXISTS `customer_hierarchy`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `customer_hierarchy` ( `HIERARCHY_ID` int(11) NOT NULL auto_increment, `PARENT_ID` int(11) NOT NULL default '0', `CUSTOMER_ID` int(11) default NULL, `STATUS` smallint(6) default NULL, `START_DATE` date default NULL, `END_DATE` date default NULL, `UPDATED_BY` smallint(6) default NULL, `UPDATED_DATE` date default NULL, PRIMARY KEY (`HIERARCHY_ID`), KEY `PARENT_ID` (`PARENT_ID`), KEY `UPDATED_BY` (`UPDATED_BY`), KEY `CUST_HIERARCHY_IDX` (`CUSTOMER_ID`,`STATUS`), CONSTRAINT `customer_hierarchy_ibfk_1` FOREIGN KEY (`CUSTOMER_ID`) REFERENCES `customer` (`CUSTOMER_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `customer_hierarchy_ibfk_2` FOREIGN KEY (`PARENT_ID`) REFERENCES `customer` (`CUSTOMER_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `customer_hierarchy_ibfk_3` FOREIGN KEY (`UPDATED_BY`) REFERENCES `personnel` (`PERSONNEL_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=339132 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `customer_historical_data` -- DROP TABLE IF EXISTS `customer_historical_data`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `customer_historical_data` ( `HISTORICAL_ID` smallint(6) NOT NULL auto_increment, `CUSTOMER_ID` int(11) NOT NULL default '0', `PRODUCT_NAME` varchar(100) default NULL, `LOAN_AMOUNT` decimal(10,3) default NULL, `LOAN_AMOUNT_CURRENCY_ID` smallint(6) default NULL, `TOTAL_AMOUNT_PAID` decimal(10,3) default NULL, `TOTAL_AMOUNT_PAID_CURRENCY_ID` smallint(6) default NULL, `INTEREST_PAID` decimal(10,3) default NULL, `INTEREST_PAID_CURRENCY_ID` smallint(6) default NULL, `MISSED_PAYMENTS_COUNT` int(11) default NULL, `TOTAL_PAYMENTS_COUNT` int(11) default NULL, `NOTES` text, `LOAN_CYCLE_NUMBER` int(11) default NULL, `CREATED_BY` smallint(6) default NULL, `UPDATED_BY` smallint(6) default NULL, `CREATED_DATE` date default NULL, `UPDATED_DATE` date default NULL, `VERSION_NO` int(11) default NULL, PRIMARY KEY (`HISTORICAL_ID`), KEY `CUSTOMER_ID` (`CUSTOMER_ID`), CONSTRAINT `customer_historical_data_ibfk_1` FOREIGN KEY (`CUSTOMER_ID`) REFERENCES `customer` (`CUSTOMER_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `customer_level` -- DROP TABLE IF EXISTS `customer_level`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `customer_level` ( `LEVEL_ID` smallint(6) NOT NULL default '0', `PARENT_LEVEL_ID` smallint(6) default NULL, `LEVEL_NAME_ID` smallint(6) NOT NULL default '0', `INTERACTION_FLAG` smallint(6) default NULL, `MAX_CHILD_COUNT` smallint(6) NOT NULL default '0', `MAX_INSTANCE_COUNT` smallint(6) NOT NULL default '0', PRIMARY KEY (`LEVEL_ID`), KEY `PARENT_LEVEL_ID` (`PARENT_LEVEL_ID`), KEY `LEVEL_NAME_ID` (`LEVEL_NAME_ID`), CONSTRAINT `customer_level_ibfk_1` FOREIGN KEY (`PARENT_LEVEL_ID`) REFERENCES `customer_level` (`LEVEL_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `customer_level_ibfk_2` FOREIGN KEY (`LEVEL_NAME_ID`) REFERENCES `lookup_entity` (`ENTITY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `customer_loan_account_detail` -- DROP TABLE IF EXISTS `customer_loan_account_detail`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `customer_loan_account_detail` ( `ACCOUNT_TRXN_ID` int(11) NOT NULL default '0', `ACCOUNT_ID` int(11) NOT NULL default '0', `CURRENCY_ID` smallint(6) default NULL, `INSTALLMENT_NUMBER` smallint(6) NOT NULL default '0', `DUE_DATE` date NOT NULL default '0000-00-00', `PRINCIPAL` decimal(10,3) NOT NULL default '0.000', `PRINCIPAL_CURRENCY_ID` smallint(6) NOT NULL default '0', `INTEREST` decimal(10,3) NOT NULL default '0.000', `INTEREST_CURRENCY_ID` smallint(6) NOT NULL default '0', `PENALTY` decimal(10,3) NOT NULL default '0.000', `PENALTY_CURRENCY_ID` smallint(6) NOT NULL default '0', KEY `ACCOUNT_TRXN_ID` (`ACCOUNT_TRXN_ID`), KEY `CURRENCY_ID` (`CURRENCY_ID`), KEY `PRINCIPAL_CURRENCY_ID` (`PRINCIPAL_CURRENCY_ID`), KEY `INTEREST_CURRENCY_ID` (`INTEREST_CURRENCY_ID`), KEY `PENALTY_CURRENCY_ID` (`PENALTY_CURRENCY_ID`), KEY `ACCOUNT_ID` (`ACCOUNT_ID`), CONSTRAINT `customer_loan_account_detail_ibfk_1` FOREIGN KEY (`ACCOUNT_TRXN_ID`) REFERENCES `account_trxn` (`ACCOUNT_TRXN_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `customer_loan_account_detail_ibfk_2` FOREIGN KEY (`CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `customer_loan_account_detail_ibfk_3` FOREIGN KEY (`PRINCIPAL_CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `customer_loan_account_detail_ibfk_4` FOREIGN KEY (`INTEREST_CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `customer_loan_account_detail_ibfk_5` FOREIGN KEY (`PENALTY_CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `customer_loan_account_detail_ibfk_6` FOREIGN KEY (`ACCOUNT_ID`) REFERENCES `loan_account` (`ACCOUNT_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `customer_meeting` -- DROP TABLE IF EXISTS `customer_meeting`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `customer_meeting` ( `CUSTOMER_MEETING_ID` int(11) NOT NULL auto_increment, `MEETING_ID` int(11) NOT NULL default '0', `CUSTOMER_ID` int(11) NOT NULL default '0', `UPDATED_FLAG` smallint(6) NOT NULL default '0', `UPDATED_MEETING_ID` int(11) default NULL, PRIMARY KEY (`CUSTOMER_MEETING_ID`), KEY `MEETING_ID` (`MEETING_ID`), KEY `CUSTOMER_MEETING_IDX` (`CUSTOMER_ID`), KEY `CUST_INHERITED_MEETING_IDX` (`CUSTOMER_ID`), KEY `UPDATED_MEETING_ID` (`UPDATED_MEETING_ID`), CONSTRAINT `customer_meeting_ibfk_1` FOREIGN KEY (`CUSTOMER_ID`) REFERENCES `customer` (`CUSTOMER_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `customer_meeting_ibfk_2` FOREIGN KEY (`MEETING_ID`) REFERENCES `meeting` (`MEETING_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `customer_meeting_ibfk_3` FOREIGN KEY (`UPDATED_MEETING_ID`) REFERENCES `meeting` (`MEETING_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=349958 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `customer_meeting_detail` -- DROP TABLE IF EXISTS `customer_meeting_detail`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `customer_meeting_detail` ( `MEETING_ID` int(11) NOT NULL default '0', `DETAILS_ID` int(11) NOT NULL default '0', PRIMARY KEY (`MEETING_ID`,`DETAILS_ID`), KEY `DETAILS_ID` (`DETAILS_ID`), CONSTRAINT `customer_meeting_detail_ibfk_1` FOREIGN KEY (`MEETING_ID`) REFERENCES `customer_meeting` (`CUSTOMER_MEETING_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `customer_meeting_detail_ibfk_2` FOREIGN KEY (`DETAILS_ID`) REFERENCES `recurrence_detail` (`DETAILS_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `customer_movement` -- DROP TABLE IF EXISTS `customer_movement`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `customer_movement` ( `CUSTOMER_MOVEMENT_ID` int(11) NOT NULL auto_increment, `CUSTOMER_ID` int(11) default NULL, `PERSONNEL_ID` smallint(6) default NULL, `OFFICE_ID` smallint(6) NOT NULL default '0', `STATUS` smallint(6) default NULL, `START_DATE` date default NULL, `END_DATE` date default NULL, `UPDATED_BY` smallint(6) default NULL, `UPDATED_DATE` date default NULL, PRIMARY KEY (`CUSTOMER_MOVEMENT_ID`), KEY `OFFICE_ID` (`OFFICE_ID`), KEY `PERSONNEL_ID` (`PERSONNEL_ID`), KEY `UPDATED_BY` (`UPDATED_BY`), KEY `CUST_MOVEMENT_IDX` (`CUSTOMER_ID`,`STATUS`), CONSTRAINT `customer_movement_ibfk_1` FOREIGN KEY (`CUSTOMER_ID`) REFERENCES `customer` (`CUSTOMER_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `customer_movement_ibfk_2` FOREIGN KEY (`OFFICE_ID`) REFERENCES `office` (`OFFICE_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `customer_movement_ibfk_3` FOREIGN KEY (`PERSONNEL_ID`) REFERENCES `personnel` (`PERSONNEL_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `customer_movement_ibfk_4` FOREIGN KEY (`UPDATED_BY`) REFERENCES `personnel` (`PERSONNEL_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `customer_name_detail` -- DROP TABLE IF EXISTS `customer_name_detail`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `customer_name_detail` ( `CUSTOMER_NAME_ID` int(11) NOT NULL auto_increment, `CUSTOMER_ID` int(11) default NULL, `NAME_TYPE` smallint(6) default NULL, `LOCALE_ID` smallint(6) default NULL, `SALUTATION` int(11) default NULL, `FIRST_NAME` varchar(100) NOT NULL default '', `MIDDLE_NAME` varchar(100) default NULL, `LAST_NAME` varchar(100) NOT NULL default '', `SECOND_LAST_NAME` varchar(100) default NULL, `SECOND_MIDDLE_NAME` varchar(100) default NULL, `DISPLAY_NAME` varchar(200) default NULL, PRIMARY KEY (`CUSTOMER_NAME_ID`), KEY `SALUTATION` (`SALUTATION`), KEY `LOCALE_ID` (`LOCALE_ID`), KEY `CUST_NAME_IDX` (`CUSTOMER_ID`), CONSTRAINT `customer_name_detail_ibfk_1` FOREIGN KEY (`CUSTOMER_ID`) REFERENCES `customer` (`CUSTOMER_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `customer_name_detail_ibfk_2` FOREIGN KEY (`SALUTATION`) REFERENCES `lookup_value` (`LOOKUP_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `customer_name_detail_ibfk_3` FOREIGN KEY (`LOCALE_ID`) REFERENCES `supported_locale` (`LOCALE_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=624006 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `customer_note` -- DROP TABLE IF EXISTS `customer_note`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `customer_note` ( `COMMENT_ID` int(11) NOT NULL auto_increment, `CUSTOMER_ID` int(11) NOT NULL default '0', `FIELD_OFFICER_ID` smallint(6) NOT NULL default '0', `COMMENT_DATE` date NOT NULL default '0000-00-00', `COMMENT` text NOT NULL, PRIMARY KEY (`COMMENT_ID`), KEY `FIELD_OFFICER_ID` (`FIELD_OFFICER_ID`), KEY `CUST_NOTE_IDX` (`CUSTOMER_ID`), CONSTRAINT `customer_note_ibfk_1` FOREIGN KEY (`CUSTOMER_ID`) REFERENCES `customer` (`CUSTOMER_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `customer_note_ibfk_2` FOREIGN KEY (`FIELD_OFFICER_ID`) REFERENCES `personnel` (`PERSONNEL_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=227866 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `customer_picture` -- DROP TABLE IF EXISTS `customer_picture`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `customer_picture` ( `PICTURE_ID` int(11) NOT NULL auto_increment, `CUSTOMER_ID` int(11) NOT NULL default '0', `PICTURE` blob, PRIMARY KEY (`PICTURE_ID`), KEY `CUSTOMER_ID` (`CUSTOMER_ID`), CONSTRAINT `customer_picture_ibfk_1` FOREIGN KEY (`CUSTOMER_ID`) REFERENCES `customer` (`CUSTOMER_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=129636 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `customer_position` -- DROP TABLE IF EXISTS `customer_position`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `customer_position` ( `CUSTOMER_POSITION_ID` smallint(6) NOT NULL auto_increment, `POSITION_ID` int(11) NOT NULL default '0', `CUSTOMER_ID` int(11) default NULL, `PARENT_CUSTOMER_ID` int(11) default NULL, `VERSION_NO` int(11) NOT NULL default '0', PRIMARY KEY (`CUSTOMER_POSITION_ID`), UNIQUE KEY `CUST_POSITION_IDX` (`CUSTOMER_ID`,`POSITION_ID`), CONSTRAINT `customer_position_ibfk_1` FOREIGN KEY (`CUSTOMER_ID`) REFERENCES `customer` (`CUSTOMER_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=27317 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `customer_program` -- DROP TABLE IF EXISTS `customer_program`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `customer_program` ( `PROGRAM_ID` int(11) NOT NULL default '0', `CUSTOMER_ID` int(11) NOT NULL default '0', `VERSION_NO` int(11) NOT NULL default '0', PRIMARY KEY (`PROGRAM_ID`,`CUSTOMER_ID`), KEY `CUSTOMER_ID` (`CUSTOMER_ID`), CONSTRAINT `customer_program_ibfk_1` FOREIGN KEY (`CUSTOMER_ID`) REFERENCES `customer` (`CUSTOMER_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `customer_program_ibfk_2` FOREIGN KEY (`PROGRAM_ID`) REFERENCES `program` (`PROGRAM_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `customer_schedule` -- DROP TABLE IF EXISTS `customer_schedule`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `customer_schedule` ( `ID` int(11) NOT NULL auto_increment, `ACCOUNT_ID` int(11) NOT NULL default '0', `CUSTOMER_ID` int(11) NOT NULL default '0', `CURRENCY_ID` smallint(6) default NULL, `ACTION_DATE` date default NULL, `MISC_FEES` decimal(10,3) default NULL, `MISC_FEES_CURRENCY_ID` smallint(6) default NULL, `MISC_FEES_PAID` decimal(10,3) default NULL, `MISC_FEES_PAID_CURRENCY_ID` smallint(6) default NULL, `MISC_PENALTY` decimal(10,3) default NULL, `MISC_PENALTY_CURRENCY_ID` smallint(6) default NULL, `MISC_PENALTY_PAID` decimal(10,3) default NULL, `MISC_PENALTY_PAID_CURRENCY_ID` smallint(6) default NULL, `PAYMENT_STATUS` smallint(6) NOT NULL default '0', `INSTALLMENT_ID` smallint(6) NOT NULL default '0', `PAYMENT_DATE` date default NULL, `PARENT_FLAG` smallint(6) default NULL, `VERSION_NO` int(11) NOT NULL default '0', PRIMARY KEY (`ID`), KEY `ACCOUNT_ID` (`ACCOUNT_ID`), KEY `CURRENCY_ID` (`CURRENCY_ID`), KEY `CUSTOMER_ID` (`CUSTOMER_ID`), CONSTRAINT `customer_schedule_ibfk_1` FOREIGN KEY (`ACCOUNT_ID`) REFERENCES `account` (`ACCOUNT_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `customer_schedule_ibfk_2` FOREIGN KEY (`CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `customer_schedule_ibfk_3` FOREIGN KEY (`CUSTOMER_ID`) REFERENCES `customer` (`CUSTOMER_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=35415866 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `customer_state` -- DROP TABLE IF EXISTS `customer_state`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `customer_state` ( `STATUS_ID` smallint(6) NOT NULL auto_increment, `STATUS_LOOKUP_ID` int(11) NOT NULL default '0', `LEVEL_ID` smallint(6) NOT NULL default '0', `DESCRIPTION` varchar(200) default NULL, `CURRENTLY_IN_USE` smallint(6) NOT NULL default '0', PRIMARY KEY (`STATUS_ID`), KEY `LEVEL_ID` (`LEVEL_ID`), KEY `STATUS_LOOKUP_ID` (`STATUS_LOOKUP_ID`), CONSTRAINT `customer_state_ibfk_1` FOREIGN KEY (`LEVEL_ID`) REFERENCES `customer_level` (`LEVEL_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `customer_state_ibfk_2` FOREIGN KEY (`STATUS_LOOKUP_ID`) REFERENCES `lookup_value` (`LOOKUP_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `customer_state_flag` -- DROP TABLE IF EXISTS `customer_state_flag`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `customer_state_flag` ( `FLAG_ID` smallint(6) NOT NULL default '0', `FLAG_LOOKUP_ID` int(11) NOT NULL default '0', `STATUS_ID` smallint(6) NOT NULL default '0', `FLAG_DESCRIPTION` varchar(200) NOT NULL default '', `ISBLACKLISTED` smallint(6) default NULL, PRIMARY KEY (`FLAG_ID`), KEY `STATUS_ID` (`STATUS_ID`), KEY `FLAG_LOOKUP_ID` (`FLAG_LOOKUP_ID`), CONSTRAINT `customer_state_flag_ibfk_1` FOREIGN KEY (`STATUS_ID`) REFERENCES `customer_state` (`STATUS_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `customer_state_flag_ibfk_2` FOREIGN KEY (`FLAG_LOOKUP_ID`) REFERENCES `lookup_value` (`LOOKUP_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `customer_trxn_detail` -- DROP TABLE IF EXISTS `customer_trxn_detail`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `customer_trxn_detail` ( `ACCOUNT_TRXN_ID` int(11) NOT NULL default '0', `TOTAL_AMOUNT` decimal(10,3) default NULL, `TOTAL_AMOUNT_CURRENCY_ID` smallint(6) default NULL, `MISC_FEE_AMOUNT` decimal(10,3) default NULL, `MISC_FEE_AMOUNT_CURRENCY_ID` smallint(6) default NULL, `MISC_PENALTY_AMOUNT` decimal(10,3) default NULL, `MISC_PENALTY_AMOUNT_CURRENCY_ID` smallint(6) default NULL, PRIMARY KEY (`ACCOUNT_TRXN_ID`), KEY `TOTAL_AMOUNT_CURRENCY_ID` (`TOTAL_AMOUNT_CURRENCY_ID`), KEY `MISC_PENALTY_AMOUNT_CURRENCY_ID` (`MISC_PENALTY_AMOUNT_CURRENCY_ID`), KEY `MISC_FEE_AMOUNT_CURRENCY_ID` (`MISC_FEE_AMOUNT_CURRENCY_ID`), CONSTRAINT `customer_trxn_detail_ibfk_1` FOREIGN KEY (`TOTAL_AMOUNT_CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `customer_trxn_detail_ibfk_2` FOREIGN KEY (`MISC_PENALTY_AMOUNT_CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `customer_trxn_detail_ibfk_3` FOREIGN KEY (`MISC_FEE_AMOUNT_CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `customer_trxn_detail_ibfk_4` FOREIGN KEY (`ACCOUNT_TRXN_ID`) REFERENCES `account_trxn` (`ACCOUNT_TRXN_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `database_version` -- DROP TABLE IF EXISTS `database_version`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `database_version` ( `DATABASE_VERSION` int(11) default NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `detail` -- DROP TABLE IF EXISTS `detail`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `detail` ( `Account_id` int(10) default NULL, `Fund_id` smallint(5) default NULL, UNIQUE KEY `Account_id` (`Account_id`), KEY `Fund_id` (`Fund_id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; SET character_set_client = @saved_cs_client; -- -- Table structure for table `entity_master` -- DROP TABLE IF EXISTS `entity_master`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `entity_master` ( `ENTITY_TYPE_ID` smallint(6) NOT NULL auto_increment, `ENTITY_TYPE` varchar(100) NOT NULL default '', PRIMARY KEY (`ENTITY_TYPE_ID`) ) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `fee_formula_master` -- DROP TABLE IF EXISTS `fee_formula_master`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `fee_formula_master` ( `FORMULAID` smallint(6) NOT NULL auto_increment, `FORUMLA_LOOKUP_ID` int(11) NOT NULL default '0', PRIMARY KEY (`FORMULAID`), KEY `FORUMLA_LOOKUP_ID` (`FORUMLA_LOOKUP_ID`), CONSTRAINT `fee_formula_master_ibfk_1` FOREIGN KEY (`FORUMLA_LOOKUP_ID`) REFERENCES `lookup_value` (`LOOKUP_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `fee_frequency` -- DROP TABLE IF EXISTS `fee_frequency`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `fee_frequency` ( `FEE_FREQUENCY_ID` smallint(6) NOT NULL auto_increment, `FEE_ID` smallint(6) NOT NULL default '0', `FEE_FREQUENCYTYPE_ID` smallint(6) NOT NULL default '0', `FREQUENCY_PAYMENT_ID` smallint(6) default NULL, `FREQUENCY_MEETING_ID` int(11) default NULL, PRIMARY KEY (`FEE_FREQUENCY_ID`), KEY `FEE_ID` (`FEE_ID`), KEY `FEE_FREQUENCYTYPE_ID` (`FEE_FREQUENCYTYPE_ID`), KEY `FREQUENCY_PAYMENT_ID` (`FREQUENCY_PAYMENT_ID`), KEY `FREQUENCY_MEETING_ID` (`FREQUENCY_MEETING_ID`), CONSTRAINT `fee_frequency_ibfk_1` FOREIGN KEY (`FEE_ID`) REFERENCES `fees` (`FEE_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fee_frequency_ibfk_2` FOREIGN KEY (`FEE_FREQUENCYTYPE_ID`) REFERENCES `fee_frequency_type` (`FEE_FREQUENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fee_frequency_ibfk_3` FOREIGN KEY (`FREQUENCY_PAYMENT_ID`) REFERENCES `fee_payment` (`FEE_PAYMENT_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fee_frequency_ibfk_4` FOREIGN KEY (`FREQUENCY_MEETING_ID`) REFERENCES `meeting` (`MEETING_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `fee_frequency_type` -- DROP TABLE IF EXISTS `fee_frequency_type`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `fee_frequency_type` ( `FEE_FREQUENCY_ID` smallint(6) NOT NULL auto_increment, `LOOKUP_ID` int(11) NOT NULL default '0', PRIMARY KEY (`FEE_FREQUENCY_ID`), KEY `LOOKUP_ID` (`LOOKUP_ID`), CONSTRAINT `fee_frequency_type_ibfk_1` FOREIGN KEY (`LOOKUP_ID`) REFERENCES `lookup_value` (`LOOKUP_ID`) ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `fee_payment` -- DROP TABLE IF EXISTS `fee_payment`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `fee_payment` ( `FEE_PAYMENT_ID` smallint(6) NOT NULL auto_increment, `FEE_PAYMENT_LOOKUP_ID` int(11) default NULL, PRIMARY KEY (`FEE_PAYMENT_ID`), KEY `FEE_PAYMENT_LOOKUP_ID` (`FEE_PAYMENT_LOOKUP_ID`), CONSTRAINT `fee_payment_ibfk_1` FOREIGN KEY (`FEE_PAYMENT_LOOKUP_ID`) REFERENCES `lookup_value` (`LOOKUP_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `fee_payments_categories_type` -- DROP TABLE IF EXISTS `fee_payments_categories_type`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `fee_payments_categories_type` ( `FEE_PAYMENTS_CATEGORY_TYPE_ID` smallint(6) NOT NULL default '0', `FEE_PAYMENT_ID` smallint(6) default NULL, `CATEGORY_ID` smallint(6) default NULL, `FEE_TYPE_ID` smallint(6) default NULL, PRIMARY KEY (`FEE_PAYMENTS_CATEGORY_TYPE_ID`), KEY `CATEGORY_ID` (`CATEGORY_ID`), KEY `FEE_PAYMENT_ID` (`FEE_PAYMENT_ID`), KEY `FEE_TYPE_ID` (`FEE_TYPE_ID`), CONSTRAINT `fee_payments_categories_type_ibfk_1` FOREIGN KEY (`CATEGORY_ID`) REFERENCES `category_type` (`CATEGORY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fee_payments_categories_type_ibfk_2` FOREIGN KEY (`FEE_PAYMENT_ID`) REFERENCES `fee_payment` (`FEE_PAYMENT_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fee_payments_categories_type_ibfk_3` FOREIGN KEY (`FEE_TYPE_ID`) REFERENCES `fee_type` (`FEE_TYPE_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `fee_status` -- DROP TABLE IF EXISTS `fee_status`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `fee_status` ( `STATUS_ID` smallint(6) NOT NULL auto_increment, `STATUS_LOOKUP_ID` int(11) NOT NULL default '0', PRIMARY KEY (`STATUS_ID`), KEY `STATUS_LOOKUP_ID` (`STATUS_LOOKUP_ID`), CONSTRAINT `fee_status_ibfk_1` FOREIGN KEY (`STATUS_LOOKUP_ID`) REFERENCES `lookup_value` (`LOOKUP_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `fee_trxn_detail` -- DROP TABLE IF EXISTS `fee_trxn_detail`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `fee_trxn_detail` ( `FEE_TRXN_DETAIL_ID` int(11) NOT NULL auto_increment, `ACCOUNT_TRXN_ID` int(11) NOT NULL default '0', `ACCOUNT_FEE_ID` int(11) default NULL, `FEE_AMOUNT_CURRENCY_ID` smallint(6) default NULL, `FEE_AMOUNT` decimal(10,3) NOT NULL default '0.000', PRIMARY KEY (`FEE_TRXN_DETAIL_ID`), KEY `ACCOUNT_FEE_ID` (`ACCOUNT_FEE_ID`), KEY `FEE_AMOUNT_CURRENCY_ID` (`FEE_AMOUNT_CURRENCY_ID`), KEY `FEE_ACCOUNT_TRXN_IDX` (`ACCOUNT_TRXN_ID`), CONSTRAINT `fee_trxn_detail_ibfk_1` FOREIGN KEY (`ACCOUNT_FEE_ID`) REFERENCES `account_fees` (`ACCOUNT_FEE_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fee_trxn_detail_ibfk_2` FOREIGN KEY (`FEE_AMOUNT_CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fee_trxn_detail_ibfk_3` FOREIGN KEY (`ACCOUNT_TRXN_ID`) REFERENCES `account_trxn` (`ACCOUNT_TRXN_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=18299086 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `fee_type` -- DROP TABLE IF EXISTS `fee_type`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `fee_type` ( `FEE_TYPE_ID` smallint(6) NOT NULL default '0', `FEE_LOOKUP_ID` smallint(6) default NULL, `FLAT_OR_RATE` smallint(6) default NULL, `FORMULA` varchar(100) default NULL, PRIMARY KEY (`FEE_TYPE_ID`), KEY `FEE_LOOKUP_ID` (`FEE_LOOKUP_ID`), CONSTRAINT `fee_type_ibfk_1` FOREIGN KEY (`FEE_LOOKUP_ID`) REFERENCES `lookup_entity` (`ENTITY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `fee_update_type` -- DROP TABLE IF EXISTS `fee_update_type`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `fee_update_type` ( `FEE_UPDATE_TYPE_ID` smallint(6) NOT NULL auto_increment, `LOOKUP_ID` int(11) NOT NULL default '0', PRIMARY KEY (`FEE_UPDATE_TYPE_ID`), KEY `LOOKUP_ID` (`LOOKUP_ID`), CONSTRAINT `fee_update_type_ibfk_1` FOREIGN KEY (`LOOKUP_ID`) REFERENCES `lookup_value` (`LOOKUP_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `feelevel` -- DROP TABLE IF EXISTS `feelevel`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `feelevel` ( `FEELEVEL_ID` smallint(6) NOT NULL auto_increment, `FEE_ID` smallint(6) NOT NULL default '0', `LEVEL_ID` smallint(6) NOT NULL default '0', PRIMARY KEY (`FEELEVEL_ID`), KEY `FEE_ID` (`FEE_ID`), CONSTRAINT `feelevel_ibfk_1` FOREIGN KEY (`FEE_ID`) REFERENCES `fees` (`FEE_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `fees` -- DROP TABLE IF EXISTS `fees`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `fees` ( `FEE_ID` smallint(6) NOT NULL auto_increment, `GLOBAL_FEE_NUM` varchar(50) default NULL, `FEE_NAME` varchar(50) NOT NULL default '', `FEE_PAYMENTS_CATEGORY_TYPE_ID` smallint(6) default NULL, `OFFICE_ID` smallint(6) NOT NULL default '0', `GLCODE_ID` smallint(6) NOT NULL default '0', `STATUS` smallint(6) NOT NULL default '0', `CATEGORY_ID` smallint(6) NOT NULL default '0', `RATE_OR_AMOUNT` decimal(16,5) default NULL, `RATE_OR_AMOUNT_CURRENCY_ID` smallint(6) default NULL, `RATE_FLAT_FALG` smallint(6) default NULL, `CREATED_DATE` date NOT NULL default '0000-00-00', `CREATED_BY` smallint(6) NOT NULL default '0', `UPDATED_DATE` date default NULL, `UPDATED_BY` smallint(6) default NULL, `FORMULA_ID` smallint(6) default NULL, `DEFAULT_ADMIN_FEE` varchar(10) default NULL, `FEE_AMOUNT` decimal(10,3) default NULL, `FEE_AMOUNT_CURRENCY_ID` smallint(6) default NULL, `RATE` decimal(16,5) default NULL, `VERSION_NO` int(11) NOT NULL default '0', `UPDATE_FLAG` smallint(6) default NULL, `DISCRIMINATOR` varchar(20) default NULL, PRIMARY KEY (`FEE_ID`), UNIQUE KEY `FEE_GLOBAL_IDX` (`GLOBAL_FEE_NUM`), KEY `GLCODE_ID` (`GLCODE_ID`), KEY `CATEGORY_ID` (`CATEGORY_ID`), KEY `STATUS` (`STATUS`), KEY `CREATED_BY` (`CREATED_BY`), KEY `UPDATED_BY` (`UPDATED_BY`), KEY `FORMULA_ID` (`FORMULA_ID`), KEY `RATE_OR_AMOUNT_CURRENCY_ID` (`RATE_OR_AMOUNT_CURRENCY_ID`), KEY `FEE_AMOUNT_CURRENCY_ID` (`FEE_AMOUNT_CURRENCY_ID`), KEY `FEE_PMNT_CATG_IDX` (`FEE_PAYMENTS_CATEGORY_TYPE_ID`), KEY `FEE_OFFICE_IDX` (`OFFICE_ID`), CONSTRAINT `fees_ibfk_1` FOREIGN KEY (`GLCODE_ID`) REFERENCES `gl_code` (`GLCODE_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fees_ibfk_10` FOREIGN KEY (`FEE_AMOUNT_CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fees_ibfk_2` FOREIGN KEY (`CATEGORY_ID`) REFERENCES `category_type` (`CATEGORY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fees_ibfk_3` FOREIGN KEY (`STATUS`) REFERENCES `fee_status` (`STATUS_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fees_ibfk_4` FOREIGN KEY (`OFFICE_ID`) REFERENCES `office` (`OFFICE_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fees_ibfk_5` FOREIGN KEY (`CREATED_BY`) REFERENCES `personnel` (`PERSONNEL_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fees_ibfk_6` FOREIGN KEY (`UPDATED_BY`) REFERENCES `personnel` (`PERSONNEL_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fees_ibfk_8` FOREIGN KEY (`FORMULA_ID`) REFERENCES `fee_formula_master` (`FORMULAID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fees_ibfk_9` FOREIGN KEY (`RATE_OR_AMOUNT_CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `field_configuration` -- DROP TABLE IF EXISTS `field_configuration`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `field_configuration` ( `FIELD_CONFIG_ID` int(11) NOT NULL auto_increment, `FIELD_NAME` varchar(100) NOT NULL default '', `ENTITY_ID` smallint(6) NOT NULL default '0', `MANDATORY_FLAG` smallint(6) NOT NULL default '0', `HIDDEN_FLAG` smallint(6) NOT NULL default '0', `PARENT_FIELD_CONFIG_ID` int(11) default NULL, PRIMARY KEY (`FIELD_CONFIG_ID`), KEY `ENTITY_ID` (`ENTITY_ID`), KEY `PARENT_FIELD_CONFIG_ID` (`PARENT_FIELD_CONFIG_ID`), CONSTRAINT `field_configuration_ibfk_1` FOREIGN KEY (`ENTITY_ID`) REFERENCES `entity_master` (`ENTITY_TYPE_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `field_configuration_ibfk_2` FOREIGN KEY (`PARENT_FIELD_CONFIG_ID`) REFERENCES `field_configuration` (`FIELD_CONFIG_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=75 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `financial_action` -- DROP TABLE IF EXISTS `financial_action`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `financial_action` ( `FIN_ACTION_ID` smallint(6) NOT NULL default '0', `LOOKUP_ID` int(11) NOT NULL default '0', PRIMARY KEY (`FIN_ACTION_ID`), KEY `LOOKUP_ID` (`LOOKUP_ID`), CONSTRAINT `financial_action_ibfk_1` FOREIGN KEY (`LOOKUP_ID`) REFERENCES `lookup_value_locale` (`LOOKUP_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `financial_trxn` -- DROP TABLE IF EXISTS `financial_trxn`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `financial_trxn` ( `TRXN_ID` int(11) NOT NULL auto_increment, `ACCOUNT_TRXN_ID` int(11) NOT NULL default '0', `RELATED_FIN_TRXN` int(11) default NULL, `CURRENCY_ID` smallint(6) default NULL, `FIN_ACTION_ID` smallint(6) default NULL, `GLCODE_ID` smallint(6) NOT NULL default '0', `POSTED_AMOUNT` decimal(10,3) NOT NULL default '0.000', `POSTED_AMOUNT_CURRENCY_ID` smallint(6) default NULL, `BALANCE_AMOUNT` decimal(10,3) NOT NULL default '0.000', `BALANCE_AMOUNT_CURRENCY_ID` smallint(6) default NULL, `ACTION_DATE` date NOT NULL default '0000-00-00', `POSTED_DATE` date NOT NULL default '0000-00-00', `POSTED_BY` smallint(6) default NULL, `ACCOUNTING_UPDATED` smallint(6) default NULL, `NOTES` varchar(200) default NULL, `DEBIT_CREDIT_FLAG` smallint(6) NOT NULL default '0', PRIMARY KEY (`TRXN_ID`), KEY `ACCOUNT_TRXN_ID` (`ACCOUNT_TRXN_ID`), KEY `POSTED_AMOUNT_CURRENCY_ID` (`POSTED_AMOUNT_CURRENCY_ID`), KEY `BALANCE_AMOUNT_CURRENCY_ID` (`BALANCE_AMOUNT_CURRENCY_ID`), KEY `CURRENCY_ID` (`CURRENCY_ID`), KEY `RELATED_FIN_TRXN` (`RELATED_FIN_TRXN`), KEY `FIN_ACTION_ID` (`FIN_ACTION_ID`), KEY `POSTED_BY` (`POSTED_BY`), KEY `GLCODE_ID` (`GLCODE_ID`), CONSTRAINT `financial_trxn_ibfk_1` FOREIGN KEY (`ACCOUNT_TRXN_ID`) REFERENCES `account_trxn` (`ACCOUNT_TRXN_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `financial_trxn_ibfk_2` FOREIGN KEY (`CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `financial_trxn_ibfk_3` FOREIGN KEY (`POSTED_AMOUNT_CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `financial_trxn_ibfk_4` FOREIGN KEY (`BALANCE_AMOUNT_CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `financial_trxn_ibfk_5` FOREIGN KEY (`CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `financial_trxn_ibfk_6` FOREIGN KEY (`RELATED_FIN_TRXN`) REFERENCES `financial_trxn` (`TRXN_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `financial_trxn_ibfk_7` FOREIGN KEY (`FIN_ACTION_ID`) REFERENCES `financial_action` (`FIN_ACTION_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `financial_trxn_ibfk_8` FOREIGN KEY (`POSTED_BY`) REFERENCES `personnel` (`PERSONNEL_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `financial_trxn_ibfk_9` FOREIGN KEY (`GLCODE_ID`) REFERENCES `gl_code` (`GLCODE_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=16530571 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `freq_of_deposits` -- DROP TABLE IF EXISTS `freq_of_deposits`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `freq_of_deposits` ( `FREQ_OF_DEPOSITS_ID` smallint(6) NOT NULL auto_increment, `LOOKUP_ID` int(11) NOT NULL, PRIMARY KEY (`FREQ_OF_DEPOSITS_ID`), KEY `LOOKUP_ID` (`LOOKUP_ID`), CONSTRAINT `freq_of_deposits_ibfk_1` FOREIGN KEY (`LOOKUP_ID`) REFERENCES `lookup_value` (`LOOKUP_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `fund` -- DROP TABLE IF EXISTS `fund`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `fund` ( `FUND_ID` smallint(6) NOT NULL auto_increment, `FUND_NAME` varchar(100) default NULL, `VERSION_NO` int(11) default NULL, `FUNDCODE_ID` smallint(6) NOT NULL, PRIMARY KEY (`FUND_ID`), KEY `FUNDCODE_ID` (`FUNDCODE_ID`), CONSTRAINT `fund_ibfk_1` FOREIGN KEY (`FUNDCODE_ID`) REFERENCES `fund_code` (`FUNDCODE_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `fund_code` -- DROP TABLE IF EXISTS `fund_code`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `fund_code` ( `FUNDCODE_ID` smallint(6) NOT NULL auto_increment, `FUNDCODE_VALUE` varchar(50) NOT NULL, PRIMARY KEY (`FUNDCODE_ID`) ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `gl_code` -- DROP TABLE IF EXISTS `gl_code`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `gl_code` ( `GLCODE_ID` smallint(6) NOT NULL auto_increment, `GLCODE_VALUE` varchar(50) NOT NULL, PRIMARY KEY (`GLCODE_ID`), UNIQUE KEY `GLCODE_VALUE_IDX` (`GLCODE_VALUE`) ) ENGINE=InnoDB AUTO_INCREMENT=58 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `grace_period_type` -- DROP TABLE IF EXISTS `grace_period_type`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `grace_period_type` ( `GRACE_PERIOD_TYPE_ID` smallint(6) NOT NULL auto_increment, `LOOKUP_ID` int(11) NOT NULL, PRIMARY KEY (`GRACE_PERIOD_TYPE_ID`), KEY `LOOKUP_ID` (`LOOKUP_ID`), CONSTRAINT `grace_period_type_ibfk_1` FOREIGN KEY (`LOOKUP_ID`) REFERENCES `lookup_value` (`LOOKUP_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `group_loan_counter` -- DROP TABLE IF EXISTS `group_loan_counter`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `group_loan_counter` ( `GROUP_LOAN_COUNTER_ID` int(11) NOT NULL auto_increment, `GROUP_PERF_ID` int(11) NOT NULL, `LOAN_OFFERING_ID` smallint(6) NOT NULL, `LOAN_CYCLE_COUNTER` smallint(6) default NULL, PRIMARY KEY (`GROUP_LOAN_COUNTER_ID`) ) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `group_perf_history` -- DROP TABLE IF EXISTS `group_perf_history`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `group_perf_history` ( `ID` int(11) NOT NULL auto_increment, `CUSTOMER_ID` int(11) NOT NULL, `NO_OF_CLIENTS` smallint(6) default NULL, `LAST_GROUP_LOAN_AMNT_DISB` decimal(10,3) default NULL, `LAST_GROUP_LOAN_AMNT_DISB_CURRENCY_ID` smallint(6) default NULL, `AVG_LOAN_SIZE` decimal(10,3) default NULL, `AVG_LOAN_SIZE_CURRENCY_ID` smallint(6) default NULL, `TOTAL_OUTSTAND_LOAN_AMNT` decimal(10,3) default NULL, `TOTAL_OUTSTAND_LOAN_AMNT_CURRENCY_ID` smallint(6) default NULL, `PORTFOLIO_AT_RISK` decimal(10,3) default NULL, `PORTFOLIO_AT_RISK_CURRENCY_ID` smallint(6) default NULL, `TOTAL_SAVINGS_AMNT` decimal(10,3) default NULL, `TOTAL_SAVINGS_AMNT_CURRENCY_ID` smallint(6) default NULL, PRIMARY KEY (`ID`), KEY `CUSTOMER_ID` (`CUSTOMER_ID`), CONSTRAINT `group_perf_history_ibfk_1` FOREIGN KEY (`CUSTOMER_ID`) REFERENCES `customer` (`CUSTOMER_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=93 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `holiday` -- DROP TABLE IF EXISTS `holiday`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `holiday` ( `OFFICE_ID` smallint(6) NOT NULL, `HOLIDAY_FROM_DATE` date NOT NULL, `HOLIDAY_THRU_DATE` date default NULL, `HOLIDAY_NAME` varchar(100) default NULL, `REPAYMENT_RULE_ID` smallint(6) NOT NULL, `HOLIDAY_CHANGES_APPLIED_FLAG` smallint(6) default '1', PRIMARY KEY (`OFFICE_ID`,`HOLIDAY_FROM_DATE`), KEY `REPAYMENT_RULE_ID` (`REPAYMENT_RULE_ID`), CONSTRAINT `holiday_ibfk_1` FOREIGN KEY (`OFFICE_ID`) REFERENCES `office` (`OFFICE_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `holiday_ibfk_2` FOREIGN KEY (`REPAYMENT_RULE_ID`) REFERENCES `repayment_rule` (`REPAYMENT_RULE_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `inherited_meeting` -- DROP TABLE IF EXISTS `inherited_meeting`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `inherited_meeting` ( `MEETING_ID` int(11) default NULL, `CUSTOMER_ID` int(11) default NULL, KEY `CUSTOMER_ID` (`CUSTOMER_ID`), KEY `MEETING_ID` (`MEETING_ID`), CONSTRAINT `inherited_meeting_ibfk_1` FOREIGN KEY (`CUSTOMER_ID`) REFERENCES `customer` (`CUSTOMER_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `inherited_meeting_ibfk_2` FOREIGN KEY (`MEETING_ID`) REFERENCES `customer_meeting` (`CUSTOMER_MEETING_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `insurance_offering` -- DROP TABLE IF EXISTS `insurance_offering`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `insurance_offering` ( `PRD_OFFERING_ID` smallint(6) NOT NULL, PRIMARY KEY (`PRD_OFFERING_ID`), CONSTRAINT `insurance_offering_ibfk_1` FOREIGN KEY (`PRD_OFFERING_ID`) REFERENCES `prd_offering` (`PRD_OFFERING_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `interest_calc_rule` -- DROP TABLE IF EXISTS `interest_calc_rule`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `interest_calc_rule` ( `INTEREST_CALC_RULE_ID` smallint(6) NOT NULL auto_increment, `LOOKUP_ID` int(11) NOT NULL, PRIMARY KEY (`INTEREST_CALC_RULE_ID`), KEY `LOOKUP_ID` (`LOOKUP_ID`), CONSTRAINT `interest_calc_rule_ibfk_1` FOREIGN KEY (`LOOKUP_ID`) REFERENCES `lookup_value` (`LOOKUP_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `interest_calculation_types` -- DROP TABLE IF EXISTS `interest_calculation_types`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `interest_calculation_types` ( `INTEREST_CALCULATION_TYPE_ID` smallint(6) NOT NULL auto_increment, `INTEREST_CALCULATION_LOOKUP_ID` int(11) NOT NULL, `DESCRIPTION` varchar(100) default NULL, PRIMARY KEY (`INTEREST_CALCULATION_TYPE_ID`), KEY `INTEREST_CALCULATION_LOOKUP_ID` (`INTEREST_CALCULATION_LOOKUP_ID`), CONSTRAINT `interest_calculation_types_ibfk_1` FOREIGN KEY (`INTEREST_CALCULATION_LOOKUP_ID`) REFERENCES `lookup_value` (`LOOKUP_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `interest_types` -- DROP TABLE IF EXISTS `interest_types`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `interest_types` ( `INTEREST_TYPE_ID` smallint(6) NOT NULL auto_increment, `LOOKUP_ID` int(11) NOT NULL, `CATEGORY_ID` smallint(6) NOT NULL, `DESCRIPTON` varchar(50) default NULL, PRIMARY KEY (`INTEREST_TYPE_ID`), KEY `CATEGORY_ID` (`CATEGORY_ID`), KEY `LOOKUP_ID` (`LOOKUP_ID`), CONSTRAINT `interest_types_ibfk_1` FOREIGN KEY (`CATEGORY_ID`) REFERENCES `prd_type` (`PRD_TYPE_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `interest_types_ibfk_2` FOREIGN KEY (`LOOKUP_ID`) REFERENCES `lookup_value` (`LOOKUP_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `language` -- DROP TABLE IF EXISTS `language`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `language` ( `LANG_ID` smallint(6) NOT NULL, `LANG_NAME` varchar(100) default NULL, `LANG_SHORT_NAME` varchar(10) default NULL, `LOOKUP_ID` int(11) NOT NULL, PRIMARY KEY (`LANG_ID`), KEY `LOOKUP_ID` (`LOOKUP_ID`), CONSTRAINT `language_ibfk_1` FOREIGN KEY (`LOOKUP_ID`) REFERENCES `lookup_value` (`LOOKUP_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `loan_account` -- DROP TABLE IF EXISTS `loan_account`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `loan_account` ( `ACCOUNT_ID` int(11) NOT NULL, `BUSINESS_ACTIVITIES_ID` int(11) default NULL, `COLLATERAL_TYPE_ID` int(11) default NULL, `GRACE_PERIOD_TYPE_ID` smallint(6) NOT NULL, `GROUP_FLAG` smallint(6) default NULL, `LOAN_AMOUNT` decimal(10,3) default NULL, `LOAN_AMOUNT_CURRENCY_ID` smallint(6) default NULL, `LOAN_BALANCE` decimal(10,3) default NULL, `LOAN_BALANCE_CURRENCY_ID` smallint(6) default NULL, `INTEREST_TYPE_ID` smallint(6) default NULL, `INTEREST_RATE` decimal(13,10) default NULL, `FUND_ID` smallint(6) default NULL, `MEETING_ID` int(11) default NULL, `CURRENCY_ID` smallint(6) default NULL, `NO_OF_INSTALLMENTS` smallint(6) NOT NULL, `DISBURSEMENT_DATE` date default NULL, `COLLATERAL_NOTE` text, `GRACE_PERIOD_DURATION` smallint(6) default NULL, `INTEREST_AT_DISB` smallint(6) default NULL, `GRACE_PERIOD_PENALTY` smallint(6) default NULL, `PRD_OFFERING_ID` smallint(6) default NULL, `REDONE` smallint(6) NOT NULL, `PARENT_ACCOUNT_ID` int(11) default NULL, `MONTH_RANK` smallint(6) default NULL, `MONTH_WEEK` smallint(6) default NULL, `RECUR_MONTH` smallint(6) default NULL, PRIMARY KEY (`ACCOUNT_ID`), KEY `CURRENCY_ID` (`CURRENCY_ID`), KEY `LOAN_AMOUNT_CURRENCY_ID` (`LOAN_AMOUNT_CURRENCY_ID`), KEY `LOAN_BALANCE_CURRENCY_ID` (`LOAN_BALANCE_CURRENCY_ID`), KEY `FUND_ID` (`FUND_ID`), KEY `GRACE_PERIOD_TYPE_ID` (`GRACE_PERIOD_TYPE_ID`), KEY `INTEREST_TYPE_ID` (`INTEREST_TYPE_ID`), KEY `MEETING_ID` (`MEETING_ID`), KEY `COLLATERAL_TYPE_ID` (`COLLATERAL_TYPE_ID`), KEY `BUSINESS_ACTIVITIES_ID` (`BUSINESS_ACTIVITIES_ID`), KEY `PRD_OFFERING_ID` (`PRD_OFFERING_ID`), KEY `fk_loan_account` (`PARENT_ACCOUNT_ID`), KEY `fk_loan_rankday` (`MONTH_RANK`), KEY `fk_loan_monthweek` (`MONTH_WEEK`), CONSTRAINT `fk_loan_account` FOREIGN KEY (`PARENT_ACCOUNT_ID`) REFERENCES `loan_account` (`ACCOUNT_ID`), CONSTRAINT `fk_loan_acc_id` FOREIGN KEY (`PARENT_ACCOUNT_ID`) REFERENCES `account` (`ACCOUNT_ID`), CONSTRAINT `fk_loan_bus_act_id` FOREIGN KEY (`BUSINESS_ACTIVITIES_ID`) REFERENCES `lookup_value` (`LOOKUP_ID`), CONSTRAINT `fk_loan_col_type_id` FOREIGN KEY (`COLLATERAL_TYPE_ID`) REFERENCES `lookup_value` (`LOOKUP_ID`), CONSTRAINT `fk_loan_monthweek` FOREIGN KEY (`MONTH_WEEK`) REFERENCES `week_days_master` (`WEEK_DAYS_MASTER_ID`), CONSTRAINT `fk_loan_prd_off_id` FOREIGN KEY (`PRD_OFFERING_ID`) REFERENCES `prd_offering` (`PRD_OFFERING_ID`), CONSTRAINT `fk_loan_rankday` FOREIGN KEY (`MONTH_RANK`) REFERENCES `rank_days_master` (`RANK_DAYS_MASTER_ID`), CONSTRAINT `loan_account_ibfk_1` FOREIGN KEY (`ACCOUNT_ID`) REFERENCES `account` (`ACCOUNT_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `loan_account_ibfk_2` FOREIGN KEY (`CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `loan_account_ibfk_3` FOREIGN KEY (`LOAN_AMOUNT_CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `loan_account_ibfk_4` FOREIGN KEY (`LOAN_BALANCE_CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `loan_account_ibfk_5` FOREIGN KEY (`FUND_ID`) REFERENCES `fund` (`FUND_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `loan_account_ibfk_6` FOREIGN KEY (`GRACE_PERIOD_TYPE_ID`) REFERENCES `grace_period_type` (`GRACE_PERIOD_TYPE_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `loan_account_ibfk_7` FOREIGN KEY (`INTEREST_TYPE_ID`) REFERENCES `interest_types` (`INTEREST_TYPE_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `loan_account_ibfk_8` FOREIGN KEY (`MEETING_ID`) REFERENCES `meeting` (`MEETING_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `loan_activity_details` -- DROP TABLE IF EXISTS `loan_activity_details`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `loan_activity_details` ( `ID` int(11) NOT NULL auto_increment, `CREATED_BY` smallint(6) NOT NULL, `ACCOUNT_ID` int(11) NOT NULL, `CREATED_DATE` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, `COMMENTS` varchar(100) NOT NULL, `PRINCIPAL_AMOUNT` decimal(10,3) default NULL, `PRINCIPAL_AMOUNT_CURRENCY_ID` smallint(6) default NULL, `INTEREST_AMOUNT` decimal(10,3) default NULL, `INTEREST_AMOUNT_CURRENCY_ID` smallint(6) default NULL, `PENALTY_AMOUNT` decimal(10,3) default NULL, `PENALTY_AMOUNT_CURRENCY_ID` smallint(6) default NULL, `FEE_AMOUNT` decimal(10,3) default NULL, `FEE_AMOUNT_CURRENCY_ID` smallint(6) default NULL, `BALANCE_PRINCIPAL_AMOUNT` decimal(10,3) default NULL, `BALANCE_PRINCIPAL_AMOUNT_CURRENCY_ID` smallint(6) default NULL, `BALANCE_INTEREST_AMOUNT` decimal(10,3) default NULL, `BALANCE_INTEREST_AMOUNT_CURRENCY_ID` smallint(6) default NULL, `BALANCE_PENALTY_AMOUNT` decimal(10,3) default NULL, `BALANCE_PENALTY_AMOUNT_CURRENCY_ID` smallint(6) default NULL, `BALANCE_FEE_AMOUNT` decimal(10,3) default NULL, `BALANCE_FEE_AMOUNT_CURRENCY_ID` smallint(6) default NULL, PRIMARY KEY (`ID`), KEY `CREATED_BY` (`CREATED_BY`), KEY `ACCOUNT_ID` (`ACCOUNT_ID`), KEY `PRINCIPAL_AMOUNT_CURRENCY_ID` (`PRINCIPAL_AMOUNT_CURRENCY_ID`), KEY `INTEREST_AMOUNT_CURRENCY_ID` (`INTEREST_AMOUNT_CURRENCY_ID`), KEY `FEE_AMOUNT_CURRENCY_ID` (`FEE_AMOUNT_CURRENCY_ID`), KEY `PENALTY_AMOUNT_CURRENCY_ID` (`PENALTY_AMOUNT_CURRENCY_ID`), KEY `BALANCE_PRINCIPAL_AMOUNT_CURRENCY_ID` (`BALANCE_PRINCIPAL_AMOUNT_CURRENCY_ID`), KEY `BALANCE_INTEREST_AMOUNT_CURRENCY_ID` (`BALANCE_INTEREST_AMOUNT_CURRENCY_ID`), KEY `BALANCE_PENALTY_AMOUNT_CURRENCY_ID` (`BALANCE_PENALTY_AMOUNT_CURRENCY_ID`), KEY `BALANCE_FEE_AMOUNT_CURRENCY_ID` (`BALANCE_FEE_AMOUNT_CURRENCY_ID`), CONSTRAINT `loan_activity_details_ibfk_1` FOREIGN KEY (`CREATED_BY`) REFERENCES `personnel` (`PERSONNEL_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `loan_activity_details_ibfk_10` FOREIGN KEY (`BALANCE_FEE_AMOUNT_CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `loan_activity_details_ibfk_2` FOREIGN KEY (`ACCOUNT_ID`) REFERENCES `account` (`ACCOUNT_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `loan_activity_details_ibfk_3` FOREIGN KEY (`PRINCIPAL_AMOUNT_CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `loan_activity_details_ibfk_4` FOREIGN KEY (`INTEREST_AMOUNT_CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `loan_activity_details_ibfk_5` FOREIGN KEY (`FEE_AMOUNT_CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `loan_activity_details_ibfk_6` FOREIGN KEY (`PENALTY_AMOUNT_CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `loan_activity_details_ibfk_7` FOREIGN KEY (`BALANCE_PRINCIPAL_AMOUNT_CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `loan_activity_details_ibfk_8` FOREIGN KEY (`BALANCE_INTEREST_AMOUNT_CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `loan_activity_details_ibfk_9` FOREIGN KEY (`BALANCE_PENALTY_AMOUNT_CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=802 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `loan_amount_from_last_loan` -- DROP TABLE IF EXISTS `loan_amount_from_last_loan`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `loan_amount_from_last_loan` ( `LOAN_AMOUNT_FROM_LAST_LOAN_ID` smallint(6) NOT NULL auto_increment, `PRD_OFFERING_ID` smallint(6) NOT NULL, `START_RANGE` decimal(10,3) NOT NULL, `END_RANGE` decimal(10,3) NOT NULL, `MIN_LOAN_AMOUNT` decimal(10,3) NOT NULL, `MAX_LOAN_AMNT` decimal(10,3) NOT NULL, `DEFAULT_LOAN_AMOUNT` decimal(10,3) NOT NULL, PRIMARY KEY (`LOAN_AMOUNT_FROM_LAST_LOAN_ID`), KEY `PRD_OFFERING_ID` (`PRD_OFFERING_ID`), CONSTRAINT `loan_amount_from_last_loan_ibfk_1` FOREIGN KEY (`PRD_OFFERING_ID`) REFERENCES `loan_offering` (`PRD_OFFERING_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `loan_amount_from_loan_cycle` -- DROP TABLE IF EXISTS `loan_amount_from_loan_cycle`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `loan_amount_from_loan_cycle` ( `LOAN_AMOUNT_FROM_LOAN_CYCLE_ID` smallint(6) NOT NULL auto_increment, `PRD_OFFERING_ID` smallint(6) NOT NULL, `MIN_LOAN_AMOUNT` decimal(10,3) NOT NULL, `MAX_LOAN_AMNT` decimal(10,3) NOT NULL, `DEFAULT_LOAN_AMOUNT` decimal(10,3) NOT NULL, `RANGE_INDEX` smallint(6) NOT NULL, PRIMARY KEY (`LOAN_AMOUNT_FROM_LOAN_CYCLE_ID`), KEY `PRD_OFFERING_ID` (`PRD_OFFERING_ID`), CONSTRAINT `loan_amount_from_loan_cycle_ibfk_1` FOREIGN KEY (`PRD_OFFERING_ID`) REFERENCES `loan_offering` (`PRD_OFFERING_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=43 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `loan_amount_same_for_all_loan` -- DROP TABLE IF EXISTS `loan_amount_same_for_all_loan`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `loan_amount_same_for_all_loan` ( `LOAN_AMOUNT_SAME_FOR_ALL_LOAN_ID` smallint(6) NOT NULL auto_increment, `PRD_OFFERING_ID` smallint(6) NOT NULL, `MIN_LOAN_AMOUNT` decimal(10,3) NOT NULL, `MAX_LOAN_AMNT` decimal(10,3) NOT NULL, `DEFAULT_LOAN_AMOUNT` decimal(10,3) NOT NULL, PRIMARY KEY (`LOAN_AMOUNT_SAME_FOR_ALL_LOAN_ID`), KEY `PRD_OFFERING_ID` (`PRD_OFFERING_ID`), CONSTRAINT `loan_amount_same_for_all_loan_ibfk_1` FOREIGN KEY (`PRD_OFFERING_ID`) REFERENCES `loan_offering` (`PRD_OFFERING_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=72 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `loan_arrears_aging` -- DROP TABLE IF EXISTS `loan_arrears_aging`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `loan_arrears_aging` ( `ID` int(11) NOT NULL auto_increment, `ACCOUNT_ID` int(11) NOT NULL, `CUSTOMER_ID` int(11) NOT NULL, `CUSTOMER_NAME` varchar(200) default NULL, `PARENT_CUSTOMER_ID` int(11) default NULL, `OFFICE_ID` smallint(6) NOT NULL, `DAYS_IN_ARREARS` smallint(6) NOT NULL, `OVERDUE_PRINCIPAL` decimal(10,3) default NULL, `OVERDUE_PRINCIPAL_CURRENCY_ID` smallint(6) default NULL, `OVERDUE_INTEREST` decimal(10,3) default NULL, `OVERDUE_INTEREST_CURRENCY_ID` smallint(6) default NULL, `OVERDUE_BALANCE` decimal(10,3) default NULL, `OVERDUE_BALANCE_CURRENCY_ID` smallint(6) default NULL, `UNPAID_PRINCIPAL` decimal(10,3) default NULL, `UNPAID_PRINCIPAL_CURRENCY_ID` smallint(6) default NULL, `UNPAID_INTEREST` decimal(10,3) default NULL, `UNPAID_INTEREST_CURRENCY_ID` smallint(6) default NULL, `UNPAID_BALANCE` decimal(10,3) default NULL, `UNPAID_BALANCE_CURRENCY_ID` smallint(6) default NULL, PRIMARY KEY (`ID`), KEY `ACCOUNT_ID` (`ACCOUNT_ID`), KEY `CUSTOMER_ID` (`CUSTOMER_ID`), KEY `PARENT_CUSTOMER_ID` (`PARENT_CUSTOMER_ID`), KEY `OFFICE_ID` (`OFFICE_ID`), KEY `OVERDUE_PRINCIPAL_CURRENCY_ID` (`OVERDUE_PRINCIPAL_CURRENCY_ID`), KEY `OVERDUE_INTEREST_CURRENCY_ID` (`OVERDUE_INTEREST_CURRENCY_ID`), KEY `OVERDUE_BALANCE_CURRENCY_ID` (`OVERDUE_BALANCE_CURRENCY_ID`), KEY `UNPAID_PRINCIPAL_CURRENCY_ID` (`UNPAID_PRINCIPAL_CURRENCY_ID`), KEY `UNPAID_INTEREST_CURRENCY_ID` (`UNPAID_INTEREST_CURRENCY_ID`), KEY `UNPAID_BALANCE_CURRENCY_ID` (`UNPAID_BALANCE_CURRENCY_ID`), CONSTRAINT `loan_arrears_aging_ibfk_1` FOREIGN KEY (`ACCOUNT_ID`) REFERENCES `account` (`ACCOUNT_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `loan_arrears_aging_ibfk_10` FOREIGN KEY (`UNPAID_BALANCE_CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `loan_arrears_aging_ibfk_2` FOREIGN KEY (`CUSTOMER_ID`) REFERENCES `customer` (`CUSTOMER_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `loan_arrears_aging_ibfk_3` FOREIGN KEY (`PARENT_CUSTOMER_ID`) REFERENCES `customer` (`CUSTOMER_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `loan_arrears_aging_ibfk_4` FOREIGN KEY (`OFFICE_ID`) REFERENCES `office` (`OFFICE_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `loan_arrears_aging_ibfk_5` FOREIGN KEY (`OVERDUE_PRINCIPAL_CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `loan_arrears_aging_ibfk_6` FOREIGN KEY (`OVERDUE_INTEREST_CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `loan_arrears_aging_ibfk_7` FOREIGN KEY (`OVERDUE_BALANCE_CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `loan_arrears_aging_ibfk_8` FOREIGN KEY (`UNPAID_PRINCIPAL_CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `loan_arrears_aging_ibfk_9` FOREIGN KEY (`UNPAID_INTEREST_CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=324 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `loan_fee_schedule` -- DROP TABLE IF EXISTS `loan_fee_schedule`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `loan_fee_schedule` ( `ACCOUNT_FEES_DETAIL_ID` int(11) NOT NULL auto_increment, `ID` int(11) NOT NULL, `INSTALLMENT_ID` int(11) NOT NULL, `FEE_ID` smallint(6) NOT NULL, `ACCOUNT_FEE_ID` int(11) NOT NULL, `AMOUNT` decimal(10,3) default NULL, `AMOUNT_CURRENCY_ID` smallint(6) default NULL, `AMOUNT_PAID` decimal(10,3) default NULL, `AMOUNT_PAID_CURRENCY_ID` smallint(6) default NULL, `VERSION_NO` int(11) NOT NULL, PRIMARY KEY (`ACCOUNT_FEES_DETAIL_ID`), KEY `ID` (`ID`), KEY `AMOUNT_CURRENCY_ID` (`AMOUNT_CURRENCY_ID`), KEY `AMOUNT_PAID_CURRENCY_ID` (`AMOUNT_PAID_CURRENCY_ID`), KEY `FEE_ID` (`FEE_ID`), KEY `ACCOUNT_FEE_ID` (`ACCOUNT_FEE_ID`), CONSTRAINT `loan_fee_schedule_ibfk_1` FOREIGN KEY (`ID`) REFERENCES `loan_schedule` (`ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `loan_fee_schedule_ibfk_2` FOREIGN KEY (`AMOUNT_CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `loan_fee_schedule_ibfk_3` FOREIGN KEY (`AMOUNT_PAID_CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `loan_fee_schedule_ibfk_4` FOREIGN KEY (`FEE_ID`) REFERENCES `fees` (`FEE_ID`), CONSTRAINT `loan_fee_schedule_ibfk_5` FOREIGN KEY (`ACCOUNT_FEE_ID`) REFERENCES `account_fees` (`ACCOUNT_FEE_ID`) ) ENGINE=InnoDB AUTO_INCREMENT=797 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `loan_offering` -- DROP TABLE IF EXISTS `loan_offering`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `loan_offering` ( `PRD_OFFERING_ID` smallint(6) NOT NULL, `INTEREST_TYPE_ID` smallint(6) NOT NULL, `INTEREST_CALC_RULE_ID` smallint(6) default NULL, `PENALTY_ID` smallint(6) default NULL, `MIN_LOAN_AMOUNT` decimal(10,3) default NULL, `MIN_LOAN_AMOUNT_CURRENCY_ID` smallint(6) default NULL, `MAX_LOAN_AMNT` decimal(10,3) default NULL, `MAX_LOAN_AMNT_CURRENCY_ID` smallint(6) default NULL, `DEFAULT_LOAN_AMOUNT` decimal(10,3) default NULL, `DEFAULT_LOAN_AMOUNT_CURRENCY_ID` smallint(6) default NULL, `GRACEPERIOD_TYPE_ID` smallint(6) default NULL, `MAX_INTEREST_RATE` decimal(13,10) NOT NULL, `MIN_INTEREST_RATE` decimal(13,10) NOT NULL, `DEF_INTEREST_RATE` decimal(13,10) NOT NULL, `MAX_NO_INSTALLMENTS` smallint(6) default NULL, `MIN_NO_INSTALLMENTS` smallint(6) default NULL, `DEF_NO_INSTALLMENTS` smallint(6) default NULL, `PENALTY_GRACE` smallint(6) default NULL, `LOAN_COUNTER_FLAG` smallint(6) default NULL, `INT_DED_DISBURSEMENT_FLAG` smallint(6) NOT NULL, `PRIN_DUE_LAST_INST_FLAG` smallint(6) NOT NULL, `PENALTY_RATE` decimal(13,10) default NULL, `GRACE_PERIOD_DURATION` smallint(6) default NULL, `PRINCIPAL_GLCODE_ID` smallint(6) NOT NULL, `INTEREST_GLCODE_ID` smallint(6) NOT NULL, `PENALTIES_GLCODE_ID` smallint(6) default NULL, PRIMARY KEY (`PRD_OFFERING_ID`), KEY `PRINCIPAL_GLCODE_ID` (`PRINCIPAL_GLCODE_ID`), KEY `INTEREST_GLCODE_ID` (`INTEREST_GLCODE_ID`), KEY `LOAN_OFFERING_PENALTY_GLCODE` (`PENALTIES_GLCODE_ID`), KEY `GRACEPERIOD_TYPE_ID` (`GRACEPERIOD_TYPE_ID`), KEY `LOAN_OFFERING_PENALTY` (`PENALTY_ID`), KEY `LOAN_OFFERING_INTEREST_CALC_RULE` (`INTEREST_CALC_RULE_ID`), KEY `INTEREST_TYPE_ID` (`INTEREST_TYPE_ID`), KEY `MIN_LOAN_AMOUNT_CURRENCY_ID` (`MIN_LOAN_AMOUNT_CURRENCY_ID`), KEY `MAX_LOAN_AMNT_CURRENCY_ID` (`MAX_LOAN_AMNT_CURRENCY_ID`), KEY `DEFAULT_LOAN_AMOUNT_CURRENCY_ID` (`DEFAULT_LOAN_AMOUNT_CURRENCY_ID`), CONSTRAINT `loan_offering_ibfk_1` FOREIGN KEY (`PRINCIPAL_GLCODE_ID`) REFERENCES `gl_code` (`GLCODE_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `loan_offering_ibfk_2` FOREIGN KEY (`INTEREST_GLCODE_ID`) REFERENCES `gl_code` (`GLCODE_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `loan_offering_ibfk_3` FOREIGN KEY (`GRACEPERIOD_TYPE_ID`) REFERENCES `grace_period_type` (`GRACE_PERIOD_TYPE_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `loan_offering_ibfk_4` FOREIGN KEY (`PRD_OFFERING_ID`) REFERENCES `prd_offering` (`PRD_OFFERING_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `loan_offering_ibfk_5` FOREIGN KEY (`INTEREST_TYPE_ID`) REFERENCES `interest_types` (`INTEREST_TYPE_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `loan_offering_ibfk_6` FOREIGN KEY (`MIN_LOAN_AMOUNT_CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `loan_offering_ibfk_7` FOREIGN KEY (`MAX_LOAN_AMNT_CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `loan_offering_ibfk_8` FOREIGN KEY (`DEFAULT_LOAN_AMOUNT_CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `LOAN_OFFERING_INTEREST_CALC_RULE` FOREIGN KEY (`INTEREST_CALC_RULE_ID`) REFERENCES `interest_calc_rule` (`INTEREST_CALC_RULE_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `LOAN_OFFERING_PENALTY` FOREIGN KEY (`PENALTY_ID`) REFERENCES `penalty` (`PENALTY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `LOAN_OFFERING_PENALTY_GLCODE` FOREIGN KEY (`PENALTIES_GLCODE_ID`) REFERENCES `gl_code` (`GLCODE_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `loan_offering_fund` -- DROP TABLE IF EXISTS `loan_offering_fund`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `loan_offering_fund` ( `LOAN_OFFERING_FUND_ID` smallint(6) NOT NULL auto_increment, `FUND_ID` smallint(6) NOT NULL, `PRD_OFFERING_ID` smallint(6) NOT NULL, PRIMARY KEY (`LOAN_OFFERING_FUND_ID`), KEY `PRD_OFFERING_ID` (`PRD_OFFERING_ID`), KEY `FUND_ID` (`FUND_ID`), CONSTRAINT `loan_offering_fund_ibfk_1` FOREIGN KEY (`PRD_OFFERING_ID`) REFERENCES `loan_offering` (`PRD_OFFERING_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `loan_offering_fund_ibfk_2` FOREIGN KEY (`FUND_ID`) REFERENCES `fund` (`FUND_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `loan_penalty` -- DROP TABLE IF EXISTS `loan_penalty`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `loan_penalty` ( `LOAN_PENALTY_ID` int(11) NOT NULL auto_increment, `ACCOUNT_ID` int(11) default NULL, `PENALTY_ID` smallint(6) NOT NULL, `START_DATE` date default NULL, `END_DATE` date default NULL, `PENALTY_TYPE` varchar(200) default NULL, `PENALTY_RATE` decimal(13,10) default NULL, PRIMARY KEY (`LOAN_PENALTY_ID`), KEY `ACCOUNT_ID` (`ACCOUNT_ID`), KEY `PENALTY_ID` (`PENALTY_ID`), CONSTRAINT `loan_penalty_ibfk_1` FOREIGN KEY (`ACCOUNT_ID`) REFERENCES `loan_account` (`ACCOUNT_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `loan_penalty_ibfk_2` FOREIGN KEY (`PENALTY_ID`) REFERENCES `penalty` (`PENALTY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `loan_perf_history` -- DROP TABLE IF EXISTS `loan_perf_history`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `loan_perf_history` ( `ID` int(11) NOT NULL auto_increment, `ACCOUNT_ID` int(11) NOT NULL, `NO_OF_PAYMENTS` smallint(6) default NULL, `NO_OF_MISSED_PAYMENTS` smallint(6) default NULL, `DAYS_IN_ARREARS` smallint(6) default NULL, `LOAN_MATURITY_DATE` date default NULL, PRIMARY KEY (`ID`), KEY `ACCOUNT_ID` (`ACCOUNT_ID`), CONSTRAINT `loan_perf_history_ibfk_1` FOREIGN KEY (`ACCOUNT_ID`) REFERENCES `account` (`ACCOUNT_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=475 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `loan_schedule` -- DROP TABLE IF EXISTS `loan_schedule`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `loan_schedule` ( `ID` int(11) NOT NULL auto_increment, `ACCOUNT_ID` int(11) NOT NULL, `CUSTOMER_ID` int(11) NOT NULL, `CURRENCY_ID` smallint(6) default NULL, `ACTION_DATE` date default NULL, `PRINCIPAL` decimal(10,3) NOT NULL, `PRINCIPAL_CURRENCY_ID` smallint(6) default NULL, `INTEREST` decimal(10,3) NOT NULL, `INTEREST_CURRENCY_ID` smallint(6) default NULL, `PENALTY` decimal(10,3) NOT NULL, `PENALTY_CURRENCY_ID` smallint(6) default NULL, `MISC_FEES` decimal(10,3) default NULL, `MISC_FEES_CURRENCY_ID` smallint(6) default NULL, `MISC_FEES_PAID` decimal(10,3) default NULL, `MISC_FEES_PAID_CURRENCY_ID` smallint(6) default NULL, `MISC_PENALTY` decimal(10,3) default NULL, `MISC_PENALTY_CURRENCY_ID` smallint(6) default NULL, `MISC_PENALTY_PAID` decimal(10,3) default NULL, `MISC_PENALTY_PAID_CURRENCY_ID` smallint(6) default NULL, `PRINCIPAL_PAID` decimal(10,3) default NULL, `PRINCIPAL_PAID_CURRENCY_ID` smallint(6) default NULL, `INTEREST_PAID` decimal(10,3) default NULL, `INTEREST_PAID_CURRENCY_ID` smallint(6) default NULL, `PENALTY_PAID` decimal(10,3) default NULL, `PENALTY_PAID_CURRENCY_ID` smallint(6) default NULL, `PAYMENT_STATUS` smallint(6) NOT NULL, `INSTALLMENT_ID` smallint(6) NOT NULL, `PAYMENT_DATE` date default NULL, `PARENT_FLAG` smallint(6) default NULL, `VERSION_NO` int(11) NOT NULL, PRIMARY KEY (`ID`), KEY `ACCOUNT_ID` (`ACCOUNT_ID`), KEY `CURRENCY_ID` (`CURRENCY_ID`), KEY `PRINCIPAL_CURRENCY_ID` (`PRINCIPAL_CURRENCY_ID`), KEY `INTEREST_CURRENCY_ID` (`INTEREST_CURRENCY_ID`), KEY `PENALTY_CURRENCY_ID` (`PENALTY_CURRENCY_ID`), KEY `MISC_FEES_CURRENCY_ID` (`MISC_FEES_CURRENCY_ID`), KEY `MISC_FEES_PAID_CURRENCY_ID` (`MISC_FEES_PAID_CURRENCY_ID`), KEY `MISC_PENALTY_CURRENCY_ID` (`MISC_PENALTY_CURRENCY_ID`), KEY `PRINCIPAL_PAID_CURRENCY_ID` (`PRINCIPAL_PAID_CURRENCY_ID`), KEY `INTEREST_PAID_CURRENCY_ID` (`INTEREST_PAID_CURRENCY_ID`), KEY `PENALTY_PAID_CURRENCY_ID` (`PENALTY_PAID_CURRENCY_ID`), KEY `MISC_PENALTY_PAID_CURRENCY_ID` (`MISC_PENALTY_PAID_CURRENCY_ID`), KEY `CUSTOMER_ID` (`CUSTOMER_ID`), CONSTRAINT `loan_schedule_ibfk_1` FOREIGN KEY (`ACCOUNT_ID`) REFERENCES `account` (`ACCOUNT_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `loan_schedule_ibfk_10` FOREIGN KEY (`INTEREST_PAID_CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `loan_schedule_ibfk_11` FOREIGN KEY (`PENALTY_PAID_CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `loan_schedule_ibfk_12` FOREIGN KEY (`MISC_PENALTY_PAID_CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `loan_schedule_ibfk_13` FOREIGN KEY (`CUSTOMER_ID`) REFERENCES `customer` (`CUSTOMER_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `loan_schedule_ibfk_2` FOREIGN KEY (`CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `loan_schedule_ibfk_3` FOREIGN KEY (`PRINCIPAL_CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `loan_schedule_ibfk_4` FOREIGN KEY (`INTEREST_CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `loan_schedule_ibfk_5` FOREIGN KEY (`PENALTY_CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `loan_schedule_ibfk_6` FOREIGN KEY (`MISC_FEES_CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `loan_schedule_ibfk_7` FOREIGN KEY (`MISC_FEES_PAID_CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `loan_schedule_ibfk_8` FOREIGN KEY (`MISC_PENALTY_CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `loan_schedule_ibfk_9` FOREIGN KEY (`PRINCIPAL_PAID_CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=11325 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `loan_summary` -- DROP TABLE IF EXISTS `loan_summary`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `loan_summary` ( `ACCOUNT_ID` int(11) NOT NULL, `ORIG_PRINCIPAL` decimal(10,3) default NULL, `ORIG_PRINCIPAL_CURRENCY_ID` smallint(6) default NULL, `ORIG_INTEREST` decimal(10,3) default NULL, `ORIG_INTEREST_CURRENCY_ID` smallint(6) default NULL, `ORIG_FEES` decimal(10,3) default NULL, `ORIG_FEES_CURRENCY_ID` smallint(6) default NULL, `ORIG_PENALTY` decimal(10,3) default NULL, `ORIG_PENALTY_CURRENCY_ID` smallint(6) default NULL, `PRINCIPAL_PAID` decimal(10,3) default NULL, `PRINCIPAL_PAID_CURRENCY_ID` smallint(6) default NULL, `INTEREST_PAID` decimal(10,3) default NULL, `INTEREST_PAID_CURRENCY_ID` smallint(6) default NULL, `FEES_PAID` decimal(10,3) default NULL, `FEES_PAID_CURRENCY_ID` smallint(6) default NULL, `PENALTY_PAID` decimal(10,3) default NULL, `PENALTY_PAID_CURRENCY_ID` smallint(6) default NULL, `RAW_AMOUNT_TOTAL` decimal(10,3) default NULL, `RAW_AMOUNT_TOTAL_CURRENCY_ID` smallint(6) default NULL, PRIMARY KEY (`ACCOUNT_ID`), KEY `ORIG_PRINCIPAL_CURRENCY_ID` (`ORIG_PRINCIPAL_CURRENCY_ID`), KEY `ORIG_INTEREST_CURRENCY_ID` (`ORIG_INTEREST_CURRENCY_ID`), KEY `ORIG_FEES_CURRENCY_ID` (`ORIG_FEES_CURRENCY_ID`), KEY `ORIG_PENALTY_CURRENCY_ID` (`ORIG_PENALTY_CURRENCY_ID`), KEY `PRINCIPAL_PAID_CURRENCY_ID` (`PRINCIPAL_PAID_CURRENCY_ID`), KEY `INTEREST_PAID_CURRENCY_ID` (`INTEREST_PAID_CURRENCY_ID`), KEY `FEES_PAID_CURRENCY_ID` (`FEES_PAID_CURRENCY_ID`), KEY `PENALTY_PAID_CURRENCY_ID` (`PENALTY_PAID_CURRENCY_ID`), KEY `FK_LOAN_SUMMARY_RAW_AMOUNT_TOTAL` (`RAW_AMOUNT_TOTAL_CURRENCY_ID`), CONSTRAINT `FK_LOAN_SUMMARY_RAW_AMOUNT_TOTAL` FOREIGN KEY (`RAW_AMOUNT_TOTAL_CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`), CONSTRAINT `loan_summary_ibfk_1` FOREIGN KEY (`ORIG_PRINCIPAL_CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `loan_summary_ibfk_2` FOREIGN KEY (`ORIG_INTEREST_CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `loan_summary_ibfk_3` FOREIGN KEY (`ORIG_FEES_CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `loan_summary_ibfk_4` FOREIGN KEY (`ORIG_PENALTY_CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `loan_summary_ibfk_5` FOREIGN KEY (`PRINCIPAL_PAID_CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `loan_summary_ibfk_6` FOREIGN KEY (`INTEREST_PAID_CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `loan_summary_ibfk_7` FOREIGN KEY (`FEES_PAID_CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `loan_summary_ibfk_8` FOREIGN KEY (`PENALTY_PAID_CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `loan_summary_ibfk_9` FOREIGN KEY (`ACCOUNT_ID`) REFERENCES `loan_account` (`ACCOUNT_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `loan_trxn_detail` -- DROP TABLE IF EXISTS `loan_trxn_detail`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `loan_trxn_detail` ( `ACCOUNT_TRXN_ID` int(11) NOT NULL, `PRINCIPAL_AMOUNT` decimal(10,3) default NULL, `PRINCIPAL_AMOUNT_CURRENCY_ID` smallint(6) default NULL, `INTEREST_AMOUNT` decimal(10,3) default NULL, `INTEREST_AMOUNT_CURRENCY_ID` smallint(6) default NULL, `PENALTY_AMOUNT` decimal(10,3) default NULL, `PENALTY_AMOUNT_CURRENCY_ID` smallint(6) default NULL, `MISC_FEE_AMOUNT` decimal(10,3) default NULL, `MISC_FEE_AMOUNT_CURRENCY_ID` smallint(6) default NULL, `MISC_PENALTY_AMOUNT` decimal(10,3) default NULL, `MISC_PENALTY_AMOUNT_CURRENCY_ID` smallint(6) default NULL, PRIMARY KEY (`ACCOUNT_TRXN_ID`), KEY `PRINCIPAL_AMOUNT_CURRENCY_ID` (`PRINCIPAL_AMOUNT_CURRENCY_ID`), KEY `INTEREST_AMOUNT_CURRENCY_ID` (`INTEREST_AMOUNT_CURRENCY_ID`), KEY `PENALTY_AMOUNT_CURRENCY_ID` (`PENALTY_AMOUNT_CURRENCY_ID`), KEY `MISC_PENALTY_AMOUNT_CURRENCY_ID` (`MISC_PENALTY_AMOUNT_CURRENCY_ID`), KEY `MISC_FEE_AMOUNT_CURRENCY_ID` (`MISC_FEE_AMOUNT_CURRENCY_ID`), KEY `LOAN_ACCOUNT_TRXN_IDX` (`ACCOUNT_TRXN_ID`), CONSTRAINT `loan_trxn_detail_ibfk_1` FOREIGN KEY (`PRINCIPAL_AMOUNT_CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `loan_trxn_detail_ibfk_2` FOREIGN KEY (`INTEREST_AMOUNT_CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `loan_trxn_detail_ibfk_3` FOREIGN KEY (`PENALTY_AMOUNT_CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `loan_trxn_detail_ibfk_4` FOREIGN KEY (`MISC_PENALTY_AMOUNT_CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `loan_trxn_detail_ibfk_5` FOREIGN KEY (`MISC_FEE_AMOUNT_CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `loan_trxn_detail_ibfk_6` FOREIGN KEY (`ACCOUNT_TRXN_ID`) REFERENCES `account_trxn` (`ACCOUNT_TRXN_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `lookup_entity` -- DROP TABLE IF EXISTS `lookup_entity`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `lookup_entity` ( `ENTITY_ID` smallint(6) NOT NULL auto_increment, `ENTITY_NAME` varchar(100) NOT NULL, `DESCRIPTION` varchar(200) default NULL, PRIMARY KEY (`ENTITY_ID`) ) ENGINE=InnoDB AUTO_INCREMENT=99 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `lookup_label` -- DROP TABLE IF EXISTS `lookup_label`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `lookup_label` ( `LABEL_ID` int(11) NOT NULL auto_increment, `ENTITY_ID` smallint(6) default NULL, `LOCALE_ID` smallint(6) default NULL, `ENTITY_NAME` varchar(200) default NULL, PRIMARY KEY (`LABEL_ID`), KEY `ENTITY_ID` (`ENTITY_ID`), KEY `LOCALE_ID` (`LOCALE_ID`), CONSTRAINT `lookup_label_ibfk_1` FOREIGN KEY (`ENTITY_ID`) REFERENCES `lookup_entity` (`ENTITY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `lookup_label_ibfk_2` FOREIGN KEY (`LOCALE_ID`) REFERENCES `supported_locale` (`LOCALE_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=180 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `lookup_value` -- DROP TABLE IF EXISTS `lookup_value`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `lookup_value` ( `LOOKUP_ID` int(11) NOT NULL auto_increment, `ENTITY_ID` smallint(6) default NULL, `LOOKUP_NAME` varchar(100) default NULL, PRIMARY KEY (`LOOKUP_ID`), UNIQUE KEY `LOOKUP_NAME_IDX` (`LOOKUP_NAME`), KEY `LOOKUP_VALUE_IDX` (`ENTITY_ID`), CONSTRAINT `lookup_value_ibfk_1` FOREIGN KEY (`ENTITY_ID`) REFERENCES `lookup_entity` (`ENTITY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=678 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `lookup_value_locale` -- DROP TABLE IF EXISTS `lookup_value_locale`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `lookup_value_locale` ( `LOOKUP_VALUE_ID` int(11) NOT NULL auto_increment, `LOCALE_ID` smallint(6) NOT NULL, `LOOKUP_ID` int(11) NOT NULL, `LOOKUP_VALUE` varchar(300) default NULL, PRIMARY KEY (`LOOKUP_VALUE_ID`), KEY `LOOKUP_ID` (`LOOKUP_ID`), KEY `LOCALE_ID` (`LOCALE_ID`), CONSTRAINT `lookup_value_locale_ibfk_1` FOREIGN KEY (`LOOKUP_ID`) REFERENCES `lookup_value` (`LOOKUP_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `lookup_value_locale_ibfk_2` FOREIGN KEY (`LOCALE_ID`) REFERENCES `supported_locale` (`LOCALE_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=1008 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `max_min_loan_amount` -- DROP TABLE IF EXISTS `max_min_loan_amount`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `max_min_loan_amount` ( `ACCOUNT_ID` int(11) NOT NULL auto_increment, `MIN_LOAN_AMOUNT` decimal(10,3) NOT NULL, `MAX_LOAN_AMOUNT` decimal(10,3) NOT NULL, PRIMARY KEY (`ACCOUNT_ID`), CONSTRAINT `max_min_loan_amount_ibfk_1` FOREIGN KEY (`ACCOUNT_ID`) REFERENCES `loan_account` (`ACCOUNT_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=992 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `max_min_no_of_install` -- DROP TABLE IF EXISTS `max_min_no_of_install`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `max_min_no_of_install` ( `ACCOUNT_ID` int(11) NOT NULL auto_increment, `MIN_NO_INSTALL` decimal(10,3) NOT NULL, `MAX_NO_INSTALL` decimal(10,3) NOT NULL, PRIMARY KEY (`ACCOUNT_ID`), CONSTRAINT `max_min_no_of_install_ibfk_1` FOREIGN KEY (`ACCOUNT_ID`) REFERENCES `loan_account` (`ACCOUNT_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=992 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `meeting` -- DROP TABLE IF EXISTS `meeting`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `meeting` ( `MEETING_ID` int(11) NOT NULL auto_increment, `MEETING_TYPE_ID` smallint(6) NOT NULL, `MEETING_PLACE` varchar(200) default NULL, `START_DATE` date default NULL, `END_DATE` date default NULL, `START_TIME` date default NULL, `END_TIME` date default NULL, `VERSION_NO` int(11) default NULL, PRIMARY KEY (`MEETING_ID`), KEY `MEETING_TYPE_ID` (`MEETING_TYPE_ID`), CONSTRAINT `meeting_ibfk_1` FOREIGN KEY (`MEETING_TYPE_ID`) REFERENCES `meeting_type` (`MEETING_TYPE_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=879 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `meeting_type` -- DROP TABLE IF EXISTS `meeting_type`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `meeting_type` ( `MEETING_TYPE_ID` smallint(6) NOT NULL auto_increment, `MEETING_PURPOSE` varchar(50) default NULL, `DESCRIPTION` varchar(200) NOT NULL, PRIMARY KEY (`MEETING_TYPE_ID`) ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `mfi_attribute` -- DROP TABLE IF EXISTS `mfi_attribute`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `mfi_attribute` ( `ATTRIBUTE_ID` smallint(6) NOT NULL, `OFFICE_ID` smallint(6) NOT NULL, `ATTRIBUTE_NAME` varchar(100) NOT NULL, `ATTRIBUTE_VALUE` varchar(200) NOT NULL, PRIMARY KEY (`ATTRIBUTE_ID`), KEY `OFFICE_ID` (`OFFICE_ID`), CONSTRAINT `mfi_attribute_ibfk_1` FOREIGN KEY (`OFFICE_ID`) REFERENCES `office` (`OFFICE_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `mis_bank` -- DROP TABLE IF EXISTS `mis_bank`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `mis_bank` ( `bankid` int(11) NOT NULL default '0', `bankname` varchar(50) NOT NULL default '', PRIMARY KEY (`bankid`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; SET character_set_client = @saved_cs_client; -- -- Table structure for table `mis_bankbranch` -- DROP TABLE IF EXISTS `mis_bankbranch`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `mis_bankbranch` ( `bankbranchid` int(11) NOT NULL default '0', `bankid` int(11) NOT NULL default '0', `branchname` varchar(50) NOT NULL default '', `areaid` int(11) NOT NULL default '0', PRIMARY KEY (`bankbranchid`), KEY `FK_mis_bankbranch_mis_bank` (`bankid`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; SET character_set_client = @saved_cs_client; -- -- Table structure for table `mis_geographicalarea` -- DROP TABLE IF EXISTS `mis_geographicalarea`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `mis_geographicalarea` ( `areaid` int(11) NOT NULL default '0', `areaname` varchar(50) NOT NULL default '', `areatypeid` int(11) NOT NULL default '0', `parentareaid` int(11) default NULL, PRIMARY KEY (`areaid`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; SET character_set_client = @saved_cs_client; -- -- Table structure for table `mis_geographicalareatype` -- DROP TABLE IF EXISTS `mis_geographicalareatype`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `mis_geographicalareatype` ( `areatypeid` int(11) NOT NULL default '0', `areatypename` varchar(20) NOT NULL default '', PRIMARY KEY (`areatypeid`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; SET character_set_client = @saved_cs_client; -- -- Table structure for table `mis_shgmemberprofile` -- DROP TABLE IF EXISTS `mis_shgmemberprofile`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `mis_shgmemberprofile` ( `groupid` int(11) NOT NULL default '0', `memberid` int(11) NOT NULL default '0', `membername` varchar(100) NOT NULL default '', `attendence` varchar(100) NOT NULL default '0', `savings` decimal(10,0) NOT NULL default '0', `mstatus` varchar(100) NOT NULL default '0', PRIMARY KEY (`memberid`,`groupid`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; SET character_set_client = @saved_cs_client; -- -- Table structure for table `mis_shgprofile` -- DROP TABLE IF EXISTS `mis_shgprofile`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `mis_shgprofile` ( `groupid` int(11) NOT NULL default '0', `groupname` varchar(50) NOT NULL default '', `nummembers` int(11) NOT NULL default '0', `areaid` int(11) NOT NULL default '0', `formationdate` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, `groupleader1` varchar(50) default NULL, `groupleader2` varchar(50) default NULL, `bankbranchid` int(11) default NULL, PRIMARY KEY (`groupid`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; SET character_set_client = @saved_cs_client; -- -- Table structure for table `no_of_install_from_last_loan` -- DROP TABLE IF EXISTS `no_of_install_from_last_loan`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `no_of_install_from_last_loan` ( `NO_OF_INSTALL_FROM_LAST_LOAN_ID` smallint(6) NOT NULL auto_increment, `PRD_OFFERING_ID` smallint(6) NOT NULL, `START_RANGE` decimal(10,3) NOT NULL, `END_RANGE` decimal(10,3) NOT NULL, `MIN_NO_INSTALL` decimal(10,3) NOT NULL, `MAX_NO_INSTALL` decimal(10,3) NOT NULL, `DEFAULT_NO_INSTALL` decimal(10,3) NOT NULL, PRIMARY KEY (`NO_OF_INSTALL_FROM_LAST_LOAN_ID`), KEY `PRD_OFFERING_ID` (`PRD_OFFERING_ID`), CONSTRAINT `no_of_install_from_last_loan_ibfk_1` FOREIGN KEY (`PRD_OFFERING_ID`) REFERENCES `loan_offering` (`PRD_OFFERING_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `no_of_install_from_loan_cycle` -- DROP TABLE IF EXISTS `no_of_install_from_loan_cycle`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `no_of_install_from_loan_cycle` ( `NO_OF_INSTALL_FROM_LOAN_CYCLE_ID` smallint(6) NOT NULL auto_increment, `PRD_OFFERING_ID` smallint(6) NOT NULL, `MIN_NO_INSTALL` decimal(10,3) NOT NULL, `MAX_NO_INSTALL` decimal(10,3) NOT NULL, `DEFAULT_NO_INSTALL` decimal(10,3) NOT NULL, `RANGE_INDEX` decimal(10,3) NOT NULL, PRIMARY KEY (`NO_OF_INSTALL_FROM_LOAN_CYCLE_ID`), KEY `PRD_OFFERING_ID` (`PRD_OFFERING_ID`), CONSTRAINT `no_of_install_from_loan_cycle_ibfk_1` FOREIGN KEY (`PRD_OFFERING_ID`) REFERENCES `loan_offering` (`PRD_OFFERING_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `no_of_install_same_for_all_loan` -- DROP TABLE IF EXISTS `no_of_install_same_for_all_loan`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `no_of_install_same_for_all_loan` ( `NO_OF_INSTALL_SAME_FOR_ALL_LOAN_ID` smallint(6) NOT NULL auto_increment, `PRD_OFFERING_ID` smallint(6) NOT NULL, `MIN_NO_INSTALL` decimal(10,3) NOT NULL, `MAX_NO_INSTALL` decimal(10,3) NOT NULL, `DEFAULT_NO_INSTALL` decimal(10,3) NOT NULL, PRIMARY KEY (`NO_OF_INSTALL_SAME_FOR_ALL_LOAN_ID`), KEY `PRD_OFFERING_ID` (`PRD_OFFERING_ID`), CONSTRAINT `no_of_install_same_for_all_loan_ibfk_1` FOREIGN KEY (`PRD_OFFERING_ID`) REFERENCES `loan_offering` (`PRD_OFFERING_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=73 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `offering_fund` -- DROP TABLE IF EXISTS `offering_fund`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `offering_fund` ( `OFFERING_FUND_ID` smallint(6) NOT NULL, `FUND_ID` smallint(6) default NULL, `PRD_OFFERING_ID` smallint(6) default NULL, PRIMARY KEY (`OFFERING_FUND_ID`), KEY `FUND_ID` (`FUND_ID`), KEY `PRD_OFFERING_ID` (`PRD_OFFERING_ID`), CONSTRAINT `offering_fund_ibfk_1` FOREIGN KEY (`FUND_ID`) REFERENCES `fund` (`FUND_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `offering_fund_ibfk_2` FOREIGN KEY (`PRD_OFFERING_ID`) REFERENCES `prd_offering` (`PRD_OFFERING_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `office` -- DROP TABLE IF EXISTS `office`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `office` ( `OFFICE_ID` smallint(6) NOT NULL auto_increment, `GLOBAL_OFFICE_NUM` varchar(100) NOT NULL, `OFFICE_LEVEL_ID` smallint(6) NOT NULL, `SEARCH_ID` varchar(100) NOT NULL, `MAX_CHILD_COUNT` int(11) NOT NULL, `LOCAL_REMOTE_FLAG` smallint(6) NOT NULL, `DISPLAY_NAME` varchar(200) NOT NULL, `CREATED_BY` smallint(6) default NULL, `CREATED_DATE` date default NULL, `UPDATED_BY` smallint(6) default NULL, `UPDATED_DATE` date default NULL, `OFFICE_SHORT_NAME` varchar(4) NOT NULL, `PARENT_OFFICE_ID` smallint(6) default NULL, `STATUS_ID` smallint(6) NOT NULL, `VERSION_NO` int(11) NOT NULL, `OFFICE_CODE_ID` smallint(6) default NULL, PRIMARY KEY (`OFFICE_ID`), UNIQUE KEY `GLOBAL_OFFICE_NUM` (`GLOBAL_OFFICE_NUM`), UNIQUE KEY `OFFICE_GLOBAL_IDX` (`GLOBAL_OFFICE_NUM`), KEY `OFFICE_LEVEL_ID` (`OFFICE_LEVEL_ID`), KEY `PARENT_OFFICE_ID` (`PARENT_OFFICE_ID`), KEY `STATUS_ID` (`STATUS_ID`), KEY `OFFICE_CODE_ID` (`OFFICE_CODE_ID`), CONSTRAINT `office_ibfk_1` FOREIGN KEY (`OFFICE_LEVEL_ID`) REFERENCES `office_level` (`LEVEL_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `office_ibfk_2` FOREIGN KEY (`PARENT_OFFICE_ID`) REFERENCES `office` (`OFFICE_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `office_ibfk_3` FOREIGN KEY (`STATUS_ID`) REFERENCES `office_status` (`STATUS_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `office_ibfk_4` FOREIGN KEY (`OFFICE_CODE_ID`) REFERENCES `office_code` (`CODE_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=416 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `office_action_payment_type` -- DROP TABLE IF EXISTS `office_action_payment_type`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `office_action_payment_type` ( `OFFICE_ID` smallint(6) default NULL, `PRD_TYPE_ID` smallint(6) default NULL, `ACCOUNT_ACTION_ID` smallint(6) NOT NULL, `PAYMENT_TYPE_ID` smallint(6) default NULL, KEY `ACCOUNT_ACTION_ID` (`ACCOUNT_ACTION_ID`), KEY `OFFICE_ID` (`OFFICE_ID`), KEY `PAYMENT_TYPE_ID` (`PAYMENT_TYPE_ID`), KEY `PRD_TYPE_ID` (`PRD_TYPE_ID`), CONSTRAINT `office_action_payment_type_ibfk_1` FOREIGN KEY (`ACCOUNT_ACTION_ID`) REFERENCES `account_action` (`ACCOUNT_ACTION_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `office_action_payment_type_ibfk_2` FOREIGN KEY (`OFFICE_ID`) REFERENCES `office` (`OFFICE_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `office_action_payment_type_ibfk_3` FOREIGN KEY (`PAYMENT_TYPE_ID`) REFERENCES `payment_type` (`PAYMENT_TYPE_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `office_action_payment_type_ibfk_4` FOREIGN KEY (`PRD_TYPE_ID`) REFERENCES `prd_type` (`PRD_TYPE_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `office_address` -- DROP TABLE IF EXISTS `office_address`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `office_address` ( `OFFICE_ADDRESS_ID` smallint(6) NOT NULL auto_increment, `OFFICE_ID` smallint(6) NOT NULL, `ADDRESS_1` varchar(200) default NULL, `ADDRESS_2` varchar(200) default NULL, `ADDRESS_3` varchar(200) default NULL, `CITY` varchar(100) default NULL, `STATE` varchar(100) default NULL, `COUNTRY` varchar(100) default NULL, `ZIP` varchar(20) default NULL, `TELEPHONE` varchar(20) default NULL, PRIMARY KEY (`OFFICE_ADDRESS_ID`), KEY `OFFICE_ID` (`OFFICE_ID`), CONSTRAINT `office_address_ibfk_1` FOREIGN KEY (`OFFICE_ID`) REFERENCES `office` (`OFFICE_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=416 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `office_code` -- DROP TABLE IF EXISTS `office_code`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `office_code` ( `CODE_ID` smallint(6) NOT NULL auto_increment, `LOOKUP_ID` int(11) NOT NULL, PRIMARY KEY (`CODE_ID`), KEY `LOOKUP_ID` (`LOOKUP_ID`), CONSTRAINT `office_code_ibfk_1` FOREIGN KEY (`LOOKUP_ID`) REFERENCES `lookup_value` (`LOOKUP_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `office_custom_field` -- DROP TABLE IF EXISTS `office_custom_field`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `office_custom_field` ( `OFFICE_CUSTOM_FIELD_ID` int(11) NOT NULL auto_increment, `OFFICE_ID` smallint(6) NOT NULL, `FIELD_ID` smallint(6) NOT NULL, `FIELD_VALUE` varchar(200) default NULL, PRIMARY KEY (`OFFICE_CUSTOM_FIELD_ID`), KEY `OFFICE_ID` (`OFFICE_ID`), CONSTRAINT `office_custom_field_ibfk_1` FOREIGN KEY (`OFFICE_ID`) REFERENCES `office` (`OFFICE_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=808 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `office_hierarchy` -- DROP TABLE IF EXISTS `office_hierarchy`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `office_hierarchy` ( `HIERARCHY_ID` int(11) NOT NULL auto_increment, `PARENT_ID` smallint(6) NOT NULL, `OFFICE_ID` smallint(6) default NULL, `STATUS` smallint(6) default NULL, `START_DATE` date default NULL, `END_DATE` date default NULL, `UPDATED_BY` smallint(6) default NULL, `UPDATED_DATE` date default NULL, PRIMARY KEY (`HIERARCHY_ID`), KEY `PARENT_ID` (`PARENT_ID`), KEY `UPDATED_BY` (`UPDATED_BY`), KEY `OFFICE_HIERARCHY_IDX` (`OFFICE_ID`,`STATUS`), CONSTRAINT `office_hierarchy_ibfk_1` FOREIGN KEY (`OFFICE_ID`) REFERENCES `office` (`OFFICE_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `office_hierarchy_ibfk_2` FOREIGN KEY (`PARENT_ID`) REFERENCES `office` (`OFFICE_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `office_hierarchy_ibfk_3` FOREIGN KEY (`UPDATED_BY`) REFERENCES `personnel` (`PERSONNEL_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `office_level` -- DROP TABLE IF EXISTS `office_level`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `office_level` ( `LEVEL_ID` smallint(6) NOT NULL, `PARENT_LEVEL_ID` smallint(6) default NULL, `LEVEL_NAME_ID` smallint(6) default NULL, `INTERACTION_FLAG` smallint(6) default NULL, `CONFIGURED` smallint(6) NOT NULL, `VERSION_NO` int(11) default NULL, PRIMARY KEY (`LEVEL_ID`), KEY `PARENT_LEVEL_ID` (`PARENT_LEVEL_ID`), CONSTRAINT `office_level_ibfk_1` FOREIGN KEY (`PARENT_LEVEL_ID`) REFERENCES `office_level` (`LEVEL_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `office_status` -- DROP TABLE IF EXISTS `office_status`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `office_status` ( `STATUS_ID` smallint(6) NOT NULL auto_increment, `LOOKUP_ID` int(11) NOT NULL, PRIMARY KEY (`STATUS_ID`), KEY `LOOKUP_ID` (`LOOKUP_ID`), CONSTRAINT `office_status_ibfk_1` FOREIGN KEY (`LOOKUP_ID`) REFERENCES `lookup_value` (`LOOKUP_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `payment_type` -- DROP TABLE IF EXISTS `payment_type`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `payment_type` ( `PAYMENT_TYPE_ID` smallint(6) NOT NULL auto_increment, `PAYMENT_TYPE_LOOKUP_ID` int(11) default NULL, PRIMARY KEY (`PAYMENT_TYPE_ID`), KEY `PAYMENT_TYPE_LOOKUP_ID` (`PAYMENT_TYPE_LOOKUP_ID`), CONSTRAINT `payment_type_ibfk_1` FOREIGN KEY (`PAYMENT_TYPE_LOOKUP_ID`) REFERENCES `lookup_value` (`LOOKUP_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `penalty` -- DROP TABLE IF EXISTS `penalty`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `penalty` ( `PENALTY_ID` smallint(6) NOT NULL, `GLOBAL_PENALTY_NUM` varchar(100) default NULL, `PENALTY_TYPE` varchar(100) default NULL, `OFFICE_ID` smallint(6) default NULL, `CATEGORY_ID` smallint(6) default NULL, `GLCODE_ID` smallint(6) NOT NULL, `LOOKUP_ID` int(11) default NULL, `RATE` decimal(13,10) NOT NULL, `FORMULA` varchar(100) default NULL, PRIMARY KEY (`PENALTY_ID`), KEY `CATEGORY_ID` (`CATEGORY_ID`), KEY `GLCODE_ID` (`GLCODE_ID`), KEY `LOOKUP_ID` (`LOOKUP_ID`), KEY `OFFICE_ID` (`OFFICE_ID`), CONSTRAINT `penalty_ibfk_1` FOREIGN KEY (`CATEGORY_ID`) REFERENCES `category_type` (`CATEGORY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `penalty_ibfk_2` FOREIGN KEY (`GLCODE_ID`) REFERENCES `gl_code` (`GLCODE_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `penalty_ibfk_3` FOREIGN KEY (`LOOKUP_ID`) REFERENCES `lookup_value` (`LOOKUP_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `penalty_ibfk_4` FOREIGN KEY (`OFFICE_ID`) REFERENCES `office` (`OFFICE_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `personnel` -- DROP TABLE IF EXISTS `personnel`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `personnel` ( `PERSONNEL_ID` smallint(6) NOT NULL auto_increment, `LEVEL_ID` smallint(6) NOT NULL, `GLOBAL_PERSONNEL_NUM` varchar(100) default NULL, `OFFICE_ID` smallint(6) default NULL, `TITLE` int(11) default NULL, `PERSONNEL_STATUS` smallint(6) default NULL, `PREFERRED_LOCALE` smallint(6) default NULL, `SEARCH_ID` varchar(100) default NULL, `MAX_CHILD_COUNT` int(11) default NULL, `PASSWORD` tinyblob, `LOGIN_NAME` varchar(200) default NULL, `EMAIL_ID` varchar(255) default NULL, `PASSWORD_CHANGED` smallint(6) NOT NULL, `DISPLAY_NAME` varchar(200) default NULL, `CREATED_BY` smallint(6) NOT NULL, `CREATED_DATE` date default NULL, `UPDATED_BY` smallint(6) default NULL, `UPDATED_DATE` date default NULL, `LAST_LOGIN` date default NULL, `LOCKED` smallint(6) NOT NULL, `NO_OF_TRIES` smallint(6) NOT NULL, `VERSION_NO` int(11) NOT NULL, PRIMARY KEY (`PERSONNEL_ID`), UNIQUE KEY `PERSONNEL_GLOBAL_IDX` (`GLOBAL_PERSONNEL_NUM`), UNIQUE KEY `PERSONNEL_SEARCH_IDX` (`SEARCH_ID`), UNIQUE KEY `PERSONNEL_LOGIN_IDX` (`LOGIN_NAME`), KEY `CREATED_BY` (`CREATED_BY`), KEY `LEVEL_ID` (`LEVEL_ID`), KEY `PREFERRED_LOCALE` (`PREFERRED_LOCALE`), KEY `TITLE` (`TITLE`), KEY `UPDATED_BY` (`UPDATED_BY`), KEY `PERSONNEL_OFFICE_IDX` (`OFFICE_ID`), CONSTRAINT `personnel_ibfk_1` FOREIGN KEY (`OFFICE_ID`) REFERENCES `office` (`OFFICE_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `personnel_ibfk_2` FOREIGN KEY (`CREATED_BY`) REFERENCES `personnel` (`PERSONNEL_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `personnel_ibfk_3` FOREIGN KEY (`LEVEL_ID`) REFERENCES `personnel_level` (`LEVEL_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `personnel_ibfk_4` FOREIGN KEY (`PREFERRED_LOCALE`) REFERENCES `supported_locale` (`LOCALE_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `personnel_ibfk_5` FOREIGN KEY (`TITLE`) REFERENCES `lookup_value` (`LOOKUP_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `personnel_ibfk_6` FOREIGN KEY (`UPDATED_BY`) REFERENCES `personnel` (`PERSONNEL_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=106 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `personnel_custom_field` -- DROP TABLE IF EXISTS `personnel_custom_field`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `personnel_custom_field` ( `PERSONNEL_CUSTOM_FIELD_ID` int(11) NOT NULL auto_increment, `FIELD_ID` smallint(6) NOT NULL, `PERSONNEL_ID` smallint(6) NOT NULL, `FIELD_VALUE` varchar(100) default NULL, PRIMARY KEY (`PERSONNEL_CUSTOM_FIELD_ID`), KEY `PERSONNEL_ID` (`PERSONNEL_ID`), KEY `FIELD_ID` (`FIELD_ID`), CONSTRAINT `personnel_custom_field_ibfk_1` FOREIGN KEY (`PERSONNEL_ID`) REFERENCES `personnel` (`PERSONNEL_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `personnel_custom_field_ibfk_2` FOREIGN KEY (`FIELD_ID`) REFERENCES `custom_field_definition` (`FIELD_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=182 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `personnel_details` -- DROP TABLE IF EXISTS `personnel_details`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `personnel_details` ( `PERSONNEL_ID` smallint(6) NOT NULL, `FIRST_NAME` varchar(100) NOT NULL, `MIDDLE_NAME` varchar(100) default NULL, `SECOND_LAST_NAME` varchar(100) default NULL, `LAST_NAME` varchar(100) default NULL, `GOVERNMENT_ID_NUMBER` varchar(50) default NULL, `DOB` date NOT NULL, `MARITAL_STATUS` int(11) default NULL, `GENDER` int(11) NOT NULL, `DATE_OF_JOINING_MFI` date default NULL, `DATE_OF_JOINING_BRANCH` date default NULL, `DATE_OF_LEAVING_BRANCH` date default NULL, `ADDRESS_1` varchar(200) default NULL, `ADDRESS_2` varchar(200) default NULL, `ADDRESS_3` varchar(200) default NULL, `CITY` varchar(100) default NULL, `STATE` varchar(100) default NULL, `COUNTRY` varchar(100) default NULL, `POSTAL_CODE` varchar(100) default NULL, `TELEPHONE` varchar(20) default NULL, KEY `PERSONNEL_ID` (`PERSONNEL_ID`), KEY `GENDER` (`GENDER`), KEY `MARITAL_STATUS` (`MARITAL_STATUS`), CONSTRAINT `personnel_details_ibfk_1` FOREIGN KEY (`PERSONNEL_ID`) REFERENCES `personnel` (`PERSONNEL_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `personnel_details_ibfk_2` FOREIGN KEY (`GENDER`) REFERENCES `lookup_value` (`LOOKUP_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `personnel_details_ibfk_3` FOREIGN KEY (`MARITAL_STATUS`) REFERENCES `lookup_value` (`LOOKUP_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `personnel_hierarchy` -- DROP TABLE IF EXISTS `personnel_hierarchy`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `personnel_hierarchy` ( `HIERARCHY_ID` int(11) NOT NULL, `PARENT_ID` smallint(6) NOT NULL, `PERSONNEL_ID` smallint(6) default NULL, `STATUS` smallint(6) default NULL, `START_DATE` date default NULL, `END_DATE` date NOT NULL, `UPDATED_BY` smallint(6) default NULL, `UPDATED_DATE` date default NULL, PRIMARY KEY (`HIERARCHY_ID`), KEY `PARENT_ID` (`PARENT_ID`), KEY `UPDATED_BY` (`UPDATED_BY`), KEY `PERSONNEL_HIERARCHY_IDX` (`PERSONNEL_ID`,`STATUS`), CONSTRAINT `personnel_hierarchy_ibfk_1` FOREIGN KEY (`PARENT_ID`) REFERENCES `personnel` (`PERSONNEL_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `personnel_hierarchy_ibfk_2` FOREIGN KEY (`PERSONNEL_ID`) REFERENCES `personnel` (`PERSONNEL_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `personnel_hierarchy_ibfk_3` FOREIGN KEY (`UPDATED_BY`) REFERENCES `personnel` (`PERSONNEL_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `personnel_level` -- DROP TABLE IF EXISTS `personnel_level`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `personnel_level` ( `LEVEL_ID` smallint(6) NOT NULL, `LEVEL_NAME_ID` int(11) NOT NULL, `PARENT_LEVEL_ID` smallint(6) default NULL, `INTERACTION_FLAG` smallint(6) default NULL, PRIMARY KEY (`LEVEL_ID`), KEY `PARENT_LEVEL_ID` (`PARENT_LEVEL_ID`), KEY `LEVEL_NAME_ID` (`LEVEL_NAME_ID`), CONSTRAINT `personnel_level_ibfk_1` FOREIGN KEY (`PARENT_LEVEL_ID`) REFERENCES `personnel_level` (`LEVEL_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `personnel_level_ibfk_2` FOREIGN KEY (`LEVEL_NAME_ID`) REFERENCES `lookup_value` (`LOOKUP_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `personnel_movement` -- DROP TABLE IF EXISTS `personnel_movement`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `personnel_movement` ( `PERSONNEL_MOVEMENT_ID` smallint(6) NOT NULL auto_increment, `PERSONNEL_ID` smallint(6) default NULL, `OFFICE_ID` smallint(6) NOT NULL, `STATUS` smallint(6) default NULL, `START_DATE` date default NULL, `END_DATE` date default NULL, `UPDATED_BY` smallint(6) default NULL, `UPDATED_DATE` date default NULL, PRIMARY KEY (`PERSONNEL_MOVEMENT_ID`), KEY `UPDATED_BY` (`UPDATED_BY`), KEY `OFFICE_ID` (`OFFICE_ID`), KEY `PERSONNEL_MOVEMENT_IDX` (`PERSONNEL_ID`), CONSTRAINT `personnel_movement_ibfk_1` FOREIGN KEY (`PERSONNEL_ID`) REFERENCES `personnel` (`PERSONNEL_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `personnel_movement_ibfk_2` FOREIGN KEY (`UPDATED_BY`) REFERENCES `personnel` (`PERSONNEL_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `personnel_movement_ibfk_3` FOREIGN KEY (`OFFICE_ID`) REFERENCES `office` (`OFFICE_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `personnel_notes` -- DROP TABLE IF EXISTS `personnel_notes`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `personnel_notes` ( `COMMENT_ID` int(11) NOT NULL auto_increment, `PERSONNEL_ID` smallint(6) NOT NULL, `COMMENT_DATE` date NOT NULL, `COMMENTS` varchar(500) NOT NULL, `OFFICER_ID` smallint(6) default NULL, PRIMARY KEY (`COMMENT_ID`), KEY `PERSONNEL_ID` (`PERSONNEL_ID`), KEY `OFFICER_ID` (`OFFICER_ID`), CONSTRAINT `personnel_notes_ibfk_1` FOREIGN KEY (`PERSONNEL_ID`) REFERENCES `personnel` (`PERSONNEL_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `personnel_notes_ibfk_2` FOREIGN KEY (`OFFICER_ID`) REFERENCES `personnel` (`PERSONNEL_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `personnel_role` -- DROP TABLE IF EXISTS `personnel_role`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `personnel_role` ( `PERSONNEL_ROLE_ID` int(11) NOT NULL auto_increment, `ROLE_ID` smallint(6) NOT NULL, `PERSONNEL_ID` smallint(6) NOT NULL, PRIMARY KEY (`PERSONNEL_ROLE_ID`), KEY `PERSONNEL_ID` (`PERSONNEL_ID`), KEY `ROLE_ID` (`ROLE_ID`), CONSTRAINT `personnel_role_ibfk_1` FOREIGN KEY (`PERSONNEL_ID`) REFERENCES `personnel` (`PERSONNEL_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `personnel_role_ibfk_2` FOREIGN KEY (`ROLE_ID`) REFERENCES `role` (`ROLE_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=185 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `personnel_status` -- DROP TABLE IF EXISTS `personnel_status`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `personnel_status` ( `PERSONNEL_STATUS_ID` smallint(6) NOT NULL auto_increment, `LOOKUP_ID` int(11) NOT NULL, PRIMARY KEY (`PERSONNEL_STATUS_ID`), KEY `LOOKUP_ID` (`LOOKUP_ID`), CONSTRAINT `personnel_status_ibfk_1` FOREIGN KEY (`LOOKUP_ID`) REFERENCES `lookup_value` (`LOOKUP_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `position` -- DROP TABLE IF EXISTS `position`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `position` ( `POSITION_ID` int(11) NOT NULL auto_increment, `LOOKUP_ID` int(11) NOT NULL, PRIMARY KEY (`POSITION_ID`), KEY `LOOKUP_ID` (`LOOKUP_ID`), CONSTRAINT `position_ibfk_1` FOREIGN KEY (`LOOKUP_ID`) REFERENCES `lookup_value` (`LOOKUP_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `ppi_likelihoods` -- DROP TABLE IF EXISTS `ppi_likelihoods`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `ppi_likelihoods` ( `LIKELIHOOD_ID` int(11) NOT NULL auto_increment, `SURVEY_ID` int(11) NOT NULL, `SCORE_FROM` int(11) NOT NULL, `SCORE_TO` int(11) NOT NULL, `BOTTOM_HALF_BELOW` decimal(10,3) NOT NULL, `TOP_HALF_BELOW` decimal(10,3) NOT NULL, `LIKELIHOOD_ORDER` int(11) NOT NULL, PRIMARY KEY (`LIKELIHOOD_ID`), KEY `SURVEY_ID` (`SURVEY_ID`), CONSTRAINT `ppi_likelihoods_ibfk_1` FOREIGN KEY (`SURVEY_ID`) REFERENCES `survey` (`SURVEY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=41 DEFAULT CHARSET=latin1; SET character_set_client = @saved_cs_client; -- -- Table structure for table `ppi_survey` -- DROP TABLE IF EXISTS `ppi_survey`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `ppi_survey` ( `COUNTRY_ID` int(11) NOT NULL, `SURVEY_ID` int(11) NOT NULL, `VERY_POOR_MIN` int(11) NOT NULL, `VERY_POOR_MAX` int(11) NOT NULL, `POOR_MIN` int(11) NOT NULL, `POOR_MAX` int(11) NOT NULL, `AT_RISK_MIN` int(11) NOT NULL, `AT_RISK_MAX` int(11) NOT NULL, `NON_POOR_MIN` int(11) NOT NULL, `NON_POOR_MAX` int(11) NOT NULL, PRIMARY KEY (`COUNTRY_ID`), KEY `SURVEY_ID` (`SURVEY_ID`), CONSTRAINT `ppi_survey_ibfk_1` FOREIGN KEY (`SURVEY_ID`) REFERENCES `survey` (`SURVEY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `ppi_survey_instance` -- DROP TABLE IF EXISTS `ppi_survey_instance`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `ppi_survey_instance` ( `INSTANCE_ID` int(11) NOT NULL, `BOTTOM_HALF_BELOW` decimal(10,3) default NULL, `TOP_HALF_BELOW` decimal(10,3) default NULL, PRIMARY KEY (`INSTANCE_ID`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; SET character_set_client = @saved_cs_client; -- -- Table structure for table `prd_applicable_master` -- DROP TABLE IF EXISTS `prd_applicable_master`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `prd_applicable_master` ( `PRD_APPLICABLE_MASTER_ID` smallint(6) NOT NULL auto_increment, `LOOKUP_ID` int(11) NOT NULL, PRIMARY KEY (`PRD_APPLICABLE_MASTER_ID`), KEY `LOOKUP_ID` (`LOOKUP_ID`), CONSTRAINT `prd_applicable_master_ibfk_1` FOREIGN KEY (`LOOKUP_ID`) REFERENCES `lookup_value` (`LOOKUP_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `prd_category` -- DROP TABLE IF EXISTS `prd_category`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `prd_category` ( `PRD_CATEGORY_ID` smallint(6) NOT NULL auto_increment, `PRD_TYPE_ID` smallint(6) NOT NULL, `GLOBAL_PRD_OFFERING_NUM` varchar(50) NOT NULL, `PRD_CATEGORY_NAME` varchar(100) NOT NULL, `CREATED_DATE` date default NULL, `CREATED_BY` int(11) default NULL, `OFFICE_ID` smallint(6) default NULL, `UPDATED_BY` int(11) default NULL, `UDPATED_DATE` date default NULL, `STATE` smallint(6) NOT NULL, `DESCRIPTION` varchar(500) default NULL, `VERSION_NO` int(11) default NULL, PRIMARY KEY (`PRD_CATEGORY_ID`), KEY `PRD_TYPE_ID` (`PRD_TYPE_ID`), CONSTRAINT `prd_category_ibfk_1` FOREIGN KEY (`PRD_TYPE_ID`) REFERENCES `prd_type` (`PRD_TYPE_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `prd_category_status` -- DROP TABLE IF EXISTS `prd_category_status`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `prd_category_status` ( `PRD_CATEGORY_STATUS_ID` smallint(6) NOT NULL auto_increment, `LOOKUP_ID` int(11) NOT NULL, PRIMARY KEY (`PRD_CATEGORY_STATUS_ID`), KEY `LOOKUP_ID` (`LOOKUP_ID`), CONSTRAINT `prd_category_status_ibfk_1` FOREIGN KEY (`LOOKUP_ID`) REFERENCES `lookup_value` (`LOOKUP_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `prd_checklist` -- DROP TABLE IF EXISTS `prd_checklist`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `prd_checklist` ( `CHECKLIST_ID` smallint(6) NOT NULL, `PRD_TYPE_ID` smallint(6) default NULL, `ACCOUNT_STATUS` smallint(6) NOT NULL, PRIMARY KEY (`CHECKLIST_ID`), KEY `ACCOUNT_STATUS` (`ACCOUNT_STATUS`), KEY `PRD_TYPE_ID` (`PRD_TYPE_ID`), CONSTRAINT `prd_checklist_ibfk_1` FOREIGN KEY (`ACCOUNT_STATUS`) REFERENCES `account_state` (`ACCOUNT_STATE_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `prd_checklist_ibfk_2` FOREIGN KEY (`CHECKLIST_ID`) REFERENCES `checklist` (`CHECKLIST_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `prd_checklist_ibfk_3` FOREIGN KEY (`PRD_TYPE_ID`) REFERENCES `prd_type` (`PRD_TYPE_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `prd_fee_frequency` -- DROP TABLE IF EXISTS `prd_fee_frequency`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `prd_fee_frequency` ( `PRDOFFERING_FEE_ID` smallint(6) NOT NULL, `FEE_ID` smallint(6) default NULL, `FREQUENCY_ID` smallint(6) NOT NULL, PRIMARY KEY (`PRDOFFERING_FEE_ID`), KEY `FEE_ID` (`FEE_ID`), KEY `FREQUENCY_ID` (`FREQUENCY_ID`), CONSTRAINT `prd_fee_frequency_ibfk_1` FOREIGN KEY (`FEE_ID`) REFERENCES `fees` (`FEE_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `prd_fee_frequency_ibfk_2` FOREIGN KEY (`PRDOFFERING_FEE_ID`) REFERENCES `prd_offering_fees` (`PRD_OFFERING_FEE_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `prd_fee_frequency_ibfk_3` FOREIGN KEY (`FREQUENCY_ID`) REFERENCES `recurrence_type` (`RECURRENCE_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `prd_offering` -- DROP TABLE IF EXISTS `prd_offering`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `prd_offering` ( `PRD_OFFERING_ID` smallint(6) NOT NULL auto_increment, `PRD_APPLICABLE_MASTER_ID` smallint(6) NOT NULL, `GLOBAL_PRD_OFFERING_NUM` varchar(50) NOT NULL, `PRD_CATEGORY_ID` smallint(6) NOT NULL, `PRD_TYPE_ID` smallint(6) default NULL, `OFFICE_ID` smallint(6) default NULL, `START_DATE` date NOT NULL, `END_DATE` date default NULL, `GLCODE_ID` smallint(6) default NULL, `PRD_OFFERING_NAME` varchar(50) NOT NULL, `PRD_OFFERING_SHORT_NAME` varchar(50) NOT NULL, `OFFERING_STATUS_ID` smallint(6) default NULL, `DESCRIPTION` varchar(200) default NULL, `CREATED_DATE` date NOT NULL, `CREATED_BY` int(11) NOT NULL, `UPDATED_DATE` date default NULL, `UPDATED_BY` int(11) default NULL, `VERSION_NO` int(11) default NULL, `PRD_MIX_FLAG` smallint(6) default NULL, PRIMARY KEY (`PRD_OFFERING_ID`), UNIQUE KEY `PRD_OFFERING_GLOBAL_IDX` (`GLOBAL_PRD_OFFERING_NUM`), KEY `GLCODE_ID` (`GLCODE_ID`), KEY `PRD_CATEGORY_ID` (`PRD_CATEGORY_ID`), KEY `OFFERING_STATUS_ID` (`OFFERING_STATUS_ID`), KEY `PRD_APPLICABLE_MASTER_ID` (`PRD_APPLICABLE_MASTER_ID`), KEY `PRD_OFFERING_OFFICE_IDX` (`OFFICE_ID`), KEY `PRD_TYPE_IDX` (`PRD_TYPE_ID`), CONSTRAINT `prd_offering_ibfk_1` FOREIGN KEY (`GLCODE_ID`) REFERENCES `gl_code` (`GLCODE_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `prd_offering_ibfk_2` FOREIGN KEY (`OFFICE_ID`) REFERENCES `office` (`OFFICE_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `prd_offering_ibfk_3` FOREIGN KEY (`PRD_CATEGORY_ID`) REFERENCES `prd_category` (`PRD_CATEGORY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `prd_offering_ibfk_4` FOREIGN KEY (`OFFERING_STATUS_ID`) REFERENCES `prd_status` (`OFFERING_STATUS_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `prd_offering_ibfk_5` FOREIGN KEY (`PRD_TYPE_ID`) REFERENCES `prd_type` (`PRD_TYPE_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `prd_offering_ibfk_6` FOREIGN KEY (`PRD_APPLICABLE_MASTER_ID`) REFERENCES `prd_applicable_master` (`PRD_APPLICABLE_MASTER_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=84 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `prd_offering_fees` -- DROP TABLE IF EXISTS `prd_offering_fees`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `prd_offering_fees` ( `PRD_OFFERING_FEE_ID` smallint(6) NOT NULL auto_increment, `FEE_ID` smallint(6) default NULL, `PRD_OFFERING_ID` smallint(6) default NULL, PRIMARY KEY (`PRD_OFFERING_FEE_ID`), KEY `FEE_ID` (`FEE_ID`), KEY `PRD_OFFERING_FEE_IDX` (`PRD_OFFERING_ID`,`FEE_ID`), CONSTRAINT `prd_offering_fees_ibfk_1` FOREIGN KEY (`FEE_ID`) REFERENCES `fees` (`FEE_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `prd_offering_fees_ibfk_2` FOREIGN KEY (`PRD_OFFERING_ID`) REFERENCES `prd_offering` (`PRD_OFFERING_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=31 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `prd_offering_meeting` -- DROP TABLE IF EXISTS `prd_offering_meeting`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `prd_offering_meeting` ( `PRD_OFFERING_MEETING_ID` smallint(6) NOT NULL auto_increment, `PRD_OFFERING_ID` smallint(6) NOT NULL, `PRD_MEETING_ID` int(11) default NULL, `PRD_OFFERING_MEETING_TYPE_ID` smallint(6) NOT NULL, PRIMARY KEY (`PRD_OFFERING_MEETING_ID`), KEY `PRD_OFFERING_ID` (`PRD_OFFERING_ID`), KEY `PRD_MEETING_ID` (`PRD_MEETING_ID`), KEY `PRD_OFFERING_MEETING_TYPE_ID` (`PRD_OFFERING_MEETING_TYPE_ID`), CONSTRAINT `prd_offering_meeting_ibfk_1` FOREIGN KEY (`PRD_OFFERING_ID`) REFERENCES `prd_offering` (`PRD_OFFERING_ID`), CONSTRAINT `prd_offering_meeting_ibfk_2` FOREIGN KEY (`PRD_MEETING_ID`) REFERENCES `meeting` (`MEETING_ID`), CONSTRAINT `prd_offering_meeting_ibfk_3` FOREIGN KEY (`PRD_OFFERING_MEETING_TYPE_ID`) REFERENCES `meeting_type` (`MEETING_TYPE_ID`) ) ENGINE=InnoDB AUTO_INCREMENT=107 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `prd_offering_mix` -- DROP TABLE IF EXISTS `prd_offering_mix`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `prd_offering_mix` ( `PRD_OFFERING_MIX_ID` int(11) NOT NULL auto_increment, `PRD_OFFERING_ID` smallint(6) NOT NULL, `PRD_OFFERING_NOT_ALLOWED_ID` smallint(6) NOT NULL, `CREATED_BY` smallint(6) default NULL, `CREATED_DATE` date default NULL, `UPDATED_BY` smallint(6) default NULL, `UPDATED_DATE` date default NULL, `VERSION_NO` int(11) default NULL, PRIMARY KEY (`PRD_OFFERING_MIX_ID`), KEY `PRD_OFFERING_MIX_PRD_OFFERING_ID_1` (`PRD_OFFERING_ID`), KEY `PRD_OFFERING_MIX_PRD_OFFERING_ID_2` (`PRD_OFFERING_NOT_ALLOWED_ID`), CONSTRAINT `PRD_OFFERING_MIX_PRD_OFFERING_ID_1` FOREIGN KEY (`PRD_OFFERING_ID`) REFERENCES `prd_offering` (`PRD_OFFERING_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `PRD_OFFERING_MIX_PRD_OFFERING_ID_2` FOREIGN KEY (`PRD_OFFERING_NOT_ALLOWED_ID`) REFERENCES `prd_offering` (`PRD_OFFERING_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `prd_state` -- DROP TABLE IF EXISTS `prd_state`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `prd_state` ( `PRD_STATE_ID` smallint(6) NOT NULL auto_increment, `PRD_STATE_LOOKUP_ID` int(11) default NULL, PRIMARY KEY (`PRD_STATE_ID`), KEY `PRD_STATE_LOOKUP_ID` (`PRD_STATE_LOOKUP_ID`), CONSTRAINT `prd_state_ibfk_1` FOREIGN KEY (`PRD_STATE_LOOKUP_ID`) REFERENCES `lookup_value` (`LOOKUP_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `prd_status` -- DROP TABLE IF EXISTS `prd_status`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `prd_status` ( `OFFERING_STATUS_ID` smallint(6) NOT NULL auto_increment, `PRD_STATE_ID` smallint(6) NOT NULL, `PRD_TYPE_ID` smallint(6) NOT NULL, `CURRENTLY_IN_USE` smallint(6) NOT NULL, `VERSION_NO` int(11) NOT NULL, PRIMARY KEY (`OFFERING_STATUS_ID`), KEY `PRD_TYPE_ID` (`PRD_TYPE_ID`), KEY `PRD_STATE_ID` (`PRD_STATE_ID`), CONSTRAINT `prd_status_ibfk_1` FOREIGN KEY (`PRD_TYPE_ID`) REFERENCES `prd_type` (`PRD_TYPE_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `prd_status_ibfk_2` FOREIGN KEY (`PRD_STATE_ID`) REFERENCES `prd_state` (`PRD_STATE_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `prd_type` -- DROP TABLE IF EXISTS `prd_type`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `prd_type` ( `PRD_TYPE_ID` smallint(6) NOT NULL auto_increment, `PRD_TYPE_LOOKUP_ID` int(11) NOT NULL, `LATENESS_DAYS` smallint(6) default NULL, `DORMANCY_DAYS` smallint(6) default NULL, `VERSION_NO` int(11) default NULL, PRIMARY KEY (`PRD_TYPE_ID`), KEY `PRD_TYPE_LOOKUP_ID` (`PRD_TYPE_LOOKUP_ID`), CONSTRAINT `prd_type_ibfk_1` FOREIGN KEY (`PRD_TYPE_LOOKUP_ID`) REFERENCES `lookup_value` (`LOOKUP_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `product_offering_mandatory_savings` -- DROP TABLE IF EXISTS `product_offering_mandatory_savings`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `product_offering_mandatory_savings` ( `PRODUCT_OFFERING_MANDATORY_SAVINGS_ID` smallint(6) NOT NULL, `PRODUCT_OFFERING_MANDATORY_SAVINGS_TYPE` smallint(6) default NULL, `PRD_OFFERING_ID` smallint(6) default NULL, `PRODUCT_OFFERING_MANDATORY_SAVINGS_VALUE` smallint(6) default NULL, `PRODUCT_OFFERING_MANDATORY_SAVINGS_RANGE` smallint(6) default NULL, PRIMARY KEY (`PRODUCT_OFFERING_MANDATORY_SAVINGS_ID`), KEY `PRD_OFFERING_ID` (`PRD_OFFERING_ID`), CONSTRAINT `product_offering_mandatory_savings_ibfk_1` FOREIGN KEY (`PRD_OFFERING_ID`) REFERENCES `prd_offering` (`PRD_OFFERING_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `program` -- DROP TABLE IF EXISTS `program`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `program` ( `PROGRAM_ID` int(11) NOT NULL auto_increment, `OFFICE_ID` smallint(6) NOT NULL, `LOOKUP_ID` int(11) NOT NULL, `GLCODE_ID` smallint(6) default NULL, `PROGRAM_NAME` varchar(100) default NULL, `START_DATE` date NOT NULL, `END_DATE` date default NULL, `CONFIDENTIALITY` smallint(6) default NULL, PRIMARY KEY (`PROGRAM_ID`), KEY `GLCODE_ID` (`GLCODE_ID`), KEY `LOOKUP_ID` (`LOOKUP_ID`), KEY `OFFICE_ID` (`OFFICE_ID`), CONSTRAINT `program_ibfk_1` FOREIGN KEY (`GLCODE_ID`) REFERENCES `gl_code` (`GLCODE_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `program_ibfk_2` FOREIGN KEY (`LOOKUP_ID`) REFERENCES `lookup_value` (`LOOKUP_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `program_ibfk_3` FOREIGN KEY (`OFFICE_ID`) REFERENCES `office` (`OFFICE_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `program_fund` -- DROP TABLE IF EXISTS `program_fund`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `program_fund` ( `PROGRAM_FUND_ID` smallint(6) NOT NULL, `FUND_ID` smallint(6) default NULL, `PROGRAM_ID` int(11) default NULL, PRIMARY KEY (`PROGRAM_FUND_ID`), KEY `FUND_ID` (`FUND_ID`), KEY `PROGRAM_ID` (`PROGRAM_ID`), CONSTRAINT `program_fund_ibfk_1` FOREIGN KEY (`FUND_ID`) REFERENCES `fund` (`FUND_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `program_fund_ibfk_2` FOREIGN KEY (`PROGRAM_ID`) REFERENCES `program` (`PROGRAM_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `question_choices` -- DROP TABLE IF EXISTS `question_choices`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `question_choices` ( `CHOICE_ID` int(11) NOT NULL auto_increment, `QUESTION_ID` int(11) NOT NULL, `CHOICE_TEXT` varchar(200) NOT NULL, `CHOICE_ORDER` int(11) NOT NULL, `PPI` varchar(1) NOT NULL, `PPI_POINTS` int(11) default NULL, PRIMARY KEY (`CHOICE_ID`), KEY `QUESTION_ID` (`QUESTION_ID`), CONSTRAINT `question_choices_ibfk_1` FOREIGN KEY (`QUESTION_ID`) REFERENCES `questions` (`QUESTION_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=207 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `questions` -- DROP TABLE IF EXISTS `questions`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `questions` ( `QUESTION_ID` int(11) NOT NULL auto_increment, `ANSWER_TYPE` int(11) NOT NULL, `QUESTION_STATE` int(11) NOT NULL, `QUESTION_TEXT` varchar(1000) NOT NULL, `NUMERIC_MIN` int(11) default NULL, `NUMERIC_MAX` int(11) default NULL, `SHORT_NAME` varchar(50) NOT NULL, PRIMARY KEY (`QUESTION_ID`), UNIQUE KEY `SHORT_NAME` (`SHORT_NAME`) ) ENGINE=InnoDB AUTO_INCREMENT=134 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `rank_days_master` -- DROP TABLE IF EXISTS `rank_days_master`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `rank_days_master` ( `RANK_DAYS_MASTER_ID` smallint(6) NOT NULL auto_increment, `LOOKUP_ID` int(11) NOT NULL, PRIMARY KEY (`RANK_DAYS_MASTER_ID`), KEY `LOOKUP_ID` (`LOOKUP_ID`), CONSTRAINT `rank_days_master_ibfk_1` FOREIGN KEY (`LOOKUP_ID`) REFERENCES `lookup_value` (`LOOKUP_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `recommended_amnt_unit` -- DROP TABLE IF EXISTS `recommended_amnt_unit`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `recommended_amnt_unit` ( `RECOMMENDED_AMNT_UNIT_ID` smallint(6) NOT NULL auto_increment, `LOOKUP_ID` int(11) NOT NULL, PRIMARY KEY (`RECOMMENDED_AMNT_UNIT_ID`), KEY `LOOKUP_ID` (`LOOKUP_ID`), CONSTRAINT `recommended_amnt_unit_ibfk_1` FOREIGN KEY (`LOOKUP_ID`) REFERENCES `lookup_value` (`LOOKUP_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `recur_on_day` -- DROP TABLE IF EXISTS `recur_on_day`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `recur_on_day` ( `RECUR_ON_DAY_ID` int(11) NOT NULL auto_increment, `DETAILS_ID` int(11) NOT NULL, `DAYS` smallint(6) default NULL, `RANK_OF_DAYS` smallint(6) default NULL, `DAY_NUMBER` smallint(6) default NULL, `VERSION_NO` int(11) default NULL, PRIMARY KEY (`RECUR_ON_DAY_ID`), KEY `DETAILS_ID` (`DETAILS_ID`), KEY `DAYS` (`DAYS`), KEY `RANK_OF_DAYS` (`RANK_OF_DAYS`), CONSTRAINT `recur_on_day_ibfk_1` FOREIGN KEY (`DETAILS_ID`) REFERENCES `recurrence_detail` (`DETAILS_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `recur_on_day_ibfk_2` FOREIGN KEY (`DAYS`) REFERENCES `week_days_master` (`WEEK_DAYS_MASTER_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `recur_on_day_ibfk_3` FOREIGN KEY (`RANK_OF_DAYS`) REFERENCES `rank_days_master` (`RANK_DAYS_MASTER_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=879 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `recurrence_detail` -- DROP TABLE IF EXISTS `recurrence_detail`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `recurrence_detail` ( `DETAILS_ID` int(11) NOT NULL auto_increment, `MEETING_ID` int(11) NOT NULL, `RECURRENCE_ID` smallint(6) default NULL, `RECUR_AFTER` smallint(6) NOT NULL, `VERSION_NO` int(11) default NULL, PRIMARY KEY (`DETAILS_ID`), KEY `RECURRENCE_ID` (`RECURRENCE_ID`), KEY `MEETING_ID` (`MEETING_ID`), CONSTRAINT `recurrence_detail_ibfk_1` FOREIGN KEY (`RECURRENCE_ID`) REFERENCES `recurrence_type` (`RECURRENCE_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `recurrence_detail_ibfk_2` FOREIGN KEY (`MEETING_ID`) REFERENCES `meeting` (`MEETING_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=879 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `recurrence_type` -- DROP TABLE IF EXISTS `recurrence_type`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `recurrence_type` ( `RECURRENCE_ID` smallint(6) NOT NULL auto_increment, `RECURRENCE_NAME` varchar(50) default NULL, `DESCRIPTION` varchar(200) NOT NULL, PRIMARY KEY (`RECURRENCE_ID`) ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `repayment_rule` -- DROP TABLE IF EXISTS `repayment_rule`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `repayment_rule` ( `REPAYMENT_RULE_ID` smallint(6) NOT NULL auto_increment, `REPAYMENT_RULE_LOOKUP_ID` int(11) default NULL, PRIMARY KEY (`REPAYMENT_RULE_ID`), KEY `REPAYMENT_RULE_LOOKUP_ID` (`REPAYMENT_RULE_LOOKUP_ID`), CONSTRAINT `repayment_rule_ibfk_1` FOREIGN KEY (`REPAYMENT_RULE_LOOKUP_ID`) REFERENCES `lookup_value` (`LOOKUP_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `report` -- DROP TABLE IF EXISTS `report`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `report` ( `REPORT_ID` smallint(6) NOT NULL auto_increment, `REPORT_CATEGORY_ID` smallint(6) default NULL, `REPORT_NAME` varchar(100) default NULL, `REPORT_IDENTIFIER` varchar(100) default NULL, `ACTIVITY_ID` smallint(6) default NULL, `REPORT_ACTIVE` smallint(6) default NULL, PRIMARY KEY (`REPORT_ID`), KEY `REPORT_CATEGORY_ID` (`REPORT_CATEGORY_ID`), KEY `REPORT_ibfk_2` (`ACTIVITY_ID`), CONSTRAINT `report_ibfk_1` FOREIGN KEY (`REPORT_CATEGORY_ID`) REFERENCES `report_category` (`REPORT_CATEGORY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `REPORT_ibfk_2` FOREIGN KEY (`ACTIVITY_ID`) REFERENCES `activity` (`ACTIVITY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=60 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `report_category` -- DROP TABLE IF EXISTS `report_category`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `report_category` ( `REPORT_CATEGORY_ID` smallint(6) NOT NULL auto_increment, `REPORT_CATEGORY_VALUE` varchar(100) default NULL, `ACTIVITY_ID` smallint(6) default NULL, PRIMARY KEY (`REPORT_CATEGORY_ID`), KEY `REPORT_CATEGORY_ibfk_1` (`ACTIVITY_ID`), CONSTRAINT `REPORT_CATEGORY_ibfk_1` FOREIGN KEY (`ACTIVITY_ID`) REFERENCES `activity` (`ACTIVITY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `report_datasource` -- DROP TABLE IF EXISTS `report_datasource`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `report_datasource` ( `DATASOURCE_ID` int(11) NOT NULL auto_increment, `NAME` varchar(255) NOT NULL default '', `DRIVER` varchar(255) default NULL, `URL` varchar(255) NOT NULL default '', `USERNAME` varchar(255) default NULL, `PASSWORD` varchar(255) default NULL, `MAX_IDLE` int(11) default NULL, `MAX_ACTIVE` int(11) default NULL, `MAX_WAIT` bigint(20) default NULL, `VALIDATION_QUERY` varchar(255) default NULL, `JNDI` tinyint(4) default NULL, PRIMARY KEY (`DATASOURCE_ID`), UNIQUE KEY `NAME` (`NAME`), UNIQUE KEY `NAME_2` (`NAME`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; SET character_set_client = @saved_cs_client; -- -- Table structure for table `report_jasper_map` -- DROP TABLE IF EXISTS `report_jasper_map`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `report_jasper_map` ( `REPORT_ID` smallint(6) NOT NULL auto_increment, `REPORT_CATEGORY_ID` smallint(6) default NULL, `REPORT_NAME` varchar(100) default NULL, `REPORT_IDENTIFIER` varchar(100) default NULL, `REPORT_JASPER` varchar(100) default NULL, PRIMARY KEY (`REPORT_ID`), KEY `REPORT_CATEGORY_ID` (`REPORT_CATEGORY_ID`), CONSTRAINT `report_jasper_map_ibfk_1` FOREIGN KEY (`REPORT_CATEGORY_ID`) REFERENCES `report_category` (`REPORT_CATEGORY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=60 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `report_parameter` -- DROP TABLE IF EXISTS `report_parameter`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `report_parameter` ( `PARAMETER_ID` int(11) NOT NULL auto_increment, `NAME` varchar(255) NOT NULL default '', `TYPE` varchar(255) NOT NULL default '', `CLASSNAME` varchar(255) NOT NULL default '', `DATA` text, `DATASOURCE_ID` int(11) default NULL, `DESCRIPTION` varchar(255) default NULL, PRIMARY KEY (`PARAMETER_ID`), UNIQUE KEY `NAME` (`NAME`), UNIQUE KEY `NAME_2` (`NAME`), KEY `DATASOURCE_ID` (`DATASOURCE_ID`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; SET character_set_client = @saved_cs_client; -- -- Table structure for table `report_parameter_map` -- DROP TABLE IF EXISTS `report_parameter_map`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `report_parameter_map` ( `REPORT_ID` int(11) NOT NULL default '0', `PARAMETER_ID` int(11) default NULL, `REQUIRED` tinyint(4) default NULL, `SORT_ORDER` int(11) default NULL, `STEP` int(11) default NULL, `MAP_ID` int(11) NOT NULL auto_increment, PRIMARY KEY (`MAP_ID`), KEY `REPORT_ID` (`REPORT_ID`), KEY `PARAMETER_ID` (`PARAMETER_ID`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; SET character_set_client = @saved_cs_client; -- -- Table structure for table `role` -- DROP TABLE IF EXISTS `role`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `role` ( `ROLE_ID` smallint(6) NOT NULL, `ROLE_NAME` varchar(50) NOT NULL, `VERSION_NO` int(11) NOT NULL, `CREATED_BY` smallint(6) default NULL, `CREATED_DATE` date default NULL, `UPDATED_BY` smallint(6) default NULL, `UPDATED_DATE` date default NULL, PRIMARY KEY (`ROLE_ID`), KEY `CREATED_BY` (`CREATED_BY`), KEY `UPDATED_BY` (`UPDATED_BY`), CONSTRAINT `role_ibfk_1` FOREIGN KEY (`CREATED_BY`) REFERENCES `personnel` (`PERSONNEL_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `role_ibfk_2` FOREIGN KEY (`UPDATED_BY`) REFERENCES `personnel` (`PERSONNEL_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `roles_activity` -- DROP TABLE IF EXISTS `roles_activity`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `roles_activity` ( `ACTIVITY_ID` smallint(6) NOT NULL, `ROLE_ID` smallint(6) NOT NULL, PRIMARY KEY (`ACTIVITY_ID`,`ROLE_ID`), KEY `ROLE_ID` (`ROLE_ID`), CONSTRAINT `roles_activity_ibfk_1` FOREIGN KEY (`ACTIVITY_ID`) REFERENCES `activity` (`ACTIVITY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `roles_activity_ibfk_2` FOREIGN KEY (`ROLE_ID`) REFERENCES `role` (`ROLE_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `saving_schedule` -- DROP TABLE IF EXISTS `saving_schedule`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `saving_schedule` ( `ID` int(11) NOT NULL auto_increment, `ACCOUNT_ID` int(11) NOT NULL, `CUSTOMER_ID` int(11) NOT NULL, `CURRENCY_ID` smallint(6) default NULL, `ACTION_DATE` date default NULL, `DEPOSIT` decimal(10,3) NOT NULL, `DEPOSIT_CURRENCY_ID` smallint(6) default NULL, `DEPOSIT_PAID` decimal(10,3) default NULL, `DEPOSIT_PAID_CURRENCY_ID` smallint(6) default NULL, `PAYMENT_STATUS` smallint(6) NOT NULL, `INSTALLMENT_ID` smallint(6) NOT NULL, `PAYMENT_DATE` date default NULL, `PARENT_FLAG` smallint(6) default NULL, `VERSION_NO` int(11) NOT NULL, PRIMARY KEY (`ID`), KEY `ACCOUNT_ID` (`ACCOUNT_ID`), KEY `CURRENCY_ID` (`CURRENCY_ID`), KEY `DEPOSIT_CURRENCY_ID` (`DEPOSIT_CURRENCY_ID`), KEY `DEPOSIT_PAID_CURRENCY_ID` (`DEPOSIT_PAID_CURRENCY_ID`), KEY `CUSTOMER_ID` (`CUSTOMER_ID`), CONSTRAINT `saving_schedule_ibfk_1` FOREIGN KEY (`ACCOUNT_ID`) REFERENCES `account` (`ACCOUNT_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `saving_schedule_ibfk_2` FOREIGN KEY (`CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `saving_schedule_ibfk_3` FOREIGN KEY (`DEPOSIT_CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `saving_schedule_ibfk_4` FOREIGN KEY (`DEPOSIT_PAID_CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `saving_schedule_ibfk_5` FOREIGN KEY (`CUSTOMER_ID`) REFERENCES `customer` (`CUSTOMER_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=9251 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `savings_account` -- DROP TABLE IF EXISTS `savings_account`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `savings_account` ( `ACCOUNT_ID` int(11) NOT NULL, `ACTIVATION_DATE` date default NULL, `SAVINGS_BALANCE` decimal(10,3) default NULL, `SAVINGS_BALANCE_CURRENCY_ID` smallint(6) default NULL, `RECOMMENDED_AMOUNT` decimal(10,3) default NULL, `RECOMMENDED_AMOUNT_CURRENCY_ID` smallint(6) default NULL, `RECOMMENDED_AMNT_UNIT_ID` smallint(6) default NULL, `SAVINGS_TYPE_ID` smallint(6) NOT NULL, `INT_TO_BE_POSTED` decimal(10,3) default NULL, `INT_TO_BE_POSTED_CURRENCY_ID` smallint(6) default NULL, `LAST_INT_CALC_DATE` date default NULL, `LAST_INT_POST_DATE` date default NULL, `NEXT_INT_CALC_DATE` date default NULL, `NEXT_INT_POST_DATE` date default NULL, `INTER_INT_CALC_DATE` date default NULL, `PRD_OFFERING_ID` smallint(6) NOT NULL, `INTEREST_RATE` decimal(13,10) NOT NULL, `INTEREST_CALCULATION_TYPE_ID` smallint(6) NOT NULL, `TIME_PER_FOR_INT_CALC` int(11) default NULL, `MIN_AMNT_FOR_INT` decimal(10,3) default NULL, `MIN_AMNT_FOR_INT_CURRENCY_ID` smallint(6) default NULL, PRIMARY KEY (`ACCOUNT_ID`), KEY `SAVINGS_BALANCE_CURRENCY_ID` (`SAVINGS_BALANCE_CURRENCY_ID`), KEY `RECOMMENDED_AMOUNT_CURRENCY_ID` (`RECOMMENDED_AMOUNT_CURRENCY_ID`), KEY `INT_TO_BE_POSTED_CURRENCY_ID` (`INT_TO_BE_POSTED_CURRENCY_ID`), KEY `RECOMMENDED_AMNT_UNIT_ID` (`RECOMMENDED_AMNT_UNIT_ID`), KEY `SAVINGS_TYPE_ID` (`SAVINGS_TYPE_ID`), KEY `PRD_OFFERING_ID` (`PRD_OFFERING_ID`), KEY `INTEREST_CALCULATION_TYPE_ID` (`INTEREST_CALCULATION_TYPE_ID`), KEY `TIME_PER_FOR_INT_CALC` (`TIME_PER_FOR_INT_CALC`), KEY `MIN_AMNT_FOR_INT_CURRENCY_ID` (`MIN_AMNT_FOR_INT_CURRENCY_ID`), CONSTRAINT `savings_account_ibfk_1` FOREIGN KEY (`ACCOUNT_ID`) REFERENCES `account` (`ACCOUNT_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `savings_account_ibfk_10` FOREIGN KEY (`MIN_AMNT_FOR_INT_CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `savings_account_ibfk_2` FOREIGN KEY (`SAVINGS_BALANCE_CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `savings_account_ibfk_3` FOREIGN KEY (`RECOMMENDED_AMOUNT_CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `savings_account_ibfk_4` FOREIGN KEY (`INT_TO_BE_POSTED_CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `savings_account_ibfk_5` FOREIGN KEY (`RECOMMENDED_AMNT_UNIT_ID`) REFERENCES `recommended_amnt_unit` (`RECOMMENDED_AMNT_UNIT_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `savings_account_ibfk_6` FOREIGN KEY (`SAVINGS_TYPE_ID`) REFERENCES `savings_type` (`SAVINGS_TYPE_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `savings_account_ibfk_7` FOREIGN KEY (`PRD_OFFERING_ID`) REFERENCES `prd_offering` (`PRD_OFFERING_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `savings_account_ibfk_8` FOREIGN KEY (`INTEREST_CALCULATION_TYPE_ID`) REFERENCES `interest_calculation_types` (`INTEREST_CALCULATION_TYPE_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `savings_account_ibfk_9` FOREIGN KEY (`TIME_PER_FOR_INT_CALC`) REFERENCES `meeting` (`MEETING_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `savings_activity_details` -- DROP TABLE IF EXISTS `savings_activity_details`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `savings_activity_details` ( `ID` int(11) NOT NULL auto_increment, `CREATED_BY` smallint(6) default NULL, `ACCOUNT_ID` int(11) NOT NULL, `CREATED_DATE` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, `ACCOUNT_ACTION_ID` smallint(6) NOT NULL, `AMOUNT` decimal(10,3) NOT NULL, `AMOUNT_CURRENCY_ID` smallint(6) NOT NULL, `BALANCE_AMOUNT` decimal(10,3) NOT NULL, `BALANCE_AMOUNT_CURRENCY_ID` smallint(6) NOT NULL, PRIMARY KEY (`ID`), KEY `CREATED_BY` (`CREATED_BY`), KEY `ACCOUNT_ID` (`ACCOUNT_ID`), KEY `ACCOUNT_ACTION_ID` (`ACCOUNT_ACTION_ID`), KEY `AMOUNT_CURRENCY_ID` (`AMOUNT_CURRENCY_ID`), KEY `BALANCE_AMOUNT_CURRENCY_ID` (`BALANCE_AMOUNT_CURRENCY_ID`), CONSTRAINT `savings_activity_details_ibfk_1` FOREIGN KEY (`CREATED_BY`) REFERENCES `personnel` (`PERSONNEL_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `savings_activity_details_ibfk_2` FOREIGN KEY (`ACCOUNT_ID`) REFERENCES `account` (`ACCOUNT_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `savings_activity_details_ibfk_3` FOREIGN KEY (`ACCOUNT_ACTION_ID`) REFERENCES `account_action` (`ACCOUNT_ACTION_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `savings_activity_details_ibfk_4` FOREIGN KEY (`AMOUNT_CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `savings_activity_details_ibfk_5` FOREIGN KEY (`BALANCE_AMOUNT_CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=832 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `savings_offering` -- DROP TABLE IF EXISTS `savings_offering`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `savings_offering` ( `PRD_OFFERING_ID` smallint(6) NOT NULL, `INTEREST_CALCULATION_TYPE_ID` smallint(6) NOT NULL, `SAVINGS_TYPE_ID` smallint(6) NOT NULL, `RECOMMENDED_AMNT_UNIT_ID` smallint(6) default NULL, `RECOMMENDED_AMOUNT` decimal(10,3) default NULL, `RECOMMENDED_AMOUNT_CURRENCY_ID` smallint(6) default NULL, `INTEREST_RATE` decimal(13,10) NOT NULL, `MAX_AMNT_WITHDRAWL` decimal(10,3) default NULL, `MAX_AMNT_WITHDRAWL_CURRENCY_ID` smallint(6) default NULL, `MIN_AMNT_FOR_INT` decimal(10,3) default NULL, `MIN_AMNT_FOR_INT_CURRENCY_ID` smallint(6) default NULL, `DEPOSIT_GLCODE_ID` smallint(6) NOT NULL, `INTEREST_GLCODE_ID` smallint(6) NOT NULL, PRIMARY KEY (`PRD_OFFERING_ID`), KEY `RECOMMENDED_AMNT_UNIT_ID` (`RECOMMENDED_AMNT_UNIT_ID`), KEY `SAVINGS_TYPE_ID` (`SAVINGS_TYPE_ID`), KEY `INTEREST_CALCULATION_TYPE_ID` (`INTEREST_CALCULATION_TYPE_ID`), KEY `RECOMMENDED_AMOUNT_CURRENCY_ID` (`RECOMMENDED_AMOUNT_CURRENCY_ID`), KEY `MAX_AMNT_WITHDRAWL_CURRENCY_ID` (`MAX_AMNT_WITHDRAWL_CURRENCY_ID`), KEY `MIN_AMNT_FOR_INT_CURRENCY_ID` (`MIN_AMNT_FOR_INT_CURRENCY_ID`), KEY `DEPOSIT_GLCODE_ID` (`DEPOSIT_GLCODE_ID`), KEY `INTEREST_GLCODE_ID` (`INTEREST_GLCODE_ID`), CONSTRAINT `savings_offering_ibfk_1` FOREIGN KEY (`PRD_OFFERING_ID`) REFERENCES `prd_offering` (`PRD_OFFERING_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `savings_offering_ibfk_2` FOREIGN KEY (`RECOMMENDED_AMNT_UNIT_ID`) REFERENCES `recommended_amnt_unit` (`RECOMMENDED_AMNT_UNIT_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `savings_offering_ibfk_3` FOREIGN KEY (`SAVINGS_TYPE_ID`) REFERENCES `savings_type` (`SAVINGS_TYPE_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `savings_offering_ibfk_4` FOREIGN KEY (`INTEREST_CALCULATION_TYPE_ID`) REFERENCES `interest_calculation_types` (`INTEREST_CALCULATION_TYPE_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `savings_offering_ibfk_5` FOREIGN KEY (`RECOMMENDED_AMOUNT_CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `savings_offering_ibfk_6` FOREIGN KEY (`MAX_AMNT_WITHDRAWL_CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `savings_offering_ibfk_7` FOREIGN KEY (`MIN_AMNT_FOR_INT_CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `savings_offering_ibfk_8` FOREIGN KEY (`DEPOSIT_GLCODE_ID`) REFERENCES `gl_code` (`GLCODE_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `savings_offering_ibfk_9` FOREIGN KEY (`INTEREST_GLCODE_ID`) REFERENCES `gl_code` (`GLCODE_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `savings_performance` -- DROP TABLE IF EXISTS `savings_performance`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `savings_performance` ( `ID` int(11) NOT NULL auto_increment, `ACCOUNT_ID` int(11) NOT NULL, `TOTAL_DEPOSITS` decimal(10,3) default NULL, `TOTAL_DEPOSITS_CURRENCY_ID` smallint(6) default NULL, `TOTAL_WITHDRAWALS` decimal(10,3) default NULL, `TOTAL_WITHDRAWALS_CURRENCY_ID` smallint(6) default NULL, `TOTAL_INTEREST_EARNED` decimal(10,3) default NULL, `TOTAL_INTEREST_EARNED_CURRENCY_ID` smallint(6) default NULL, `MISSED_DEPOSITS` smallint(6) default NULL, PRIMARY KEY (`ID`), KEY `ACCOUNT_ID` (`ACCOUNT_ID`), KEY `TOTAL_DEPOSITS_CURRENCY_ID` (`TOTAL_DEPOSITS_CURRENCY_ID`), KEY `TOTAL_WITHDRAWALS_CURRENCY_ID` (`TOTAL_WITHDRAWALS_CURRENCY_ID`), KEY `TOTAL_INTEREST_EARNED_CURRENCY_ID` (`TOTAL_INTEREST_EARNED_CURRENCY_ID`), CONSTRAINT `savings_performance_ibfk_1` FOREIGN KEY (`ACCOUNT_ID`) REFERENCES `account` (`ACCOUNT_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `savings_performance_ibfk_2` FOREIGN KEY (`TOTAL_DEPOSITS_CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `savings_performance_ibfk_3` FOREIGN KEY (`TOTAL_WITHDRAWALS_CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `savings_performance_ibfk_4` FOREIGN KEY (`TOTAL_INTEREST_EARNED_CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=137 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `savings_trxn_detail` -- DROP TABLE IF EXISTS `savings_trxn_detail`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `savings_trxn_detail` ( `ACCOUNT_TRXN_ID` int(11) NOT NULL, `DEPOSIT_AMOUNT` decimal(10,3) default NULL, `DEPOSIT_AMOUNT_CURRENCY_ID` smallint(6) default NULL, `WITHDRAWAL_AMOUNT` decimal(10,3) default NULL, `WITHDRAWAL_AMOUNT_CURRENCY_ID` smallint(6) default NULL, `INTEREST_AMOUNT` decimal(10,3) default NULL, `INTEREST_AMOUNT_CURRENCY_ID` smallint(6) default NULL, `BALANCE` decimal(10,3) default NULL, `BALANCE_CURRENCY_ID` smallint(6) NOT NULL, PRIMARY KEY (`ACCOUNT_TRXN_ID`), KEY `DEPOSIT_AMOUNT_CURRENCY_ID` (`DEPOSIT_AMOUNT_CURRENCY_ID`), KEY `WITHDRAWAL_AMOUNT_CURRENCY_ID` (`WITHDRAWAL_AMOUNT_CURRENCY_ID`), KEY `INTEREST_AMOUNT_CURRENCY_ID` (`INTEREST_AMOUNT_CURRENCY_ID`), KEY `BALANCE_CURRENCY_ID` (`BALANCE_CURRENCY_ID`), CONSTRAINT `savings_trxn_detail_ibfk_1` FOREIGN KEY (`ACCOUNT_TRXN_ID`) REFERENCES `account_trxn` (`ACCOUNT_TRXN_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `savings_trxn_detail_ibfk_2` FOREIGN KEY (`DEPOSIT_AMOUNT_CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `savings_trxn_detail_ibfk_3` FOREIGN KEY (`WITHDRAWAL_AMOUNT_CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `savings_trxn_detail_ibfk_4` FOREIGN KEY (`INTEREST_AMOUNT_CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `savings_trxn_detail_ibfk_5` FOREIGN KEY (`BALANCE_CURRENCY_ID`) REFERENCES `currency` (`CURRENCY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `savings_type` -- DROP TABLE IF EXISTS `savings_type`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `savings_type` ( `SAVINGS_TYPE_ID` smallint(6) NOT NULL auto_increment, `LOOKUP_ID` int(11) NOT NULL, PRIMARY KEY (`SAVINGS_TYPE_ID`), KEY `LOOKUP_ID` (`LOOKUP_ID`), CONSTRAINT `savings_type_ibfk_1` FOREIGN KEY (`LOOKUP_ID`) REFERENCES `lookup_value` (`LOOKUP_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `scheduled_tasks` -- DROP TABLE IF EXISTS `scheduled_tasks`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `scheduled_tasks` ( `TASKID` int(11) NOT NULL auto_increment, `TASKNAME` varchar(200) default NULL, `DESCRIPTION` varchar(500) default NULL, `STARTTIME` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, `ENDTIME` timestamp NOT NULL default '0000-00-00 00:00:00', `STATUS` smallint(6) default NULL, PRIMARY KEY (`TASKID`) ) ENGINE=InnoDB AUTO_INCREMENT=5409 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `spouse_father_lookup` -- DROP TABLE IF EXISTS `spouse_father_lookup`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `spouse_father_lookup` ( `SPOUSE_FATHER_ID` int(11) NOT NULL, `LOOKUP_ID` int(11) NOT NULL, PRIMARY KEY (`SPOUSE_FATHER_ID`), KEY `LOOKUP_ID` (`LOOKUP_ID`), CONSTRAINT `spouse_father_lookup_ibfk_1` FOREIGN KEY (`LOOKUP_ID`) REFERENCES `lookup_value` (`LOOKUP_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `supported_locale` -- DROP TABLE IF EXISTS `supported_locale`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `supported_locale` ( `LOCALE_ID` smallint(6) NOT NULL, `COUNTRY_ID` smallint(6) default NULL, `LANG_ID` smallint(6) default NULL, `LOCALE_NAME` varchar(50) default NULL, `DEFAULT_LOCALE` smallint(6) default NULL, PRIMARY KEY (`LOCALE_ID`), KEY `COUNTRY_ID` (`COUNTRY_ID`), KEY `LANG_ID` (`LANG_ID`), CONSTRAINT `supported_locale_ibfk_1` FOREIGN KEY (`COUNTRY_ID`) REFERENCES `country` (`COUNTRY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `supported_locale_ibfk_2` FOREIGN KEY (`LANG_ID`) REFERENCES `language` (`LANG_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `survey` -- DROP TABLE IF EXISTS `survey`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `survey` ( `SURVEY_ID` int(11) NOT NULL auto_increment, `SURVEY_NAME` varchar(200) NOT NULL, `SURVEY_APPLIES_TO` varchar(200) NOT NULL, `DATE_OF_CREATION` date NOT NULL, `STATE` int(11) NOT NULL, PRIMARY KEY (`SURVEY_ID`) ) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `survey_instance` -- DROP TABLE IF EXISTS `survey_instance`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `survey_instance` ( `INSTANCE_ID` int(11) NOT NULL auto_increment, `SURVEY_ID` int(11) NOT NULL, `CUSTOMER_ID` int(11) default NULL, `OFFICER_ID` smallint(6) default NULL, `DATE_CONDUCTED` date NOT NULL, `COMPLETED_STATUS` int(11) NOT NULL, `ACCOUNT_ID` int(11) default NULL, `CREATING_OFFICER_ID` smallint(6) NOT NULL, PRIMARY KEY (`INSTANCE_ID`), KEY `SURVEY_ID` (`SURVEY_ID`), KEY `CUSTOMER_ID` (`CUSTOMER_ID`), KEY `OFFICER_ID` (`OFFICER_ID`), KEY `ACCOUNT_ID` (`ACCOUNT_ID`), KEY `CREATING_OFFICER_ID` (`CREATING_OFFICER_ID`), CONSTRAINT `survey_instance_ibfk_1` FOREIGN KEY (`SURVEY_ID`) REFERENCES `survey` (`SURVEY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `survey_instance_ibfk_2` FOREIGN KEY (`CUSTOMER_ID`) REFERENCES `customer` (`CUSTOMER_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `survey_instance_ibfk_3` FOREIGN KEY (`OFFICER_ID`) REFERENCES `personnel` (`PERSONNEL_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `survey_instance_ibfk_4` FOREIGN KEY (`ACCOUNT_ID`) REFERENCES `account` (`ACCOUNT_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `survey_instance_ibfk_5` FOREIGN KEY (`CREATING_OFFICER_ID`) REFERENCES `personnel` (`PERSONNEL_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=36 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `survey_questions` -- DROP TABLE IF EXISTS `survey_questions`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `survey_questions` ( `SURVEYQUESTION_ID` int(11) NOT NULL auto_increment, `SURVEY_ID` int(11) NOT NULL, `QUESTION_ID` int(11) NOT NULL, `QUESTION_ORDER` int(11) NOT NULL, `MANDATORY` smallint(6) NOT NULL default '1', PRIMARY KEY (`SURVEYQUESTION_ID`), KEY `QUESTION_ID` (`QUESTION_ID`), KEY `SURVEY_ID` (`SURVEY_ID`), CONSTRAINT `survey_questions_ibfk_1` FOREIGN KEY (`QUESTION_ID`) REFERENCES `questions` (`QUESTION_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `survey_questions_ibfk_2` FOREIGN KEY (`SURVEY_ID`) REFERENCES `survey` (`SURVEY_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=117 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `survey_response` -- DROP TABLE IF EXISTS `survey_response`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `survey_response` ( `RESPONSE_ID` int(11) NOT NULL auto_increment, `INSTANCE_ID` int(11) NOT NULL, `SURVEY_QUESTION_ID` int(11) NOT NULL, `FREETEXT_VALUE` text, `CHOICE_VALUE` int(11) default NULL, `DATE_VALUE` date default NULL, `NUMBER_VALUE` decimal(16,5) default NULL, `MULTI_SELECT_VALUE` text, PRIMARY KEY (`RESPONSE_ID`), UNIQUE KEY `INSTANCE_ID` (`INSTANCE_ID`,`SURVEY_QUESTION_ID`), KEY `SURVEY_QUESTION_ID` (`SURVEY_QUESTION_ID`), KEY `CHOICE_VALUE` (`CHOICE_VALUE`), CONSTRAINT `survey_response_ibfk_1` FOREIGN KEY (`SURVEY_QUESTION_ID`) REFERENCES `survey_questions` (`SURVEYQUESTION_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `survey_response_ibfk_2` FOREIGN KEY (`INSTANCE_ID`) REFERENCES `survey_instance` (`INSTANCE_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `survey_response_ibfk_3` FOREIGN KEY (`CHOICE_VALUE`) REFERENCES `question_choices` (`CHOICE_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=266 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `temp_id` -- DROP TABLE IF EXISTS `temp_id`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `temp_id` ( `ID` smallint(6) NOT NULL auto_increment, `TEMPID` smallint(6) default NULL, PRIMARY KEY (`ID`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `transaction_type` -- DROP TABLE IF EXISTS `transaction_type`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `transaction_type` ( `TRANSACTION_ID` smallint(6) NOT NULL, `TRANSACTION_NAME` varchar(100) NOT NULL, PRIMARY KEY (`TRANSACTION_ID`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `waive_off_history` -- DROP TABLE IF EXISTS `waive_off_history`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `waive_off_history` ( `WAIVE_OFF_ID` int(11) NOT NULL auto_increment, `ACCOUNT_ID` int(11) NOT NULL, `WAIVE_OFF_DATE` date NOT NULL, `WAIVE_OFF_TYPE` varchar(20) NOT NULL, PRIMARY KEY (`WAIVE_OFF_ID`), KEY `ACCOUNT_ID` (`ACCOUNT_ID`), CONSTRAINT `waive_off_history_ibfk_1` FOREIGN KEY (`ACCOUNT_ID`) REFERENCES `loan_account` (`ACCOUNT_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `week_days_master` -- DROP TABLE IF EXISTS `week_days_master`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `week_days_master` ( `WEEK_DAYS_MASTER_ID` smallint(6) NOT NULL auto_increment, `LOOKUP_ID` int(11) NOT NULL, `WORKING_DAY` smallint(6) NOT NULL, `START_OF_FISCAL_WEEK` smallint(6) NOT NULL, PRIMARY KEY (`WEEK_DAYS_MASTER_ID`), KEY `LOOKUP_ID` (`LOOKUP_ID`), CONSTRAINT `week_days_master_ibfk_1` FOREIGN KEY (`LOOKUP_ID`) REFERENCES `lookup_value` (`LOOKUP_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -- -- Table structure for table `yes_no_master` -- DROP TABLE IF EXISTS `yes_no_master`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `yes_no_master` ( `YES_NO_MASTER_ID` smallint(6) NOT NULL auto_increment, `LOOKUP_ID` int(11) NOT NULL, PRIMARY KEY (`YES_NO_MASTER_ID`), KEY `LOOKUP_ID` (`LOOKUP_ID`), CONSTRAINT `yes_no_master_ibfk_1` FOREIGN KEY (`LOOKUP_ID`) REFERENCES `lookup_value` (`LOOKUP_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; 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 2009-12-01 16:00:02