FINERACT-897

make fineract compatible with both mysql5.5 and  mysql v8
This commit is contained in:
xurror
2020-05-16 07:36:28 +01:00
parent 9ce72fe67b
commit 4360260ac6
218 changed files with 6395 additions and 6398 deletions
@@ -26,7 +26,7 @@
/*!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 */;
/*!40101 SET NAMES UTF8MB4 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
@@ -40,24 +40,24 @@
DROP TABLE IF EXISTS `schema_version`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = UTF8MB4 */;
CREATE TABLE `schema_version` (
`version_rank` int(11) NOT NULL,
`installed_rank` int(11) NOT NULL,
`version_rank` INT NOT NULL,
`installed_rank` INT NOT NULL,
`version` varchar(50) NOT NULL,
`description` varchar(200) NOT NULL,
`type` varchar(20) NOT NULL,
`script` varchar(1000) NOT NULL,
`checksum` int(11) DEFAULT NULL,
`checksum` INT DEFAULT NULL,
`installed_by` varchar(100) NOT NULL,
`installed_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`execution_time` int(11) NOT NULL,
`success` tinyint(1) NOT NULL,
`execution_time` INT NOT NULL,
`success` tinyint NOT NULL,
PRIMARY KEY (`version`),
KEY `schema_version_vr_idx` (`version_rank`),
KEY `schema_version_ir_idx` (`installed_rank`),
KEY `schema_version_s_idx` (`success`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -77,14 +77,14 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `tenants`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = UTF8MB4 */;
CREATE TABLE `tenants` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`id` BIGINT NOT NULL AUTO_INCREMENT,
`identifier` varchar(100) NOT NULL,
`name` varchar(100) NOT NULL,
`schema_name` varchar(100) NOT NULL,
`timezone_id` varchar(100) NOT NULL,
`country_id` int(11) DEFAULT NULL,
`country_id` INT DEFAULT NULL,
`joined_date` date DEFAULT NULL,
`created_date` datetime DEFAULT NULL,
`lastmodified_date` datetime DEFAULT NULL,
@@ -92,22 +92,22 @@ CREATE TABLE `tenants` (
`schema_server_port` varchar(10) NOT NULL DEFAULT '3306',
`schema_username` varchar(100) NOT NULL DEFAULT 'root',
`schema_password` varchar(100) NOT NULL DEFAULT 'mysql',
`auto_update` tinyint(1) NOT NULL DEFAULT '1',
`pool_initial_size` int(5) DEFAULT 5,
`pool_validation_interval` int(11) DEFAULT 30000,
`pool_remove_abandoned` tinyint(1) DEFAULT 1,
`pool_remove_abandoned_timeout` int(5) DEFAULT 60,
`pool_log_abandoned` tinyint(1) DEFAULT 1,
`pool_abandon_when_percentage_full` int(5) DEFAULT 50,
`pool_test_on_borrow` tinyint(1) DEFAULT 1,
`pool_max_active` int(5) DEFAULT 40,
`pool_min_idle` int(5) DEFAULT 20,
`pool_max_idle` int(5) DEFAULT 10,
`pool_suspect_timeout` int(5) DEFAULT 60,
`pool_time_between_eviction_runs_millis` int(11) DEFAULT 34000,
`pool_min_evictable_idle_time_millis` int(11) DEFAULT 60000,
`auto_update` tinyint NOT NULL DEFAULT '1',
`pool_initial_size` INT DEFAULT 5,
`pool_validation_interval` INT DEFAULT 30000,
`pool_remove_abandoned` tinyint DEFAULT 1,
`pool_remove_abandoned_timeout` INT DEFAULT 60,
`pool_log_abandoned` tinyint DEFAULT 1,
`pool_abandon_when_percentage_full` INT DEFAULT 50,
`pool_test_on_borrow` tinyint DEFAULT 1,
`pool_max_active` INT DEFAULT 40,
`pool_min_idle` INT DEFAULT 20,
`pool_max_idle` INT DEFAULT 10,
`pool_suspect_timeout` INT DEFAULT 60,
`pool_time_between_eviction_runs_millis` INT DEFAULT 34000,
`pool_min_evictable_idle_time_millis` INT DEFAULT 60000,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8;
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=UTF8MB4;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -127,14 +127,14 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `timezones`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = UTF8MB4 */;
CREATE TABLE `timezones` (
`id` int(3) NOT NULL AUTO_INCREMENT,
`id` INT NOT NULL AUTO_INCREMENT,
`country_code` varchar(2) NOT NULL,
`timezonename` varchar(100) NOT NULL,
`comments` varchar(150) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=416 DEFAULT CHARSET=utf8;
) ENGINE=InnoDB AUTO_INCREMENT=416 DEFAULT CHARSET=UTF8MB4;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -26,7 +26,7 @@
/*!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 */;
/*!40101 SET NAMES UTF8MB4 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
@@ -40,14 +40,14 @@
DROP TABLE IF EXISTS `tenants`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = UTF8MB4 */;
CREATE TABLE `tenants` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`id` BIGINT NOT NULL AUTO_INCREMENT,
`identifier` varchar(100) NOT NULL,
`name` varchar(100) NOT NULL,
`schema_name` varchar(100) NOT NULL,
`timezone_id` varchar(100) NOT NULL,
`country_id` int(11) DEFAULT NULL,
`country_id` INT DEFAULT NULL,
`joined_date` date DEFAULT NULL,
`created_date` datetime DEFAULT NULL,
`lastmodified_date` datetime DEFAULT NULL,
@@ -55,9 +55,9 @@ CREATE TABLE `tenants` (
`schema_server_port` varchar(10) NOT NULL DEFAULT '3306',
`schema_username` varchar(100) NOT NULL DEFAULT 'root',
`schema_password` varchar(100) NOT NULL DEFAULT 'mysql',
`auto_update` tinyint(1) NOT NULL DEFAULT '1',
`auto_update` tinyint NOT NULL DEFAULT '1',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=UTF8MB4;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -76,14 +76,14 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `timezones`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
/*!40101 SET character_set_client = UTF8MB4 */;
CREATE TABLE `timezones` (
`id` int(3) NOT NULL AUTO_INCREMENT,
`id` INT NOT NULL AUTO_INCREMENT,
`country_code` varchar(2) NOT NULL,
`timezonename` varchar(100) NOT NULL,
`comments` varchar(150) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=416 DEFAULT CHARSET=utf8;
) ENGINE=InnoDB AUTO_INCREMENT=416 DEFAULT CHARSET=UTF8MB4;
/*!40101 SET character_set_client = @saved_cs_client */;
--
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -163,76 +163,76 @@ where mc.`code_name` = "YesNo";
DROP TABLE IF EXISTS `client additional data`;
CREATE TABLE `client additional data` (
`client_id` bigint(20) NOT NULL,
`Gender_cd` int(11) NOT NULL,
`client_id` BIGINT NOT NULL,
`Gender_cd` INT NOT NULL,
`Date of Birth` date NOT NULL,
`Home address` text NOT NULL,
`Telephone number` varchar(20) NOT NULL,
`Telephone number (2nd)` varchar(20) NOT NULL,
`Email address` varchar(50) NOT NULL,
`EducationLevel_cd` int(11) NOT NULL,
`MaritalStatus_cd` int(11) NOT NULL,
`Number of children` int(11) NOT NULL,
`EducationLevel_cd` INT NOT NULL,
`MaritalStatus_cd` INT NOT NULL,
`Number of children` INT NOT NULL,
`Citizenship` varchar(50) NOT NULL,
`PovertyStatus_cd` int(11) NOT NULL,
`YesNo_cd_Employed` int(11) NOT NULL,
`FieldOfEmployment_cd_Field of employment` int(11) DEFAULT NULL,
`PovertyStatus_cd` INT NOT NULL,
`YesNo_cd_Employed` INT NOT NULL,
`FieldOfEmployment_cd_Field of employment` INT DEFAULT NULL,
`Employer name` varchar(50) DEFAULT NULL,
`Number of years` int(11) DEFAULT NULL,
`Number of years` INT DEFAULT NULL,
`Monthly salary` decimal(19,6) DEFAULT NULL,
`YesNo_cd_Self employed` int(11) NOT NULL,
`FieldOfEmployment_cd_Field of self-employment` int(11) DEFAULT NULL,
`YesNo_cd_Self employed` INT NOT NULL,
`FieldOfEmployment_cd_Field of self-employment` INT DEFAULT NULL,
`Business address` text,
`Number of employees` int(11) DEFAULT NULL,
`Number of employees` INT DEFAULT NULL,
`Monthly salaries paid` decimal(19,6) DEFAULT NULL,
`Monthly net income of business activity` decimal(19,6) DEFAULT NULL,
`Monthly rent` decimal(19,6) DEFAULT NULL,
`Other income generating activities` varchar(100) DEFAULT NULL,
`YesNo_cd_Bookkeeping` int(11) DEFAULT NULL,
`YesNo_cd_Loans with other institutions` int(11) NOT NULL,
`YesNo_cd_Bookkeeping` INT DEFAULT NULL,
`YesNo_cd_Loans with other institutions` INT NOT NULL,
`From whom` varchar(100) DEFAULT NULL,
`Amount` decimal(19,6) DEFAULT NULL,
`Interest rate pa` decimal(19,6) DEFAULT NULL,
`Number of people depending on overal income` int(11) NOT NULL,
`YesNo_cd_Bank account` int(11) NOT NULL,
`YesNo_cd_Business plan provided` int(11) NOT NULL,
`YesNo_cd_Access to internet` int(11) DEFAULT NULL,
`Number of people depending on overal income` INT NOT NULL,
`YesNo_cd_Bank account` INT NOT NULL,
`YesNo_cd_Business plan provided` INT NOT NULL,
`YesNo_cd_Access to internet` INT DEFAULT NULL,
`Introduced by` varchar(100) DEFAULT NULL,
`Known to introducer since` varchar(100) NOT NULL,
`Last visited by` varchar(100) DEFAULT NULL,
`Last visited on` date NOT NULL,
PRIMARY KEY (`client_id`),
CONSTRAINT `FK_client_additional_data` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
DROP TABLE IF EXISTS `impact measurement`;
CREATE TABLE `impact measurement` (
`loan_id` bigint(20) NOT NULL,
`YesNo_cd_RepaidOnSchedule` int(11) NOT NULL,
`loan_id` BIGINT NOT NULL,
`YesNo_cd_RepaidOnSchedule` INT NOT NULL,
`ReasonNotRepaidOnSchedule` text DEFAULT NULL,
`How was Loan Amount Invested` text NOT NULL,
`Additional Income Generated` decimal(19,6) NOT NULL,
`Additional Income Used For` text NOT NULL,
`YesNo_cd_NewJobsCreated` int(11) NOT NULL,
`Number of Jobs Created` bigint(20) DEFAULT NULL,
`YesNo_cd_NewJobsCreated` INT NOT NULL,
`Number of Jobs Created` BIGINT DEFAULT NULL,
PRIMARY KEY (`loan_id`),
CONSTRAINT `FK_impact measurement` FOREIGN KEY (`loan_id`) REFERENCES `m_loan` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
DROP TABLE IF EXISTS `loan additional data`;
CREATE TABLE `loan additional data` (
`loan_id` bigint(20) NOT NULL,
`PurposeOfLoan_cd` int(11) NOT NULL,
`CollateralType_cd` int(11) NOT NULL,
`loan_id` BIGINT NOT NULL,
`PurposeOfLoan_cd` INT NOT NULL,
`CollateralType_cd` INT NOT NULL,
`Collateral notes` text NOT NULL,
`YesNo_cd_Guarantor` int(11) NOT NULL,
`YesNo_cd_Guarantor` INT NOT NULL,
`Guarantor name` varchar(100) DEFAULT NULL,
`Guarantor relation` varchar(100) DEFAULT NULL,
`Guarantor address` varchar(100) DEFAULT NULL,
`Guarantor telephone number` varchar(20) DEFAULT NULL,
PRIMARY KEY (`loan_id`),
CONSTRAINT `FK_loan_additional_data` FOREIGN KEY (`loan_id`) REFERENCES `m_loan` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
-- datatables mapping
INSERT INTO `x_registered_table`
File diff suppressed because one or more lines are too long
@@ -70,45 +70,45 @@ where mc.`code_name` = "Education";
DROP TABLE IF EXISTS `extra_client_details`;
CREATE TABLE `extra_client_details` (
`client_id` bigint(20) NOT NULL,
`client_id` BIGINT NOT NULL,
`Business Description` varchar(100) DEFAULT NULL,
`Years in Business` int(11) DEFAULT NULL,
`Gender_cd` int(11) DEFAULT NULL,
`Years in Business` INT DEFAULT NULL,
`Gender_cd` INT DEFAULT NULL,
`Education_cv` varchar(60) DEFAULT NULL,
`Next Visit` date DEFAULT NULL,
`Highest Rate Paid` decimal(19,6) DEFAULT NULL,
`Comment` text,
PRIMARY KEY (`client_id`),
CONSTRAINT `FK_extra_client_details` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
DROP TABLE IF EXISTS `extra_family_details`;
CREATE TABLE `extra_family_details` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`client_id` bigint(20) NOT NULL,
`id` BIGINT NOT NULL AUTO_INCREMENT,
`client_id` BIGINT NOT NULL,
`Name` varchar(40) DEFAULT NULL,
`Date of Birth` date DEFAULT NULL,
`Points Score` int(11) DEFAULT NULL,
`Education_cd_Highest` int(11) DEFAULT NULL,
`Points Score` INT DEFAULT NULL,
`Education_cd_Highest` INT DEFAULT NULL,
`Other Notes` text,
PRIMARY KEY (`id`),
KEY `FK_Extra Family Details Data_1` (`client_id`),
CONSTRAINT `FK_family_details` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
DROP TABLE IF EXISTS `extra_loan_details`;
CREATE TABLE `extra_loan_details` (
`loan_id` bigint(20) NOT NULL,
`loan_id` BIGINT NOT NULL,
`Business Description` varchar(100) DEFAULT NULL,
`Years in Business` int(11) DEFAULT NULL,
`Gender_cd` int(11) DEFAULT NULL,
`Years in Business` INT DEFAULT NULL,
`Gender_cd` INT DEFAULT NULL,
`Education_cv` varchar(60) DEFAULT NULL,
`Next Visit` date DEFAULT NULL,
`Highest Rate Paid` decimal(19,6) DEFAULT NULL,
`Comment` text,
PRIMARY KEY (`loan_id`),
CONSTRAINT `FK_extra_loan_details` FOREIGN KEY (`loan_id`) REFERENCES `m_loan` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
-- datatables mapping
INSERT INTO `x_registered_table`
@@ -19,7 +19,7 @@
DROP TABLE IF EXISTS `risk_analysis`;
CREATE TABLE `risk_analysis` (
`client_id` bigint(20) NOT NULL,
`client_id` BIGINT NOT NULL,
`proposed_loan_amount` decimal(19,6) DEFAULT NULL,
`assets_cash` decimal(19,6) DEFAULT NULL,
`assets_bank_accounts` decimal(19,6) DEFAULT NULL,
@@ -55,4 +55,4 @@ CREATE TABLE `risk_analysis` (
`fi_repayment_capacity` decimal(19,6) DEFAULT NULL,
PRIMARY KEY (`client_id`),
CONSTRAINT `FK_risk_analysis_1` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
File diff suppressed because one or more lines are too long
@@ -19,45 +19,45 @@
DROP TABLE IF EXISTS `latam_extra_client_details`;
CREATE TABLE `latam_extra_client_details` (
`client_id` bigint(20) NOT NULL,
`client_id` BIGINT NOT NULL,
`Business Description` varchar(100) DEFAULT NULL,
`Years in Business` int(11) DEFAULT NULL,
`Gender_cd` int(11) DEFAULT NULL,
`Years in Business` INT DEFAULT NULL,
`Gender_cd` INT DEFAULT NULL,
`Education_cv` varchar(60) DEFAULT NULL,
`Next Visit` date DEFAULT NULL,
`Highest Rate Paid` decimal(19,6) DEFAULT NULL,
`Comment` text,
PRIMARY KEY (`client_id`),
CONSTRAINT `FK_latam_extra_client_details` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
DROP TABLE IF EXISTS `latam_family_details`;
CREATE TABLE `latam_family_details` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`client_id` bigint(20) NOT NULL,
`id` BIGINT NOT NULL AUTO_INCREMENT,
`client_id` BIGINT NOT NULL,
`Name` varchar(40) DEFAULT NULL,
`Date of Birth` date DEFAULT NULL,
`Points Score` int(11) DEFAULT NULL,
`Education_cd_Highest` int(11) DEFAULT NULL,
`Points Score` INT DEFAULT NULL,
`Education_cd_Highest` INT DEFAULT NULL,
`Other Notes` text,
PRIMARY KEY (`id`),
KEY `FK_Extra Family Details Data_1` (`client_id`),
CONSTRAINT `FK_latam_family_details` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
DROP TABLE IF EXISTS `latam_extra_loan_details`;
CREATE TABLE `latam_extra_loan_details` (
`loan_id` bigint(20) NOT NULL,
`loan_id` BIGINT NOT NULL,
`Business Description` varchar(100) DEFAULT NULL,
`Years in Business` int(11) DEFAULT NULL,
`Gender_cd` int(11) DEFAULT NULL,
`Years in Business` INT DEFAULT NULL,
`Gender_cd` INT DEFAULT NULL,
`Education_cv` varchar(60) DEFAULT NULL,
`Next Visit` date DEFAULT NULL,
`Highest Rate Paid` decimal(19,6) DEFAULT NULL,
`Comment` text,
PRIMARY KEY (`loan_id`),
CONSTRAINT `FK_latam_extra_loan_details` FOREIGN KEY (`loan_id`) REFERENCES `m_loan` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
INSERT INTO `mifostenant-latam`.`m_code` (`code_name`, `is_system_defined`) VALUES ('Gender', 1);
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long