Merge pull request #857 from xurror/FINERACT-897
[WIP] MySQL v8(FINERACT-897)
This commit is contained in:
@@ -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
+13
-13
@@ -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
+1
-1
@@ -80,7 +80,7 @@ public class TenantDatabaseUpgradeService {
|
||||
flyway.migrate();
|
||||
} catch (FlywayException e) {
|
||||
String betterMessage = e.getMessage() + "; for Tenant DB URL: " + connectionProtocol + ", username: "
|
||||
+ connection.getSchemaUsername();
|
||||
+ connection.getSchemaUsername();
|
||||
throw new FlywayException(betterMessage, e.getCause());
|
||||
}
|
||||
}
|
||||
|
||||
+6
-6
@@ -588,10 +588,10 @@ public class ReadWriteNonCoreDataServiceImpl implements ReadWriteNonCoreDataServ
|
||||
sqlBuilder = sqlBuilder.append("CREATE TABLE `" + datatableName + "` (");
|
||||
|
||||
if (multiRow) {
|
||||
sqlBuilder = sqlBuilder.append("`id` BIGINT(20) NOT NULL AUTO_INCREMENT, ")
|
||||
.append("`" + fkColumnName + "` BIGINT(20) NOT NULL, ");
|
||||
sqlBuilder = sqlBuilder.append("`id` BIGINT NOT NULL AUTO_INCREMENT, ")
|
||||
.append("`" + fkColumnName + "` BIGINT NOT NULL, ");
|
||||
} else {
|
||||
sqlBuilder = sqlBuilder.append("`" + fkColumnName + "` BIGINT(20) NOT NULL, ");
|
||||
sqlBuilder = sqlBuilder.append("`" + fkColumnName + "` BIGINT NOT NULL, ");
|
||||
}
|
||||
|
||||
for (final JsonElement column : columns) {
|
||||
@@ -614,7 +614,7 @@ public class ReadWriteNonCoreDataServiceImpl implements ReadWriteNonCoreDataServ
|
||||
|
||||
sqlBuilder.append(constrainBuilder);
|
||||
|
||||
sqlBuilder = sqlBuilder.append(") ENGINE=InnoDB DEFAULT CHARSET=utf8;");
|
||||
sqlBuilder = sqlBuilder.append(") ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;");
|
||||
this.jdbcTemplate.execute(sqlBuilder.toString());
|
||||
|
||||
registerDatatable(datatableName, apptableName);
|
||||
@@ -906,14 +906,14 @@ public class ReadWriteNonCoreDataServiceImpl implements ReadWriteNonCoreDataServ
|
||||
if (mapColumnNameDefinition.containsKey("id")) {
|
||||
sqlBuilder = sqlBuilder.append("ALTER TABLE `" + datatableName + "` ").append("DROP KEY `fk_" + oldFKName + "`,")
|
||||
.append("DROP FOREIGN KEY `fk_" + oldConstraintName + "`,")
|
||||
.append("CHANGE COLUMN `" + oldFKName + "` `" + newFKName + "` BIGINT(20) NOT NULL,")
|
||||
.append("CHANGE COLUMN `" + oldFKName + "` `" + newFKName + "` BIGINT NOT NULL,")
|
||||
.append("ADD KEY `fk_" + newFKName + "` (`" + newFKName + "`),")
|
||||
.append("ADD CONSTRAINT `fk_" + newConstraintName + "` ").append("FOREIGN KEY (`" + newFKName + "`) ")
|
||||
.append("REFERENCES `" + actualAppTableName + "` (`id`)");
|
||||
} else {
|
||||
sqlBuilder = sqlBuilder.append("ALTER TABLE `" + datatableName + "` ")
|
||||
.append("DROP FOREIGN KEY `fk_" + oldConstraintName + "`,")
|
||||
.append("CHANGE COLUMN `" + oldFKName + "` `" + newFKName + "` BIGINT(20) NOT NULL,")
|
||||
.append("CHANGE COLUMN `" + oldFKName + "` `" + newFKName + "` BIGINT NOT NULL,")
|
||||
.append("ADD CONSTRAINT `fk_" + newConstraintName + "` ").append("FOREIGN KEY (`" + newFKName + "`) ")
|
||||
.append("REFERENCES `" + actualAppTableName + "` (`id`)");
|
||||
}
|
||||
|
||||
+1
-1
@@ -18,4 +18,4 @@
|
||||
--
|
||||
|
||||
ALTER TABLE `m_savings_account_transfer`
|
||||
ADD COLUMN `currency_multiplesof` SMALLINT(5) NULL DEFAULT NULL AFTER `currency_digits`;
|
||||
ADD COLUMN `currency_multiplesof` SMALLINT NULL DEFAULT NULL AFTER `currency_digits`;
|
||||
+7
-7
@@ -18,8 +18,8 @@
|
||||
--
|
||||
|
||||
CREATE TABLE `m_meeting` (
|
||||
`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
|
||||
`calendar_instance_id` BIGINT(20) NOT NULL,
|
||||
`id` BIGINT NOT NULL AUTO_INCREMENT,
|
||||
`calendar_instance_id` BIGINT NOT NULL,
|
||||
`meeting_date` DATE NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE INDEX `unique_calendar_instance_id_meeting_date` (`calendar_instance_id`, `meeting_date`),
|
||||
@@ -29,17 +29,17 @@ COLLATE='latin1_swedish_ci'
|
||||
ENGINE=InnoDB;
|
||||
|
||||
CREATE TABLE `m_client_attendance` (
|
||||
`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
|
||||
`client_id` BIGINT(20) NOT NULL DEFAULT '0',
|
||||
`meeting_id` BIGINT(20) NOT NULL,
|
||||
`attendance_type_enum` SMALLINT(5) NOT NULL,
|
||||
`id` BIGINT NOT NULL AUTO_INCREMENT,
|
||||
`client_id` BIGINT NOT NULL DEFAULT '0',
|
||||
`meeting_id` BIGINT NOT NULL,
|
||||
`attendance_type_enum` SMALLINT NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE INDEX `unique_client_meeting_attendance` (`client_id`, `meeting_id`),
|
||||
INDEX `FK_m_meeting_m_client_attendance` (`meeting_id`),
|
||||
CONSTRAINT `FK_m_client_m_client_attendance` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`),
|
||||
CONSTRAINT `FK_m_meeting_m_client_attendance` FOREIGN KEY (`meeting_id`) REFERENCES `m_meeting` (`id`)
|
||||
)
|
||||
COLLATE='utf8_general_ci'
|
||||
COLLATE='utf8mb4_general_ci'
|
||||
ENGINE=InnoDB;
|
||||
|
||||
|
||||
|
||||
+6
-6
@@ -18,16 +18,16 @@
|
||||
--
|
||||
|
||||
ALTER TABLE `job`
|
||||
ADD COLUMN `is_misfired` TINYINT(1) NOT NULL DEFAULT '0' AFTER `scheduler_group`;
|
||||
ADD COLUMN `is_misfired` tinyint NOT NULL DEFAULT '0' AFTER `scheduler_group`;
|
||||
|
||||
CREATE TABLE `scheduler_detail` (
|
||||
`id` SMALLINT(2) NOT NULL AUTO_INCREMENT,
|
||||
`is_suspended` TINYINT(1) NOT NULL DEFAULT '0',
|
||||
`execute_misfired_jobs` TINYINT(1) NOT NULL DEFAULT '1',
|
||||
`reset_scheduler_on_bootup` TINYINT(1) NOT NULL DEFAULT '1',
|
||||
`id` SMALLINT NOT NULL AUTO_INCREMENT,
|
||||
`is_suspended` tinyint NOT NULL DEFAULT '0',
|
||||
`execute_misfired_jobs` tinyint NOT NULL DEFAULT '1',
|
||||
`reset_scheduler_on_bootup` tinyint NOT NULL DEFAULT '1',
|
||||
PRIMARY KEY (`id`)
|
||||
)
|
||||
COLLATE='utf8_general_ci'
|
||||
COLLATE='utf8mb4_general_ci'
|
||||
ENGINE=InnoDB;
|
||||
|
||||
INSERT INTO `scheduler_detail` (`is_suspended`, `execute_misfired_jobs`, `reset_scheduler_on_bootup`) VALUES (FALSE,TRUE,TRUE);
|
||||
|
||||
+2
-2
@@ -18,7 +18,7 @@
|
||||
--
|
||||
|
||||
ALTER TABLE `m_loan_transaction`
|
||||
ADD COLUMN `office_id` BIGINT(20) NULL DEFAULT NULL AFTER `loan_id`;
|
||||
ADD COLUMN `office_id` BIGINT NULL DEFAULT NULL AFTER `loan_id`;
|
||||
|
||||
/**update client loans**/
|
||||
UPDATE m_loan_transaction lt set lt.office_id = (SELECT c.office_id AS officeId FROM m_loan l JOIN m_client c on l.client_id=c.id where l.id=lt.loan_id) where lt.loan_id in (Select l.id from m_loan l where l.client_id is not null);
|
||||
@@ -28,7 +28,7 @@ UPDATE m_loan_transaction lt set lt.office_id = (SELECT g.office_id AS officeId
|
||||
|
||||
/**Add foreign key constraints**/
|
||||
ALTER TABLE `m_loan_transaction`
|
||||
CHANGE COLUMN `office_id` `office_id` BIGINT(20) NOT NULL AFTER `loan_id`;
|
||||
CHANGE COLUMN `office_id` `office_id` BIGINT NOT NULL AFTER `loan_id`;
|
||||
|
||||
ALTER TABLE `m_loan_transaction`
|
||||
ADD CONSTRAINT `FK_m_loan_transaction_m_office` FOREIGN KEY (`office_id`) REFERENCES `m_office` (`id`);
|
||||
+2
-2
@@ -19,12 +19,12 @@
|
||||
|
||||
CREATE TABLE `x_table_cloumn_code_mappings` (
|
||||
`column_alias_name` VARCHAR(50) NOT NULL,
|
||||
`code_id` INT(10) NOT NULL,
|
||||
`code_id` INT NOT NULL,
|
||||
PRIMARY KEY (`column_alias_name`),
|
||||
INDEX `FK_x_code_id` (`code_id`),
|
||||
CONSTRAINT `FK_x_code_id` FOREIGN KEY (`code_id`) REFERENCES `m_code` (`id`)
|
||||
)
|
||||
COLLATE='utf8_general_ci'
|
||||
COLLATE='utf8mb4_general_ci'
|
||||
ENGINE=InnoDB;
|
||||
|
||||
INSERT INTO `c_configuration` (`name`, `enabled`) VALUES ('constraint_approach_for_datatables', 1);
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@
|
||||
/***Store destination office Id while client is pending transfers and effective joining date in a particular branch**/
|
||||
ALTER TABLE `m_client`
|
||||
ADD COLUMN `office_joining_date` DATE NULL AFTER `activation_date`,
|
||||
ADD COLUMN `transfer_to_office_id` BIGINT(20) NULL AFTER `office_id`,
|
||||
ADD COLUMN `transfer_to_office_id` BIGINT NULL AFTER `office_id`,
|
||||
ADD CONSTRAINT `FK_m_client_m_office` FOREIGN KEY (`transfer_to_office_id`) REFERENCES `m_office` (`id`);
|
||||
|
||||
|
||||
|
||||
+2
-2
@@ -24,8 +24,8 @@ VALUES
|
||||
|
||||
|
||||
ALTER TABLE `m_savings_product`
|
||||
ADD COLUMN `interest_posting_period_enum` SMALLINT(5) NOT NULL DEFAULT 4 AFTER `interest_compounding_period_enum`;
|
||||
ADD COLUMN `interest_posting_period_enum` SMALLINT NOT NULL DEFAULT 4 AFTER `interest_compounding_period_enum`;
|
||||
|
||||
|
||||
ALTER TABLE `m_savings_account`
|
||||
ADD COLUMN `interest_posting_period_enum` SMALLINT(5) NOT NULL DEFAULT 4 AFTER `interest_compounding_period_enum`;
|
||||
ADD COLUMN `interest_posting_period_enum` SMALLINT NOT NULL DEFAULT 4 AFTER `interest_compounding_period_enum`;
|
||||
+1
-1
@@ -19,7 +19,7 @@
|
||||
|
||||
INSERT INTO `m_code` (`code_name`, `is_system_defined`) VALUES ('GroupClosureReason', 1);
|
||||
|
||||
ALTER TABLE `m_group` ADD COLUMN `closure_reason_cv_id` INT(11) NULL DEFAULT NULL,
|
||||
ALTER TABLE `m_group` ADD COLUMN `closure_reason_cv_id` INT NULL DEFAULT NULL,
|
||||
ADD COLUMN `closedon_date` DATE NULL DEFAULT NULL,
|
||||
ADD CONSTRAINT `FK_m_group_m_code` FOREIGN KEY (`closure_reason_cv_id`) REFERENCES `m_code_value` (`id`);
|
||||
|
||||
|
||||
+11
-11
@@ -23,15 +23,15 @@ INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `c
|
||||
DROP TABLE IF EXISTS `mix_taxonomy`;
|
||||
|
||||
CREATE TABLE `mix_taxonomy` (
|
||||
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`id` INT unsigned NOT NULL AUTO_INCREMENT,
|
||||
`name` varchar(100) DEFAULT NULL,
|
||||
`namespace_id` int(11) DEFAULT NULL,
|
||||
`namespace_id` INT DEFAULT NULL,
|
||||
`dimension` varchar(100) DEFAULT NULL,
|
||||
`type` int(11) DEFAULT NULL,
|
||||
`type` INT DEFAULT NULL,
|
||||
`description` varchar(1000) DEFAULT NULL,
|
||||
`need_mapping` tinyint(1) DEFAULT NULL,
|
||||
`need_mapping` tinyint DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
|
||||
|
||||
LOCK TABLES `mix_taxonomy` WRITE;
|
||||
|
||||
@@ -92,13 +92,13 @@ UNLOCK TABLES;
|
||||
DROP TABLE IF EXISTS `mix_taxonomy_mapping`;
|
||||
|
||||
CREATE TABLE `mix_taxonomy_mapping` (
|
||||
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`id` INT unsigned NOT NULL AUTO_INCREMENT,
|
||||
`identifier` varchar(50) NOT NULL DEFAULT '',
|
||||
`config` varchar(200) DEFAULT NULL,
|
||||
`last_update_date` datetime DEFAULT NULL,
|
||||
`currency` varchar(11) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
|
||||
|
||||
LOCK TABLES `mix_taxonomy_mapping` WRITE;
|
||||
|
||||
@@ -111,12 +111,12 @@ UNLOCK TABLES;
|
||||
DROP TABLE IF EXISTS `mix_xbrl_namespace`;
|
||||
|
||||
CREATE TABLE `mix_xbrl_namespace` (
|
||||
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`id` INT unsigned NOT NULL AUTO_INCREMENT,
|
||||
`prefix` varchar(20) NOT NULL DEFAULT '',
|
||||
`url` varchar(100) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `UNQUE` (`prefix`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
|
||||
|
||||
LOCK TABLES `mix_xbrl_namespace` WRITE;
|
||||
|
||||
@@ -124,9 +124,9 @@ INSERT INTO `mix_xbrl_namespace` (`id`, `prefix`, `url`)
|
||||
VALUES
|
||||
(1,'ifrs','http://xbrl.iasb.org/taxonomy/2009-04-01/ifrs'),
|
||||
(2,'iso4217','http://www.xbrl.org/2003/iso4217'),
|
||||
(3,'mix','http://www.themix.org/int/fr/ifrs/basi/YYYY-MM-DD/mx-cor'),
|
||||
(3,'mix','http://www.themix.org/INT/fr/ifrs/basi/YYYY-MM-DD/mx-cor'),
|
||||
(4,'xbrldi','http://xbrl.org/2006/xbrldi'),
|
||||
(5,'xbrli','http://www.xbrl.org/2003/instance'),
|
||||
(6,'link','http://www.xbrl.org/2003/linkbase'),
|
||||
(7,'dc-all','http://www.themix.org/int/fr/ifrs/basi/2010-08-31/dc-all');
|
||||
(7,'dc-all','http://www.themix.org/INT/fr/ifrs/basi/2010-08-31/dc-all');
|
||||
UNLOCK TABLES;
|
||||
+2
-2
@@ -18,7 +18,7 @@
|
||||
--
|
||||
|
||||
ALTER TABLE `m_savings_account_transaction`
|
||||
ADD COLUMN `office_id` BIGINT(20) NULL DEFAULT NULL AFTER `savings_account_id`;
|
||||
ADD COLUMN `office_id` BIGINT NULL DEFAULT NULL AFTER `savings_account_id`;
|
||||
|
||||
/**update client savings**/
|
||||
UPDATE m_savings_account_transaction st set st.office_id = (SELECT c.office_id AS officeId FROM m_savings_account sa JOIN m_client c on sa.client_id=c.id where sa.id=st.savings_account_id) where st.savings_account_id in (Select sa.id from m_savings_account sa where sa.client_id is not null);
|
||||
@@ -28,7 +28,7 @@ UPDATE m_savings_account_transaction st set st.office_id = (SELECT g.office_id A
|
||||
|
||||
/**Add foreign key constraints**/
|
||||
ALTER TABLE `m_savings_account_transaction`
|
||||
CHANGE COLUMN `office_id` `office_id` BIGINT(20) NOT NULL AFTER `savings_account_id`;
|
||||
CHANGE COLUMN `office_id` `office_id` BIGINT NOT NULL AFTER `savings_account_id`;
|
||||
|
||||
ALTER TABLE `m_savings_account_transaction`
|
||||
ADD CONSTRAINT `FK_m_savings_account_transaction_m_office` FOREIGN KEY (`office_id`) REFERENCES `m_office` (`id`);
|
||||
+3
-3
@@ -19,10 +19,10 @@
|
||||
|
||||
DROP TABLE IF EXISTS `c_cache`;
|
||||
CREATE TABLE `c_cache` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||
`cache_type_enum` tinyint(1) NOT NULL DEFAULT '1',
|
||||
`id` BIGINT NOT NULL AUTO_INCREMENT,
|
||||
`cache_type_enum` tinyint NOT NULL DEFAULT '1',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
|
||||
|
||||
|
||||
INSERT INTO `c_cache`
|
||||
|
||||
+3
-3
@@ -29,14 +29,14 @@ CREATE TABLE `m_portfolio_account_associations` (
|
||||
CONSTRAINT `linked_loan_fk` FOREIGN KEY (`linked_loan_account_id`) REFERENCES `m_loan` (`id`),
|
||||
CONSTRAINT `linked_savings_fk` FOREIGN KEY (`linked_savings_account_id`) REFERENCES `m_savings_account` (`id`)
|
||||
)
|
||||
COLLATE='utf8_general_ci'
|
||||
COLLATE='utf8mb4_general_ci'
|
||||
ENGINE=InnoDB;
|
||||
|
||||
ALTER TABLE `m_charge`
|
||||
ADD COLUMN `charge_payment_mode_enum` SMALLINT(5) NOT NULL DEFAULT '0' AFTER `charge_calculation_enum`;
|
||||
ADD COLUMN `charge_payment_mode_enum` SMALLINT NOT NULL DEFAULT '0' AFTER `charge_calculation_enum`;
|
||||
|
||||
ALTER TABLE `m_loan_charge`
|
||||
ADD COLUMN `charge_payment_mode_enum` SMALLINT(5) NOT NULL DEFAULT '0' AFTER `charge_calculation_enum`;
|
||||
ADD COLUMN `charge_payment_mode_enum` SMALLINT NOT NULL DEFAULT '0' AFTER `charge_calculation_enum`;
|
||||
|
||||
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('transaction_loan', 'PAY_LOANCHARGE', 'LOANCHARGE', 'PAY', 0);
|
||||
|
||||
|
||||
+14
-14
@@ -21,9 +21,9 @@ ALTER TABLE `m_savings_account_charge`
|
||||
CHANGE COLUMN `due_for_collection_as_of_date` `charge_due_date` DATE NULL DEFAULT NULL AFTER `charge_time_enum`;
|
||||
|
||||
ALTER TABLE `m_savings_account_charge`
|
||||
ADD COLUMN `fee_on_month` SMALLINT(5) NULL DEFAULT NULL AFTER `charge_due_date`,
|
||||
ADD COLUMN `fee_on_day` SMALLINT(5) NULL DEFAULT NULL AFTER `fee_on_month`,
|
||||
ADD COLUMN `is_active` TINYINT(1) NOT NULL DEFAULT '1' AFTER `waived`;
|
||||
ADD COLUMN `fee_on_month` SMALLINT NULL DEFAULT NULL AFTER `charge_due_date`,
|
||||
ADD COLUMN `fee_on_day` SMALLINT NULL DEFAULT NULL AFTER `fee_on_month`,
|
||||
ADD COLUMN `is_active` tinyint NOT NULL DEFAULT '1' AFTER `waived`;
|
||||
|
||||
|
||||
delimiter //
|
||||
@@ -31,19 +31,19 @@ CREATE PROCEDURE migrate_withdrwal_fees()
|
||||
begin
|
||||
declare no_more_rows boolean default false;
|
||||
declare v_currency_code VARCHAR(3);
|
||||
declare v_withdrawal_fee_type_enum SMALLINT(5);
|
||||
declare v_withdrawal_fee_type_enum SMALLINT;
|
||||
declare v_withdrawal_fee_amount_charge_def DECIMAL(19,6);
|
||||
declare v_account_id BIGINT(20);
|
||||
declare v_account_id BIGINT;
|
||||
declare v_withdrawal_fee_amount DECIMAL(19,6);
|
||||
declare t_calculation_percentage DECIMAL(19,6);
|
||||
declare t_calculation_on_amount DECIMAL(19,6);
|
||||
declare t_withdrawal_fee_name VARCHAR(100);
|
||||
|
||||
declare t_charge_id BIGINT(20);
|
||||
declare t_savings_charge_id BIGINT(20);
|
||||
declare t_charge_id BIGINT;
|
||||
declare t_savings_charge_id BIGINT;
|
||||
|
||||
-- savings transaction variables
|
||||
declare v_savings_transaction_id BIGINT(20);
|
||||
declare v_savings_transaction_id BIGINT;
|
||||
declare v_transaction_amount DECIMAL(19,6);
|
||||
|
||||
|
||||
@@ -148,17 +148,17 @@ begin
|
||||
declare no_more_rows boolean default false;
|
||||
declare v_currency_code VARCHAR(3);
|
||||
declare v_annual_fee_amount_charge_def DECIMAL(19,6);
|
||||
declare v_account_id BIGINT(20);
|
||||
declare v_account_id BIGINT;
|
||||
declare v_annual_fee_amount DECIMAL(19,6);
|
||||
declare v_annual_fee_on_month SMALLINT(5);
|
||||
declare v_annual_fee_on_day SMALLINT(5);
|
||||
declare v_annual_fee_on_month SMALLINT;
|
||||
declare v_annual_fee_on_day SMALLINT;
|
||||
declare v_annual_fee_next_due_date DATE;
|
||||
declare t_annual_fee_name VARCHAR(100);
|
||||
declare t_charge_id BIGINT(20);
|
||||
declare t_savings_charge_id BIGINT(20);
|
||||
declare t_charge_id BIGINT;
|
||||
declare t_savings_charge_id BIGINT;
|
||||
|
||||
-- savings transaction variables
|
||||
declare v_savings_transaction_id BIGINT(20);
|
||||
declare v_savings_transaction_id BIGINT;
|
||||
declare v_transaction_amount DECIMAL(19,6);
|
||||
|
||||
|
||||
|
||||
+16
-16
@@ -18,13 +18,13 @@
|
||||
--
|
||||
|
||||
CREATE TABLE `m_savings_account_charge` (
|
||||
`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
|
||||
`savings_account_id` BIGINT(20) NOT NULL,
|
||||
`charge_id` BIGINT(20) NOT NULL,
|
||||
`is_penalty` TINYINT(1) NOT NULL DEFAULT '0',
|
||||
`charge_time_enum` SMALLINT(5) NOT NULL,
|
||||
`id` BIGINT NOT NULL AUTO_INCREMENT,
|
||||
`savings_account_id` BIGINT NOT NULL,
|
||||
`charge_id` BIGINT NOT NULL,
|
||||
`is_penalty` tinyint NOT NULL DEFAULT '0',
|
||||
`charge_time_enum` SMALLINT NOT NULL,
|
||||
`due_for_collection_as_of_date` DATE NULL DEFAULT NULL,
|
||||
`charge_calculation_enum` SMALLINT(5) NOT NULL,
|
||||
`charge_calculation_enum` SMALLINT NOT NULL,
|
||||
`calculation_percentage` DECIMAL(19,6) NULL DEFAULT NULL,
|
||||
`calculation_on_amount` DECIMAL(19,6) NULL DEFAULT NULL,
|
||||
`amount` DECIMAL(19,6) NOT NULL,
|
||||
@@ -32,26 +32,26 @@ CREATE TABLE `m_savings_account_charge` (
|
||||
`amount_waived_derived` DECIMAL(19,6) NULL DEFAULT NULL,
|
||||
`amount_writtenoff_derived` DECIMAL(19,6) NULL DEFAULT NULL,
|
||||
`amount_outstanding_derived` DECIMAL(19,6) NOT NULL DEFAULT '0.000000',
|
||||
`is_paid_derived` TINYINT(1) NOT NULL DEFAULT '0',
|
||||
`waived` TINYINT(1) NOT NULL DEFAULT '0',
|
||||
`is_paid_derived` tinyint NOT NULL DEFAULT '0',
|
||||
`waived` tinyint NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`id`),
|
||||
INDEX `charge_id` (`charge_id`),
|
||||
INDEX `m_savings_account_charge_ibfk_2` (`savings_account_id`),
|
||||
CONSTRAINT `m_savings_account_charge_ibfk_1` FOREIGN KEY (`charge_id`) REFERENCES `m_charge` (`id`),
|
||||
CONSTRAINT `m_savings_account_charge_ibfk_2` FOREIGN KEY (`savings_account_id`) REFERENCES `m_savings_account` (`id`)
|
||||
)
|
||||
ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
|
||||
|
||||
|
||||
CREATE TABLE `m_savings_product_charge` (
|
||||
`savings_product_id` BIGINT(20) NOT NULL,
|
||||
`charge_id` BIGINT(20) NOT NULL,
|
||||
`savings_product_id` BIGINT NOT NULL,
|
||||
`charge_id` BIGINT NOT NULL,
|
||||
PRIMARY KEY (`savings_product_id`, `charge_id`),
|
||||
INDEX `charge_id` (`charge_id`),
|
||||
CONSTRAINT `m_savings_product_charge_ibfk_1` FOREIGN KEY (`charge_id`) REFERENCES `m_charge` (`id`),
|
||||
CONSTRAINT `m_savings_product_charge_ibfk_2` FOREIGN KEY (`savings_product_id`) REFERENCES `m_savings_product` (`id`)
|
||||
)
|
||||
ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
|
||||
|
||||
|
||||
|
||||
@@ -69,9 +69,9 @@ INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `c
|
||||
|
||||
|
||||
CREATE TABLE `m_savings_account_charge_paid_by` (
|
||||
`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
|
||||
`savings_account_transaction_id` BIGINT(20) NOT NULL,
|
||||
`savings_account_charge_id` BIGINT(20) NOT NULL,
|
||||
`id` BIGINT NOT NULL AUTO_INCREMENT,
|
||||
`savings_account_transaction_id` BIGINT NOT NULL,
|
||||
`savings_account_charge_id` BIGINT NOT NULL,
|
||||
`amount` DECIMAL(19,6) NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
INDEX `FK__m_savings_account_transaction` (`savings_account_transaction_id`),
|
||||
@@ -79,5 +79,5 @@ CREATE TABLE `m_savings_account_charge_paid_by` (
|
||||
CONSTRAINT `FK__m_savings_account_charge` FOREIGN KEY (`savings_account_charge_id`) REFERENCES `m_savings_account_charge` (`id`),
|
||||
CONSTRAINT `FK__m_savings_account_transaction` FOREIGN KEY (`savings_account_transaction_id`) REFERENCES `m_savings_account_transaction` (`id`)
|
||||
)
|
||||
COLLATE='utf8_general_ci'
|
||||
COLLATE='utf8mb4_general_ci'
|
||||
ENGINE=InnoDB;
|
||||
|
||||
+14
-14
@@ -19,32 +19,32 @@
|
||||
|
||||
DROP TABLE IF EXISTS `m_template`;
|
||||
CREATE TABLE `m_template` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||
`name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
|
||||
`text` longtext COLLATE utf8_unicode_ci NOT NULL,
|
||||
`entity` int(11) DEFAULT NULL,
|
||||
`type` int(11) DEFAULT NULL,
|
||||
`id` BIGINT NOT NULL AUTO_INCREMENT,
|
||||
`name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`text` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`entity` INT DEFAULT NULL,
|
||||
`type` INT DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `unq_name` (`name`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
|
||||
|
||||
DROP TABLE IF EXISTS `m_templatemappers`;
|
||||
CREATE TABLE `m_templatemappers` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||
`mapperkey` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
|
||||
`mapperorder` int(11) DEFAULT NULL,
|
||||
`mappervalue` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
|
||||
`id` BIGINT NOT NULL AUTO_INCREMENT,
|
||||
`mapperkey` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`mapperorder` INT DEFAULT NULL,
|
||||
`mappervalue` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
|
||||
|
||||
DROP TABLE IF EXISTS `m_template_m_templatemappers`;
|
||||
CREATE TABLE `m_template_m_templatemappers` (
|
||||
`m_template_id` bigint(20) NOT NULL,
|
||||
`mappers_id` bigint(20) NOT NULL,
|
||||
`m_template_id` BIGINT NOT NULL,
|
||||
`mappers_id` BIGINT NOT NULL,
|
||||
UNIQUE KEY `mappers_id` (`mappers_id`),
|
||||
KEY (`mappers_id`),
|
||||
KEY (`m_template_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
|
||||
|
||||
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`)
|
||||
VALUES ('organistion', 'DELETE_TEMPLATE', 'TEMPLATE', 'DELETE', 0),
|
||||
|
||||
+4
-4
@@ -22,8 +22,8 @@ New table for storing transaction details (for both loan and savings)
|
||||
*/
|
||||
|
||||
CREATE TABLE `m_payment_detail` (
|
||||
`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
|
||||
`payment_type_enum` SMALLINT(5) NOT NULL,
|
||||
`id` BIGINT NOT NULL AUTO_INCREMENT,
|
||||
`payment_type_enum` SMALLINT NOT NULL,
|
||||
`account_number` VARCHAR(100) NULL DEFAULT NULL,
|
||||
`check_number` VARCHAR(100) NULL DEFAULT NULL,
|
||||
`receipt_number` VARCHAR(100) NULL DEFAULT NULL,
|
||||
@@ -31,7 +31,7 @@ CREATE TABLE `m_payment_detail` (
|
||||
`routing_code` VARCHAR(100) NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
)
|
||||
COLLATE='utf8_general_ci'
|
||||
COLLATE='utf8mb4_general_ci'
|
||||
ENGINE=InnoDB;
|
||||
|
||||
/*
|
||||
@@ -39,5 +39,5 @@ Update loan transaction to add a link to transaction detail table
|
||||
*/
|
||||
|
||||
ALTER TABLE `m_loan_transaction`
|
||||
ADD COLUMN `payment_detail_id` BIGINT(20) NULL AFTER `loan_id`,
|
||||
ADD COLUMN `payment_detail_id` BIGINT NULL AFTER `loan_id`,
|
||||
ADD CONSTRAINT `FK_m_loan_transaction_m_payment_detail` FOREIGN KEY (`payment_detail_id`) REFERENCES `m_payment_detail` (`id`);
|
||||
|
||||
+4
-4
@@ -18,10 +18,10 @@
|
||||
--
|
||||
|
||||
ALTER TABLE `m_charge`
|
||||
ADD COLUMN `fee_on_day` SMALLINT(5) NULL AFTER `amount`,
|
||||
ADD COLUMN `fee_interval` SMALLINT(5) NULL AFTER `fee_on_day`,
|
||||
ADD COLUMN `fee_on_month` SMALLINT(5) NULL AFTER `fee_interval`;
|
||||
ADD COLUMN `fee_on_day` SMALLINT NULL AFTER `amount`,
|
||||
ADD COLUMN `fee_interval` SMALLINT NULL AFTER `fee_on_day`,
|
||||
ADD COLUMN `fee_on_month` SMALLINT NULL AFTER `fee_interval`;
|
||||
|
||||
|
||||
ALTER TABLE `m_savings_account_charge`
|
||||
ADD COLUMN `fee_interval` SMALLINT(5) NULL DEFAULT NULL AFTER `fee_on_day`;
|
||||
ADD COLUMN `fee_interval` SMALLINT NULL DEFAULT NULL AFTER `fee_on_day`;
|
||||
+1
-1
@@ -18,4 +18,4 @@
|
||||
--
|
||||
|
||||
ALTER TABLE `m_charge`
|
||||
CHANGE COLUMN `charge_payment_mode_enum` `charge_payment_mode_enum` SMALLINT(5) NULL DEFAULT NULL AFTER `charge_calculation_enum`;
|
||||
CHANGE COLUMN `charge_payment_mode_enum` `charge_payment_mode_enum` SMALLINT NULL DEFAULT NULL AFTER `charge_calculation_enum`;
|
||||
+6
-6
@@ -19,11 +19,11 @@
|
||||
|
||||
DROP TABLE IF EXISTS `sms_messages_outbound`;
|
||||
CREATE TABLE `sms_messages_outbound` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||
`group_id` bigint(20) DEFAULT NULL,
|
||||
`client_id` bigint(20) DEFAULT NULL,
|
||||
`staff_id` bigint(20) DEFAULT NULL,
|
||||
`status_enum` int(5) NOT NULL DEFAULT '100',
|
||||
`id` BIGINT NOT NULL AUTO_INCREMENT,
|
||||
`group_id` BIGINT DEFAULT NULL,
|
||||
`client_id` BIGINT DEFAULT NULL,
|
||||
`staff_id` BIGINT DEFAULT NULL,
|
||||
`status_enum` INT NOT NULL DEFAULT '100',
|
||||
`mobile_no` varchar(50) NOT NULL,
|
||||
`message` varchar(1000) NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
@@ -32,7 +32,7 @@ CREATE TABLE `sms_messages_outbound` (
|
||||
CONSTRAINT `FKGROUP000000001` FOREIGN KEY (`group_id`) REFERENCES `m_group` (`id`),
|
||||
CONSTRAINT `FKCLIENT00000001` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`),
|
||||
CONSTRAINT `FKSTAFF000000001` FOREIGN KEY (`staff_id`) REFERENCES `m_staff` (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
|
||||
|
||||
-- Permissions for CRUD on SMS outbound message tracking
|
||||
DELETE FROM `m_permission` WHERE `entity_name`='SMS';
|
||||
|
||||
+6
-6
@@ -18,21 +18,21 @@
|
||||
--
|
||||
|
||||
CREATE TABLE `m_loan_installment_charge` (
|
||||
`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
|
||||
`loan_charge_id` BIGINT(20) NOT NULL,
|
||||
`loan_schedule_id` BIGINT(20) NOT NULL,
|
||||
`id` BIGINT NOT NULL AUTO_INCREMENT,
|
||||
`loan_charge_id` BIGINT NOT NULL,
|
||||
`loan_schedule_id` BIGINT NOT NULL,
|
||||
`due_date` DATE NULL DEFAULT NULL,
|
||||
`amount` DECIMAL(19,6) NOT NULL,
|
||||
`amount_paid_derived` DECIMAL(19,6) NULL DEFAULT NULL,
|
||||
`amount_waived_derived` DECIMAL(19,6) NULL DEFAULT NULL,
|
||||
`amount_writtenoff_derived` DECIMAL(19,6) NULL DEFAULT NULL,
|
||||
`amount_outstanding_derived` DECIMAL(19,6) NOT NULL DEFAULT '0.000000',
|
||||
`is_paid_derived` TINYINT(1) NOT NULL DEFAULT '0',
|
||||
`waived` TINYINT(1) NOT NULL DEFAULT '0',
|
||||
`is_paid_derived` tinyint NOT NULL DEFAULT '0',
|
||||
`waived` tinyint NOT NULL DEFAULT '0',
|
||||
`amount_through_charge_payment` DECIMAL(19,6) NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
CONSTRAINT `FK_loan_charge_id_charge_schedule` FOREIGN KEY (`loan_charge_id`) REFERENCES `m_loan_charge` (`id`),
|
||||
CONSTRAINT `FK_loan_schedule_id_charge_schedule` FOREIGN KEY (`loan_schedule_id`) REFERENCES `m_loan_repayment_schedule` (`id`)
|
||||
)
|
||||
COLLATE='utf8_general_ci'
|
||||
COLLATE='utf8mb4_general_ci'
|
||||
ENGINE=InnoDB;
|
||||
|
||||
+6
-6
@@ -18,11 +18,11 @@
|
||||
--
|
||||
|
||||
ALTER TABLE `m_client` ADD `submittedon_date` DATE NULL DEFAULT NULL ,
|
||||
ADD `submittedon_userid` BIGINT( 20 ) NULL DEFAULT NULL ,
|
||||
ADD `activatedon_userid` BIGINT( 20 ) NULL DEFAULT NULL ,
|
||||
ADD `closedon_userid` BIGINT( 20 ) NULL DEFAULT NULL ;
|
||||
ADD `submittedon_userid` BIGINT NULL DEFAULT NULL ,
|
||||
ADD `activatedon_userid` BIGINT NULL DEFAULT NULL ,
|
||||
ADD `closedon_userid` BIGINT NULL DEFAULT NULL ;
|
||||
|
||||
ALTER TABLE `m_group` ADD `activatedon_userid` BIGINT( 20 ) NULL ,
|
||||
ALTER TABLE `m_group` ADD `activatedon_userid` BIGINT NULL ,
|
||||
ADD `submittedon_date` DATE NULL ,
|
||||
ADD `submittedon_userid` BIGINT( 20 ) NULL ,
|
||||
ADD `closedon_userid` BIGINT( 20 ) NULL ;
|
||||
ADD `submittedon_userid` BIGINT NULL ,
|
||||
ADD `closedon_userid` BIGINT NULL ;
|
||||
+2
-2
@@ -38,8 +38,8 @@ ALTER TABLE m_staff
|
||||
*/
|
||||
|
||||
ALTER TABLE m_client
|
||||
ADD COLUMN `status_id` INT(5) NOT NULL DEFAULT 300 AFTER `is_deleted` ;
|
||||
ADD COLUMN `status_id` INT NOT NULL DEFAULT 300 AFTER `is_deleted` ;
|
||||
|
||||
|
||||
ALTER TABLE m_group
|
||||
ADD COLUMN `status_id` INT(5) NOT NULL DEFAULT 300 AFTER `is_deleted` ;
|
||||
ADD COLUMN `status_id` INT NOT NULL DEFAULT 300 AFTER `is_deleted` ;
|
||||
|
||||
+8
-8
@@ -18,20 +18,20 @@
|
||||
--
|
||||
|
||||
CREATE TABLE `m_calendar_history` (
|
||||
`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
|
||||
`calendar_id` BIGINT(20) NOT NULL,
|
||||
`id` BIGINT NOT NULL AUTO_INCREMENT,
|
||||
`calendar_id` BIGINT NOT NULL,
|
||||
`title` VARCHAR(50) NOT NULL,
|
||||
`description` VARCHAR(100) NULL DEFAULT NULL,
|
||||
`location` VARCHAR(50) NULL DEFAULT NULL,
|
||||
`start_date` DATE NOT NULL,
|
||||
`end_date` DATE NULL DEFAULT NULL,
|
||||
`duration` SMALLINT(6) NULL DEFAULT NULL,
|
||||
`calendar_type_enum` SMALLINT(5) NOT NULL,
|
||||
`repeating` TINYINT(1) NOT NULL DEFAULT '0',
|
||||
`duration` SMALLINT NULL DEFAULT NULL,
|
||||
`calendar_type_enum` SMALLINT NOT NULL,
|
||||
`repeating` tinyint NOT NULL DEFAULT '0',
|
||||
`recurrence` VARCHAR(100) NULL DEFAULT NULL,
|
||||
`remind_by_enum` SMALLINT(5) NULL DEFAULT NULL,
|
||||
`first_reminder` SMALLINT(11) NULL DEFAULT NULL,
|
||||
`second_reminder` SMALLINT(11) NULL DEFAULT NULL,
|
||||
`remind_by_enum` SMALLINT NULL DEFAULT NULL,
|
||||
`first_reminder` SMALLint NULL DEFAULT NULL,
|
||||
`second_reminder` SMALLint NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
INDEX `FK_m_calendar_m_calendar_history` (`calendar_id`),
|
||||
CONSTRAINT `FK_m_calendar_m_calendar_history` FOREIGN KEY (`calendar_id`) REFERENCES `m_calendar` (`id`)
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@
|
||||
--
|
||||
|
||||
ALTER TABLE `m_holiday`
|
||||
ADD COLUMN `status_enum` INT(5) NOT NULL DEFAULT '100' AFTER `repayments_rescheduled_to`;
|
||||
ADD COLUMN `status_enum` INT NOT NULL DEFAULT '100' AFTER `repayments_rescheduled_to`;
|
||||
|
||||
ALTER TABLE `m_holiday`
|
||||
DROP INDEX `holiday_name`,
|
||||
|
||||
+7
-7
@@ -18,11 +18,11 @@
|
||||
--
|
||||
|
||||
CREATE TABLE `m_product_loan_variations_borrower_cycle` (
|
||||
`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
|
||||
`loan_product_id` BIGINT(20) NOT NULL DEFAULT '0',
|
||||
`borrower_cycle_number` INT(3) NOT NULL DEFAULT '0',
|
||||
`value_condition` INT(1) NOT NULL DEFAULT '0',
|
||||
`param_type` INT(1) NOT NULL DEFAULT '0',
|
||||
`id` BIGINT NOT NULL AUTO_INCREMENT,
|
||||
`loan_product_id` BIGINT NOT NULL DEFAULT '0',
|
||||
`borrower_cycle_number` INT NOT NULL DEFAULT '0',
|
||||
`value_condition` INT NOT NULL DEFAULT '0',
|
||||
`param_type` INT NOT NULL DEFAULT '0',
|
||||
`default_value` DECIMAL(19,6) NOT NULL DEFAULT '0.000000',
|
||||
`max_value` DECIMAL(19,6) NULL DEFAULT NULL,
|
||||
`min_value` DECIMAL(19,6) NULL DEFAULT NULL,
|
||||
@@ -30,9 +30,9 @@ CREATE TABLE `m_product_loan_variations_borrower_cycle` (
|
||||
INDEX `borrower_cycle_loan_product_FK` (`loan_product_id`),
|
||||
CONSTRAINT `borrower_cycle_loan_product_FK` FOREIGN KEY (`loan_product_id`) REFERENCES `m_product_loan` (`id`)
|
||||
)
|
||||
COLLATE='utf8_general_ci'
|
||||
COLLATE='utf8mb4_general_ci'
|
||||
ENGINE=InnoDB;
|
||||
|
||||
|
||||
ALTER TABLE `m_product_loan`
|
||||
ADD COLUMN `use_borrower_cycle` TINYINT(1) NOT NULL DEFAULT '0' AFTER `include_in_borrower_cycle`;
|
||||
ADD COLUMN `use_borrower_cycle` tinyint NOT NULL DEFAULT '0' AFTER `include_in_borrower_cycle`;
|
||||
+2
-2
@@ -18,8 +18,8 @@
|
||||
--
|
||||
|
||||
ALTER TABLE `acc_gl_journal_entry`
|
||||
ADD COLUMN `loan_transaction_id` BIGINT(20) NULL AFTER `transaction_id`,
|
||||
ADD COLUMN `savings_transaction_id` BIGINT(20) NULL AFTER `loan_transaction_id`,
|
||||
ADD COLUMN `loan_transaction_id` BIGINT NULL AFTER `transaction_id`,
|
||||
ADD COLUMN `savings_transaction_id` BIGINT NULL AFTER `loan_transaction_id`,
|
||||
ADD CONSTRAINT `FK_acc_gl_journal_entry_m_loan_transaction` FOREIGN KEY (`loan_transaction_id`) REFERENCES `m_loan_transaction` (`id`),
|
||||
ADD CONSTRAINT `FK_acc_gl_journal_entry_m_savings_account_transaction` FOREIGN KEY (`savings_transaction_id`) REFERENCES `m_savings_account_transaction` (`id`);
|
||||
|
||||
|
||||
+1
-1
@@ -17,4 +17,4 @@
|
||||
-- under the License.
|
||||
--
|
||||
|
||||
UPDATE stretchy_parameter SET `parameter_sql`='select p.id, p.`name`\r\nfrom m_product_loan p\r\nwhere (p.currency_code = \'${currencyId}\' or \'-1\'= \'${currencyId}\')\r\norder by 2' WHERE parameter_name='loanProductIdSelectAll';
|
||||
UPDATE stretchy_parameter SET `parameter_sql`='select p.id, p.`name`\r\nfrom m_product_loan p\r\nwhere (p.currency_code = \'$\{currencyId}\' or \'-1\'= \'$\{currencyId}\')\r\norder by 2' WHERE parameter_name='loanProductIdSelectAll';
|
||||
+1
-1
@@ -17,4 +17,4 @@
|
||||
-- under the License.
|
||||
--
|
||||
|
||||
ALTER TABLE `m_staff` ADD COLUMN `is_active` TINYINT(1) DEFAULT '0' AFTER `organisational_role_parent_staff_id`;
|
||||
ALTER TABLE `m_staff` ADD COLUMN `is_active` tinyint DEFAULT '0' AFTER `organisational_role_parent_staff_id`;
|
||||
+1
-1
@@ -18,5 +18,5 @@
|
||||
--
|
||||
|
||||
ALTER TABLE `m_staff`
|
||||
CHANGE COLUMN `is_active` `is_active` TINYINT(1) NOT NULL DEFAULT '1' AFTER `organisational_role_parent_staff_id`;
|
||||
CHANGE COLUMN `is_active` `is_active` tinyint NOT NULL DEFAULT '1' AFTER `organisational_role_parent_staff_id`;
|
||||
UPDATE `m_staff` SET `is_active`=1;
|
||||
+1
-1
@@ -18,5 +18,5 @@
|
||||
--
|
||||
|
||||
ALTER TABLE `acc_gl_journal_entry`
|
||||
ADD COLUMN `payment_details_id` BIGINT(20) NULL AFTER `organization_running_balance`,
|
||||
ADD COLUMN `payment_details_id` BIGINT NULL AFTER `organization_running_balance`,
|
||||
ADD CONSTRAINT `FK_acc_gl_journal_entry_m_payment_detail` FOREIGN KEY (`payment_details_id`) REFERENCES `m_payment_detail` (`id`);
|
||||
+1
-1
@@ -18,4 +18,4 @@
|
||||
--
|
||||
|
||||
ALTER TABLE `m_loan_charge`
|
||||
ADD COLUMN `is_active` TINYINT(1) NOT NULL DEFAULT '1' AFTER `max_cap`;
|
||||
ADD COLUMN `is_active` tinyint NOT NULL DEFAULT '1' AFTER `max_cap`;
|
||||
+1
-1
@@ -20,4 +20,4 @@
|
||||
RENAME TABLE `x_table_cloumn_code_mappings` TO `x_table_column_code_mappings`;
|
||||
|
||||
ALTER TABLE `acc_gl_journal_entry`
|
||||
CHANGE COLUMN `is_running_balance_caculated` `is_running_balance_calculated` TINYINT(4) NOT NULL DEFAULT '0' AFTER `lastmodified_date`;
|
||||
CHANGE COLUMN `is_running_balance_caculated` `is_running_balance_calculated` TINYINT NOT NULL DEFAULT '0' AFTER `lastmodified_date`;
|
||||
+2
-2
@@ -25,8 +25,8 @@ ADD INDEX ( `last_time_password_updated` ) ;
|
||||
UPDATE `m_appuser` SET `last_time_password_updated` = NOW() WHERE `m_appuser`.`last_time_password_updated` ='1970-01-01';
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `m_appuser_previous_password` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||
`user_id` bigint(20) NOT NULL,
|
||||
`id` BIGINT NOT NULL AUTO_INCREMENT,
|
||||
`user_id` BIGINT NOT NULL,
|
||||
`password` varchar(255) NOT NULL,
|
||||
`removal_date` date NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
|
||||
@@ -18,13 +18,13 @@
|
||||
--
|
||||
|
||||
ALTER TABLE `m_product_loan`
|
||||
ADD COLUMN `multi_disburse_loan` TINYINT(1) NOT NULL DEFAULT '0' AFTER `close_date`,
|
||||
ADD COLUMN `max_tranche_count` INT(2) NULL DEFAULT NULL AFTER `multi_disburse_loan`,
|
||||
ADD COLUMN `multi_disburse_loan` tinyint NOT NULL DEFAULT '0' AFTER `close_date`,
|
||||
ADD COLUMN `max_tranche_count` INT NULL DEFAULT NULL AFTER `multi_disburse_loan`,
|
||||
ADD COLUMN `outstanding_loan_balance` DECIMAL(19,6) NULL DEFAULT NULL AFTER `max_tranche_count`;
|
||||
|
||||
CREATE TABLE `m_loan_disbursement_detail` (
|
||||
`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
|
||||
`loan_id` BIGINT(20) NOT NULL,
|
||||
`id` BIGINT NOT NULL AUTO_INCREMENT,
|
||||
`loan_id` BIGINT NOT NULL,
|
||||
`expected_disburse_date` DATETIME NOT NULL,
|
||||
`disbursedon_date` DATETIME NULL,
|
||||
`principal` DECIMAL(19,6) NOT NULL,
|
||||
@@ -32,7 +32,7 @@ CREATE TABLE `m_loan_disbursement_detail` (
|
||||
PRIMARY KEY (`id`),
|
||||
CONSTRAINT `FK_loan_disbursement_detail_loan_id` FOREIGN KEY (`loan_id`) REFERENCES `m_loan` (`id`)
|
||||
)
|
||||
COLLATE='utf8_general_ci'
|
||||
COLLATE='utf8mb4_general_ci'
|
||||
ENGINE=InnoDB;
|
||||
|
||||
ALTER TABLE `m_loan`
|
||||
@@ -45,13 +45,13 @@ UPDATE m_loan ml SET ml.approved_principal = ml.principal_amount;
|
||||
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('portfolio', 'UPDATE_DISBURSEMENTDETAIL', 'DISBURSEMENTDETAIL', 'UPDATE', 0);
|
||||
|
||||
CREATE TABLE `m_loan_term_variations` (
|
||||
`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
|
||||
`loan_id` BIGINT(20) NOT NULL,
|
||||
`term_type` SMALLINT(2) NOT NULL,
|
||||
`id` BIGINT NOT NULL AUTO_INCREMENT,
|
||||
`loan_id` BIGINT NOT NULL,
|
||||
`term_type` SMALLINT NOT NULL,
|
||||
`applicable_from` DATE NOT NULL,
|
||||
`term_value` DECIMAL(19,6) NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
CONSTRAINT `FK_loan_id_m_loan_id` FOREIGN KEY (`loan_id`) REFERENCES `m_loan` (`id`)
|
||||
)
|
||||
COLLATE='utf8_general_ci'
|
||||
COLLATE='utf8mb4_general_ci'
|
||||
ENGINE=InnoDB;
|
||||
|
||||
+2
-2
@@ -18,6 +18,6 @@
|
||||
--
|
||||
|
||||
ALTER TABLE `m_product_loan`
|
||||
CHANGE COLUMN `multi_disburse_loan` `allow_multiple_disbursals` TINYINT(1) NOT NULL DEFAULT '0' AFTER `close_date`,
|
||||
CHANGE COLUMN `max_tranche_count` `max_disbursals` INT(2) NULL DEFAULT NULL AFTER `allow_multiple_disbursals`,
|
||||
CHANGE COLUMN `multi_disburse_loan` `allow_multiple_disbursals` tinyint NOT NULL DEFAULT '0' AFTER `close_date`,
|
||||
CHANGE COLUMN `max_tranche_count` `max_disbursals` INT NULL DEFAULT NULL AFTER `allow_multiple_disbursals`,
|
||||
CHANGE COLUMN `outstanding_loan_balance` `max_outstanding_loan_balance` DECIMAL(19,6) NULL DEFAULT NULL AFTER `max_disbursals`;
|
||||
+3
-3
@@ -18,16 +18,16 @@
|
||||
--
|
||||
|
||||
ALTER TABLE `m_savings_product`
|
||||
ADD COLUMN `allow_overdraft` TINYINT(1) NOT NULL DEFAULT '0' AFTER `withdrawal_fee_for_transfer`,
|
||||
ADD COLUMN `allow_overdraft` tinyint NOT NULL DEFAULT '0' AFTER `withdrawal_fee_for_transfer`,
|
||||
ADD COLUMN `overdraft_limit` DECIMAL(19,6) NULL DEFAULT NULL AFTER `allow_overdraft`;
|
||||
|
||||
ALTER TABLE `m_savings_account`
|
||||
ADD COLUMN `allow_overdraft` TINYINT(1) NOT NULL DEFAULT '0' AFTER `withdrawal_fee_for_transfer`,
|
||||
ADD COLUMN `allow_overdraft` tinyint NOT NULL DEFAULT '0' AFTER `withdrawal_fee_for_transfer`,
|
||||
ADD COLUMN `overdraft_limit` DECIMAL(19,6) NULL DEFAULT NULL AFTER `allow_overdraft`;
|
||||
|
||||
ALTER TABLE `m_savings_account_transaction`
|
||||
ADD COLUMN `overdraft_amount_derived` DECIMAL(19,6) NULL DEFAULT NULL AFTER `amount`;
|
||||
|
||||
ALTER TABLE `m_client`
|
||||
ADD COLUMN `default_savings_product` BIGINT(20) NULL DEFAULT NULL AFTER `closedon_userid`,
|
||||
ADD COLUMN `default_savings_product` BIGINT NULL DEFAULT NULL AFTER `closedon_userid`,
|
||||
ADD CONSTRAINT `FK_m_client_m_savings_product` FOREIGN KEY (`default_savings_product`) REFERENCES `m_savings_product` (`id`);
|
||||
+2
-2
@@ -18,9 +18,9 @@
|
||||
--
|
||||
|
||||
|
||||
ALTER TABLE m_group CHANGE COLUMN `status_id` `status_enum` INT(5) NOT NULL DEFAULT '300' ;
|
||||
ALTER TABLE m_group CHANGE COLUMN `status_id` `status_enum` INT NOT NULL DEFAULT '300' ;
|
||||
|
||||
ALTER TABLE m_client CHANGE COLUMN `status_id` `status_enum` INT(5) NOT NULL DEFAULT '300' ;
|
||||
ALTER TABLE m_client CHANGE COLUMN `status_id` `status_enum` INT NOT NULL DEFAULT '300' ;
|
||||
|
||||
update r_enum_value
|
||||
set enum_name = 'status_enum'
|
||||
|
||||
+1
-1
@@ -32,7 +32,7 @@ INSERT INTO `stretchy_report_parameter` (`report_id`, `parameter_id`, `report_pa
|
||||
INSERT INTO `stretchy_report_parameter` (`report_id`, `parameter_id`, `report_parameter_name`) VALUES ((select id from stretchy_report where report_name = 'Client Savings Summary'), (select id from stretchy_parameter where parameter_name='savingsProductIdSelectAll'), 'selectProduct');
|
||||
|
||||
ALTER TABLE `r_enum_value`
|
||||
ADD COLUMN `enum_type` TINYINT(1) NOT NULL AFTER `enum_value`;
|
||||
ADD COLUMN `enum_type` tinyint NOT NULL AFTER `enum_value`;
|
||||
|
||||
INSERT INTO `r_enum_value` (`enum_name`, `enum_id`, `enum_message_property`, `enum_value`, `enum_type`) VALUES ('savings_transaction_type_enum', 1, 'deposit', 'deposit', 0);
|
||||
INSERT INTO `r_enum_value` (`enum_name`, `enum_id`, `enum_message_property`, `enum_value`, `enum_type`) VALUES ('savings_transaction_type_enum', 2, 'withdrawal', 'withdrawal', 1);
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@
|
||||
--
|
||||
|
||||
ALTER TABLE `m_client`
|
||||
ADD COLUMN `default_savings_account` BIGINT(20) NULL DEFAULT NULL AFTER `default_savings_product`,
|
||||
ADD COLUMN `default_savings_account` BIGINT NULL DEFAULT NULL AFTER `default_savings_product`,
|
||||
ADD CONSTRAINT `FK_m_client_m_savings_account` FOREIGN KEY (`default_savings_account`) REFERENCES `m_savings_account` (`id`);
|
||||
|
||||
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('portfolio', 'UPDATESAVINGSACCOUNT_CLIENT', 'CLIENT', 'UPDATESAVINGSACCOUNT', 0);
|
||||
|
||||
+2
-2
@@ -18,7 +18,7 @@
|
||||
--
|
||||
|
||||
ALTER TABLE `m_product_loan`
|
||||
ADD COLUMN `grace_on_arrears_ageing` SMALLINT(5) NULL DEFAULT NULL AFTER `max_outstanding_loan_balance`;
|
||||
ADD COLUMN `grace_on_arrears_ageing` SMALLINT NULL DEFAULT NULL AFTER `max_outstanding_loan_balance`;
|
||||
|
||||
ALTER TABLE `m_loan`
|
||||
ADD COLUMN `grace_on_arrears_ageing` SMALLINT(5) NULL DEFAULT NULL AFTER `max_outstanding_loan_balance`;
|
||||
ADD COLUMN `grace_on_arrears_ageing` SMALLINT NULL DEFAULT NULL AFTER `max_outstanding_loan_balance`;
|
||||
+6
-6
@@ -18,18 +18,18 @@
|
||||
--
|
||||
|
||||
ALTER TABLE `m_charge`
|
||||
ADD COLUMN `fee_frequency` SMALLINT(5) NULL DEFAULT NULL AFTER `max_cap`;
|
||||
ADD COLUMN `fee_frequency` SMALLINT NULL DEFAULT NULL AFTER `max_cap`;
|
||||
|
||||
CREATE TABLE `m_loan_overdue_installment_charge` (
|
||||
`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
|
||||
`loan_charge_id` BIGINT(20) NOT NULL,
|
||||
`loan_schedule_id` BIGINT(20) NOT NULL,
|
||||
`frequency_number` INT(10) NOT NULL,
|
||||
`id` BIGINT NOT NULL AUTO_INCREMENT,
|
||||
`loan_charge_id` BIGINT NOT NULL,
|
||||
`loan_schedule_id` BIGINT NOT NULL,
|
||||
`frequency_number` INT NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
CONSTRAINT `FK_m_loan_overdue_installment_charge_m_loan_charge` FOREIGN KEY (`loan_charge_id`) REFERENCES `m_loan_charge` (`id`),
|
||||
CONSTRAINT `FK_m_loan_overdue_installment_charge_m_loan_repayment_schedule` FOREIGN KEY (`loan_schedule_id`) REFERENCES `m_loan_repayment_schedule` (`id`)
|
||||
)
|
||||
COLLATE='utf8_general_ci'
|
||||
COLLATE='utf8mb4_general_ci'
|
||||
ENGINE=InnoDB;
|
||||
|
||||
INSERT INTO `c_configuration` (`name`, `value`, `enabled`) VALUES ('grace-on-penalty-posting', 0, 1);
|
||||
|
||||
+39
-39
@@ -18,25 +18,25 @@
|
||||
--
|
||||
|
||||
CREATE TABLE `m_account_transfer_details` (
|
||||
`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
|
||||
`from_office_id` BIGINT(20) NOT NULL,
|
||||
`to_office_id` BIGINT(20) NOT NULL,
|
||||
`from_client_id` BIGINT(20) NULL DEFAULT NULL,
|
||||
`to_client_id` BIGINT(20) NULL DEFAULT NULL,
|
||||
`from_savings_account_id` BIGINT(20) NULL DEFAULT NULL,
|
||||
`to_savings_account_id` BIGINT(20) NULL DEFAULT NULL,
|
||||
`from_loan_account_id` BIGINT(20) NULL DEFAULT NULL,
|
||||
`to_loan_account_id` BIGINT(20) NULL DEFAULT NULL,
|
||||
`transfer_type` SMALLINT(2) NULL DEFAULT NULL,
|
||||
`from_savings_transaction_id` BIGINT(20) NULL DEFAULT NULL,
|
||||
`from_loan_transaction_id` BIGINT(20) NULL DEFAULT NULL,
|
||||
`to_savings_transaction_id` BIGINT(20) NULL DEFAULT NULL,
|
||||
`to_loan_transaction_id` BIGINT(20) NULL DEFAULT NULL,
|
||||
`is_reversed` TINYINT(1) NOT NULL,
|
||||
`id` BIGINT NOT NULL AUTO_INCREMENT,
|
||||
`from_office_id` BIGINT NOT NULL,
|
||||
`to_office_id` BIGINT NOT NULL,
|
||||
`from_client_id` BIGINT NULL DEFAULT NULL,
|
||||
`to_client_id` BIGINT NULL DEFAULT NULL,
|
||||
`from_savings_account_id` BIGINT NULL DEFAULT NULL,
|
||||
`to_savings_account_id` BIGINT NULL DEFAULT NULL,
|
||||
`from_loan_account_id` BIGINT NULL DEFAULT NULL,
|
||||
`to_loan_account_id` BIGINT NULL DEFAULT NULL,
|
||||
`transfer_type` SMALLINT NULL DEFAULT NULL,
|
||||
`from_savings_transaction_id` BIGINT NULL DEFAULT NULL,
|
||||
`from_loan_transaction_id` BIGINT NULL DEFAULT NULL,
|
||||
`to_savings_transaction_id` BIGINT NULL DEFAULT NULL,
|
||||
`to_loan_transaction_id` BIGINT NULL DEFAULT NULL,
|
||||
`is_reversed` tinyint NOT NULL,
|
||||
`transaction_date` DATE NOT NULL,
|
||||
`currency_code` VARCHAR(3) NOT NULL,
|
||||
`currency_digits` SMALLINT(5) NOT NULL,
|
||||
`currency_multiplesof` SMALLINT(5) NULL DEFAULT NULL,
|
||||
`currency_digits` SMALLINT NOT NULL,
|
||||
`currency_multiplesof` SMALLINT NULL DEFAULT NULL,
|
||||
`amount` DECIMAL(19,6) NOT NULL,
|
||||
`description` VARCHAR(200) NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
@@ -57,46 +57,46 @@ CREATE TABLE `m_account_transfer_details` (
|
||||
CONSTRAINT `FK_m_account_transfer_details_to_office` FOREIGN KEY (`to_office_id`) REFERENCES `m_office` (`id`),
|
||||
CONSTRAINT `FK_m_account_transfer_details_to_savings_account` FOREIGN KEY (`to_savings_account_id`) REFERENCES `m_savings_account` (`id`)
|
||||
)
|
||||
COLLATE='utf8_general_ci'
|
||||
COLLATE='utf8mb4_general_ci'
|
||||
ENGINE=InnoDB;
|
||||
|
||||
CREATE TABLE `m_account_transfer_standing_instructions` (
|
||||
`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
|
||||
`id` BIGINT NOT NULL AUTO_INCREMENT,
|
||||
`name` VARCHAR(250) NOT NULL,
|
||||
`account_transfer_details_id` BIGINT(20) NOT NULL,
|
||||
`priority` TINYINT(2) NOT NULL,
|
||||
`status` TINYINT(2) NOT NULL,
|
||||
`instruction_type` TINYINT(2) NOT NULL,
|
||||
`account_transfer_details_id` BIGINT NOT NULL,
|
||||
`priority` TINYINT NOT NULL,
|
||||
`status` TINYINT NOT NULL,
|
||||
`instruction_type` TINYINT NOT NULL,
|
||||
`amount` DECIMAL(19,6) NULL DEFAULT NULL,
|
||||
`valid_from` DATE NOT NULL,
|
||||
`valid_till` DATE NULL DEFAULT NULL,
|
||||
`recurrence_type` TINYINT(1) NOT NULL,
|
||||
`recurrence_frequency` SMALLINT(5) NULL DEFAULT NULL,
|
||||
`recurrence_interval` SMALLINT(5) NULL DEFAULT NULL,
|
||||
`recurrence_on_day` SMALLINT(2) NULL DEFAULT NULL,
|
||||
`recurrence_on_month` SMALLINT(2) NULL DEFAULT NULL,
|
||||
`recurrence_type` tinyint NOT NULL,
|
||||
`recurrence_frequency` SMALLINT NULL DEFAULT NULL,
|
||||
`recurrence_interval` SMALLINT NULL DEFAULT NULL,
|
||||
`recurrence_on_day` SMALLINT NULL DEFAULT NULL,
|
||||
`recurrence_on_month` SMALLINT NULL DEFAULT NULL,
|
||||
`last_run_date` DATE NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE INDEX `name` (`name`),
|
||||
INDEX `FK_m_standing_instructions_account_transfer_details` (`account_transfer_details_id`),
|
||||
CONSTRAINT `FK_m_standing_instructions_account_transfer_details` FOREIGN KEY (`account_transfer_details_id`) REFERENCES `m_account_transfer_details` (`id`)
|
||||
)
|
||||
COLLATE='utf8_general_ci'
|
||||
COLLATE='utf8mb4_general_ci'
|
||||
ENGINE=InnoDB;
|
||||
|
||||
|
||||
CREATE TABLE `m_account_transfer_transaction` (
|
||||
`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
|
||||
`account_transfer_details_id` BIGINT(20) NOT NULL,
|
||||
`from_savings_transaction_id` BIGINT(20) NULL DEFAULT NULL,
|
||||
`from_loan_transaction_id` BIGINT(20) NULL DEFAULT NULL,
|
||||
`to_savings_transaction_id` BIGINT(20) NULL DEFAULT NULL,
|
||||
`to_loan_transaction_id` BIGINT(20) NULL DEFAULT NULL,
|
||||
`is_reversed` TINYINT(1) NOT NULL,
|
||||
`id` BIGINT NOT NULL AUTO_INCREMENT,
|
||||
`account_transfer_details_id` BIGINT NOT NULL,
|
||||
`from_savings_transaction_id` BIGINT NULL DEFAULT NULL,
|
||||
`from_loan_transaction_id` BIGINT NULL DEFAULT NULL,
|
||||
`to_savings_transaction_id` BIGINT NULL DEFAULT NULL,
|
||||
`to_loan_transaction_id` BIGINT NULL DEFAULT NULL,
|
||||
`is_reversed` tinyint NOT NULL,
|
||||
`transaction_date` DATE NOT NULL,
|
||||
`currency_code` VARCHAR(3) NOT NULL,
|
||||
`currency_digits` SMALLINT(5) NOT NULL,
|
||||
`currency_multiplesof` SMALLINT(5) NULL DEFAULT NULL,
|
||||
`currency_digits` SMALLINT NOT NULL,
|
||||
`currency_multiplesof` SMALLINT NULL DEFAULT NULL,
|
||||
`amount` DECIMAL(19,6) NOT NULL,
|
||||
`description` VARCHAR(200) NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
@@ -111,7 +111,7 @@ CREATE TABLE `m_account_transfer_transaction` (
|
||||
CONSTRAINT `FK_m_account_transfer_transaction_to_m_loan_transaction` FOREIGN KEY (`to_loan_transaction_id`) REFERENCES `m_loan_transaction` (`id`),
|
||||
CONSTRAINT `FK_m_account_transfer_transaction_to_m_savings_transaction` FOREIGN KEY (`to_savings_transaction_id`) REFERENCES `m_savings_account_transaction` (`id`)
|
||||
)
|
||||
COLLATE='utf8_general_ci'
|
||||
COLLATE='utf8mb4_general_ci'
|
||||
ENGINE=InnoDB;
|
||||
|
||||
|
||||
|
||||
+2
-2
@@ -18,9 +18,9 @@
|
||||
--
|
||||
|
||||
ALTER TABLE `m_product_loan`
|
||||
ADD COLUMN `overdue_days_for_npa` SMALLINT(5) NULL DEFAULT NULL AFTER `grace_on_arrears_ageing`;
|
||||
ADD COLUMN `overdue_days_for_npa` SMALLINT NULL DEFAULT NULL AFTER `grace_on_arrears_ageing`;
|
||||
|
||||
ALTER TABLE `m_loan`
|
||||
ADD COLUMN `is_npa` TINYINT(1) NOT NULL DEFAULT '0' AFTER `grace_on_arrears_ageing`;
|
||||
ADD COLUMN `is_npa` tinyint NOT NULL DEFAULT '0' AFTER `grace_on_arrears_ageing`;
|
||||
|
||||
INSERT INTO `job` (`name`, `display_name`, `cron_expression`, `create_time`) VALUES ('Update Non Performing Assets', 'Update Non Performing Assets', '0 0 0 1/1 * ? *', now());
|
||||
+68
-68
@@ -18,22 +18,22 @@
|
||||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `m_interest_rate_chart` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||
`id` BIGINT NOT NULL AUTO_INCREMENT,
|
||||
`name` varchar(100) DEFAULT NULL,
|
||||
`description` varchar(200) DEFAULT NULL,
|
||||
`from_date` date NOT NULL,
|
||||
`end_date` date DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
|
||||
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `m_interest_rate_slab` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||
`interest_rate_chart_id` bigint(20) NOT NULL,
|
||||
`id` BIGINT NOT NULL AUTO_INCREMENT,
|
||||
`interest_rate_chart_id` BIGINT NOT NULL,
|
||||
`description` varchar(200) DEFAULT NULL,
|
||||
`period_type_enum` smallint(5) NOT NULL DEFAULT '1',
|
||||
`from_period` int(11) NOT NULL DEFAULT '0',
|
||||
`to_period` int(11) DEFAULT NULL,
|
||||
`period_type_enum` SMALLINT NOT NULL DEFAULT '1',
|
||||
`from_period` INT NOT NULL DEFAULT '0',
|
||||
`to_period` INT DEFAULT NULL,
|
||||
`amount_range_from` decimal(19,6) DEFAULT NULL,
|
||||
`amount_range_to` decimal(19,6) DEFAULT NULL,
|
||||
`annual_interest_rate` decimal(19,6) NOT NULL,
|
||||
@@ -41,54 +41,54 @@ CREATE TABLE IF NOT EXISTS `m_interest_rate_slab` (
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `FKIRS00000000000001` (`interest_rate_chart_id`),
|
||||
CONSTRAINT `FKIRS00000000000001` FOREIGN KEY (`interest_rate_chart_id`) REFERENCES `m_interest_rate_chart` (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `m_deposit_product_interest_rate_chart` (
|
||||
`deposit_product_id` bigint(20) NOT NULL,
|
||||
`interest_rate_chart_id` bigint(20) NOT NULL,
|
||||
`deposit_product_id` BIGINT NOT NULL,
|
||||
`interest_rate_chart_id` BIGINT NOT NULL,
|
||||
UNIQUE KEY `deposit_product_id_interest_rate_chart_id` (`deposit_product_id`,`interest_rate_chart_id`),
|
||||
KEY `FKDPIRC00000000000002` (`interest_rate_chart_id`),
|
||||
CONSTRAINT `FKDPIRC00000000000001` FOREIGN KEY (`deposit_product_id`) REFERENCES `m_savings_product` (`id`),
|
||||
CONSTRAINT `FKDPIRC00000000000002` FOREIGN KEY (`interest_rate_chart_id`) REFERENCES `m_interest_rate_chart` (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
|
||||
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `m_deposit_product_term_and_preclosure` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||
`savings_product_id` bigint(20) NOT NULL DEFAULT '0',
|
||||
`min_deposit_term` int(11) DEFAULT NULL,
|
||||
`max_deposit_term` int(11) DEFAULT NULL,
|
||||
`min_deposit_term_type_enum` smallint(5) DEFAULT NULL,
|
||||
`max_deposit_term_type_enum` smallint(5) DEFAULT NULL,
|
||||
`in_multiples_of_deposit_term` int(11) DEFAULT NULL,
|
||||
`in_multiples_of_deposit_term_type_enum` smallint(5) DEFAULT NULL,
|
||||
`interest_free_period_applicable` smallint(5) DEFAULT NULL,
|
||||
`interest_free_from_period` int(11) DEFAULT NULL,
|
||||
`interest_free_to_period` int(11) DEFAULT NULL,
|
||||
`interest_free_period_frequency_enum` smallint(5) DEFAULT NULL,
|
||||
`pre_closure_penal_applicable` smallint(5) DEFAULT NULL,
|
||||
`id` BIGINT NOT NULL AUTO_INCREMENT,
|
||||
`savings_product_id` BIGINT NOT NULL DEFAULT '0',
|
||||
`min_deposit_term` INT DEFAULT NULL,
|
||||
`max_deposit_term` INT DEFAULT NULL,
|
||||
`min_deposit_term_type_enum` SMALLINT DEFAULT NULL,
|
||||
`max_deposit_term_type_enum` SMALLINT DEFAULT NULL,
|
||||
`in_multiples_of_deposit_term` INT DEFAULT NULL,
|
||||
`in_multiples_of_deposit_term_type_enum` SMALLINT DEFAULT NULL,
|
||||
`interest_free_period_applicable` SMALLINT DEFAULT NULL,
|
||||
`interest_free_from_period` INT DEFAULT NULL,
|
||||
`interest_free_to_period` INT DEFAULT NULL,
|
||||
`interest_free_period_frequency_enum` SMALLINT DEFAULT NULL,
|
||||
`pre_closure_penal_applicable` SMALLINT DEFAULT NULL,
|
||||
`pre_closure_penal_interest` decimal(19,6) DEFAULT NULL,
|
||||
`pre_closure_penal_interest_on_enum` smallint(5) DEFAULT NULL,
|
||||
`pre_closure_penal_interest_on_enum` SMALLINT DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `FKDPTP00000000000001` (`savings_product_id`),
|
||||
CONSTRAINT `FKDPTP00000000000001` FOREIGN KEY (`savings_product_id`) REFERENCES `m_savings_product` (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
|
||||
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `m_deposit_product_recurring_detail` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||
`savings_product_id` bigint(20) NOT NULL DEFAULT '0',
|
||||
`recurring_deposit_type_enum` smallint(5) DEFAULT NULL,
|
||||
`recurring_deposit_frequency` int(11) DEFAULT NULL,
|
||||
`recurring_deposit_frequency_type_enum` smallint(5) DEFAULT NULL,
|
||||
`id` BIGINT NOT NULL AUTO_INCREMENT,
|
||||
`savings_product_id` BIGINT NOT NULL DEFAULT '0',
|
||||
`recurring_deposit_type_enum` SMALLINT DEFAULT NULL,
|
||||
`recurring_deposit_frequency` INT DEFAULT NULL,
|
||||
`recurring_deposit_frequency_type_enum` SMALLINT DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `FKDPRD00000000000001` (`savings_product_id`),
|
||||
CONSTRAINT `FKDPRD00000000000001` FOREIGN KEY (`savings_product_id`) REFERENCES `m_savings_product` (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `m_savings_account_interest_rate_chart` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||
`savings_account_id` bigint(20) NOT NULL,
|
||||
`id` BIGINT NOT NULL AUTO_INCREMENT,
|
||||
`savings_account_id` BIGINT NOT NULL,
|
||||
`name` varchar(100) DEFAULT NULL,
|
||||
`description` varchar(200) DEFAULT NULL,
|
||||
`from_date` date NOT NULL,
|
||||
@@ -96,15 +96,15 @@ CREATE TABLE IF NOT EXISTS `m_savings_account_interest_rate_chart` (
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `FKSAIRC00000000000001` (`savings_account_id`),
|
||||
CONSTRAINT `FKSAIRC00000000000001` FOREIGN KEY (`savings_account_id`) REFERENCES `m_savings_account` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `m_savings_account_interest_rate_slab` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||
`savings_account_interest_rate_chart_id` bigint(20) NOT NULL,
|
||||
`id` BIGINT NOT NULL AUTO_INCREMENT,
|
||||
`savings_account_interest_rate_chart_id` BIGINT NOT NULL,
|
||||
`description` varchar(200) DEFAULT NULL,
|
||||
`period_type_enum` smallint(5) NOT NULL DEFAULT '1',
|
||||
`from_period` int(11) NOT NULL DEFAULT '0',
|
||||
`to_period` int(11) DEFAULT NULL,
|
||||
`period_type_enum` SMALLINT NOT NULL DEFAULT '1',
|
||||
`from_period` INT NOT NULL DEFAULT '0',
|
||||
`to_period` INT DEFAULT NULL,
|
||||
`amount_range_from` decimal(19,6) DEFAULT NULL,
|
||||
`amount_range_to` decimal(19,6) DEFAULT NULL,
|
||||
`annual_interest_rate` decimal(19,6) NOT NULL,
|
||||
@@ -112,56 +112,56 @@ CREATE TABLE IF NOT EXISTS `m_savings_account_interest_rate_slab` (
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `FKSAIRS00000000000001` (`savings_account_interest_rate_chart_id`),
|
||||
CONSTRAINT `FKSAIRS00000000000001` FOREIGN KEY (`savings_account_interest_rate_chart_id`) REFERENCES `m_savings_account_interest_rate_chart` (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `m_deposit_account_recurring_detail` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||
`savings_account_id` bigint(20) NOT NULL DEFAULT '0',
|
||||
`id` BIGINT NOT NULL AUTO_INCREMENT,
|
||||
`savings_account_id` BIGINT NOT NULL DEFAULT '0',
|
||||
`recurring_deposit_amount` decimal(19,6) DEFAULT NULL,
|
||||
`recurring_deposit_type_enum` smallint(5) DEFAULT NULL,
|
||||
`recurring_deposit_frequency` int(11) DEFAULT NULL,
|
||||
`recurring_deposit_frequency_type_enum` smallint(5) DEFAULT NULL,
|
||||
`recurring_deposit_type_enum` SMALLINT DEFAULT NULL,
|
||||
`recurring_deposit_frequency` INT DEFAULT NULL,
|
||||
`recurring_deposit_frequency_type_enum` SMALLINT DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `FKDARD00000000000001` (`savings_account_id`),
|
||||
CONSTRAINT `FKDARD00000000000001` FOREIGN KEY (`savings_account_id`) REFERENCES `m_savings_account` (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `m_deposit_account_term_and_preclosure` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||
`savings_account_id` bigint(20) NOT NULL DEFAULT '0',
|
||||
`min_deposit_term` int(11) DEFAULT NULL,
|
||||
`max_deposit_term` int(11) DEFAULT NULL,
|
||||
`min_deposit_term_type_enum` smallint(5) DEFAULT NULL,
|
||||
`max_deposit_term_type_enum` smallint(5) DEFAULT NULL,
|
||||
`in_multiples_of_deposit_term` int(11) DEFAULT NULL,
|
||||
`in_multiples_of_deposit_term_type_enum` smallint(5) DEFAULT NULL,
|
||||
`interest_free_period_applicable` smallint(5) DEFAULT NULL,
|
||||
`interest_free_from_period` int(11) DEFAULT NULL,
|
||||
`interest_free_to_period` int(11) DEFAULT NULL,
|
||||
`interest_free_period_frequency_enum` smallint(5) DEFAULT NULL,
|
||||
`pre_closure_penal_applicable` smallint(5) DEFAULT NULL,
|
||||
`id` BIGINT NOT NULL AUTO_INCREMENT,
|
||||
`savings_account_id` BIGINT NOT NULL DEFAULT '0',
|
||||
`min_deposit_term` INT DEFAULT NULL,
|
||||
`max_deposit_term` INT DEFAULT NULL,
|
||||
`min_deposit_term_type_enum` SMALLINT DEFAULT NULL,
|
||||
`max_deposit_term_type_enum` SMALLINT DEFAULT NULL,
|
||||
`in_multiples_of_deposit_term` INT DEFAULT NULL,
|
||||
`in_multiples_of_deposit_term_type_enum` SMALLINT DEFAULT NULL,
|
||||
`interest_free_period_applicable` SMALLINT DEFAULT NULL,
|
||||
`interest_free_from_period` INT DEFAULT NULL,
|
||||
`interest_free_to_period` INT DEFAULT NULL,
|
||||
`interest_free_period_frequency_enum` SMALLINT DEFAULT NULL,
|
||||
`pre_closure_penal_applicable` SMALLINT DEFAULT NULL,
|
||||
`pre_closure_penal_interest` decimal(19,6) DEFAULT NULL,
|
||||
`pre_closure_penal_interest_on_enum` smallint(5) DEFAULT NULL,
|
||||
`deposit_period` int(11) DEFAULT NULL,
|
||||
`deposit_period_frequency_enum` smallint(5) DEFAULT NULL,
|
||||
`pre_closure_penal_interest_on_enum` SMALLINT DEFAULT NULL,
|
||||
`deposit_period` INT DEFAULT NULL,
|
||||
`deposit_period_frequency_enum` SMALLINT DEFAULT NULL,
|
||||
`deposit_amount` decimal(19,6) DEFAULT NULL,
|
||||
`maturity_amount` decimal(19,6) DEFAULT NULL,
|
||||
`maturity_date` date DEFAULT NULL,
|
||||
`on_account_closure_enum` smallint(5) DEFAULT NULL,
|
||||
`on_account_closure_enum` SMALLINT DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `FKDATP00000000000001` (`savings_account_id`),
|
||||
CONSTRAINT `FKDATP00000000000001` FOREIGN KEY (`savings_account_id`) REFERENCES `m_savings_account` (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
|
||||
|
||||
|
||||
ALTER TABLE `m_savings_product`
|
||||
ADD COLUMN `deposit_type_enum` SMALLINT(5) NOT NULL DEFAULT '100' AFTER `description`;
|
||||
ADD COLUMN `deposit_type_enum` SMALLINT NOT NULL DEFAULT '100' AFTER `description`;
|
||||
|
||||
ALTER TABLE `m_savings_account`
|
||||
ADD COLUMN `deposit_type_enum` SMALLINT(5) NOT NULL DEFAULT '100' AFTER `account_type_enum`;
|
||||
ADD COLUMN `deposit_type_enum` SMALLINT NOT NULL DEFAULT '100' AFTER `account_type_enum`;
|
||||
|
||||
ALTER TABLE `m_client`
|
||||
ADD COLUMN `gender_cv_id` INT(11) NULL DEFAULT NULL AFTER `mobile_no`,
|
||||
ADD COLUMN `gender_cv_id` INT NULL DEFAULT NULL AFTER `mobile_no`,
|
||||
ADD COLUMN `date_of_birth` DATE NULL DEFAULT NULL AFTER `gender_cv_id`;
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ ALTER TABLE `job_run_history`
|
||||
CHANGE COLUMN `error_message` `error_message` TEXT NULL DEFAULT NULL AFTER `status`;
|
||||
|
||||
ALTER TABLE `m_deposit_account_term_and_preclosure`
|
||||
ADD COLUMN `transfer_interest_to_linked_account` TINYINT(1) NOT NULL DEFAULT '0' AFTER `expected_firstdepositon_date`;
|
||||
ADD COLUMN `transfer_interest_to_linked_account` tinyint NOT NULL DEFAULT '0' AFTER `expected_firstdepositon_date`;
|
||||
|
||||
UPDATE `job` SET `scheduler_group`=1 WHERE `name`='Post Interest For Savings';
|
||||
|
||||
|
||||
+9
-9
@@ -38,7 +38,7 @@ ALTER TABLE `m_deposit_account_recurring_detail`
|
||||
ADD COLUMN `adjust_advance_towards_future_payments` TINYINT NOT NULL DEFAULT '1',
|
||||
ADD COLUMN `is_calendar_inherited` TINYINT NOT NULL DEFAULT '0',
|
||||
ADD COLUMN `total_overdue_amount` DECIMAL(19,6) NULL DEFAULT NULL,
|
||||
ADD COLUMN `no_of_overdue_installments` INT(11) NULL DEFAULT NULL,
|
||||
ADD COLUMN `no_of_overdue_installments` INT NULL DEFAULT NULL,
|
||||
DROP COLUMN `recurring_deposit_type_enum`,
|
||||
DROP COLUMN `recurring_deposit_frequency`,
|
||||
DROP COLUMN `recurring_deposit_frequency_type_enum`;
|
||||
@@ -51,9 +51,9 @@ ALTER TABLE `m_deposit_product_term_and_preclosure`
|
||||
DROP COLUMN `interest_free_period_frequency_enum`;
|
||||
|
||||
ALTER TABLE `m_deposit_product_recurring_detail`
|
||||
ADD COLUMN `is_mandatory` TINYINT(1) NOT NULL DEFAULT '1',
|
||||
ADD COLUMN `allow_withdrawal` TINYINT(1) NOT NULL DEFAULT '0',
|
||||
ADD COLUMN `adjust_advance_towards_future_payments` TINYINT(1) NOT NULL DEFAULT '1',
|
||||
ADD COLUMN `is_mandatory` tinyint NOT NULL DEFAULT '1',
|
||||
ADD COLUMN `allow_withdrawal` tinyint NOT NULL DEFAULT '0',
|
||||
ADD COLUMN `adjust_advance_towards_future_payments` tinyint NOT NULL DEFAULT '1',
|
||||
DROP COLUMN `recurring_deposit_type_enum`,
|
||||
DROP COLUMN `recurring_deposit_frequency`,
|
||||
DROP COLUMN `recurring_deposit_frequency_type_enum`;
|
||||
@@ -65,21 +65,21 @@ ALTER TABLE `m_deposit_account_term_and_preclosure`
|
||||
DROP COLUMN `interest_free_period_frequency_enum`;
|
||||
|
||||
CREATE TABLE `m_mandatory_savings_schedule` (
|
||||
`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
|
||||
`savings_account_id` BIGINT(20) NOT NULL,
|
||||
`id` BIGINT NOT NULL AUTO_INCREMENT,
|
||||
`savings_account_id` BIGINT NOT NULL,
|
||||
`fromdate` DATE NULL DEFAULT NULL,
|
||||
`duedate` DATE NOT NULL,
|
||||
`installment` SMALLINT(5) NOT NULL,
|
||||
`installment` SMALLINT NOT NULL,
|
||||
`deposit_amount` DECIMAL(19,6) NULL DEFAULT NULL,
|
||||
`deposit_amount_completed_derived` DECIMAL(19,6) NULL DEFAULT NULL,
|
||||
`total_paid_in_advance_derived` DECIMAL(19,6) NULL DEFAULT NULL,
|
||||
`total_paid_late_derived` DECIMAL(19,6) NULL DEFAULT NULL,
|
||||
`completed_derived` BIT(1) NOT NULL,
|
||||
`obligations_met_on_date` DATE NULL DEFAULT NULL,
|
||||
`createdby_id` BIGINT(20) NULL DEFAULT NULL,
|
||||
`createdby_id` BIGINT NULL DEFAULT NULL,
|
||||
`created_date` DATETIME NULL DEFAULT NULL,
|
||||
`lastmodified_date` DATETIME NULL DEFAULT NULL,
|
||||
`lastmodifiedby_id` BIGINT(20) NULL DEFAULT NULL,
|
||||
`lastmodifiedby_id` BIGINT NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
INDEX `FKMSS0000000001` (`savings_account_id`),
|
||||
CONSTRAINT `FKMSS0000000001` FOREIGN KEY (`savings_account_id`) REFERENCES `m_savings_account` (`id`)
|
||||
|
||||
+5
-5
@@ -26,15 +26,15 @@ INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `c
|
||||
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('accounting', 'UPDATE_OFFICEGLACCOUNT', 'OFFICEGLACCOUNT', 'UPDATE', 0);
|
||||
|
||||
CREATE TABLE `acc_gl_office_mapping` (
|
||||
`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
|
||||
`gl_account_id` BIGINT(20) NOT NULL DEFAULT '0',
|
||||
`office_id` BIGINT(20) NOT NULL,
|
||||
`financial_account_type` SMALLINT(5) NOT NULL,
|
||||
`id` BIGINT NOT NULL AUTO_INCREMENT,
|
||||
`gl_account_id` BIGINT NOT NULL DEFAULT '0',
|
||||
`office_id` BIGINT NOT NULL,
|
||||
`financial_account_type` SMALLINT NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
INDEX `FK_office_mapping_acc_gl_account` (`gl_account_id`),
|
||||
INDEX `FK_office_mapping_office` (`office_id`),
|
||||
CONSTRAINT `FK_office_mapping_acc_gl_account` FOREIGN KEY (`gl_account_id`) REFERENCES `acc_gl_account` (`id`),
|
||||
CONSTRAINT `FK_office_mapping_office` FOREIGN KEY (`office_id`) REFERENCES `m_office` (`id`)
|
||||
)
|
||||
COLLATE='utf8_general_ci'
|
||||
COLLATE='utf8mb4_general_ci'
|
||||
ENGINE=InnoDB;
|
||||
|
||||
@@ -18,15 +18,15 @@
|
||||
--
|
||||
|
||||
ALTER TABLE `m_code_value`
|
||||
ADD COLUMN `code_score` INT(11) NULL AFTER `order_position`;
|
||||
ADD COLUMN `code_score` INT NULL AFTER `order_position`;
|
||||
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `ppi_scores` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||
`score_from` int(11) NOT NULL,
|
||||
`score_to` int(11) NOT NULL,
|
||||
`id` BIGINT NOT NULL AUTO_INCREMENT,
|
||||
`score_from` INT NOT NULL,
|
||||
`score_to` INT NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) COLLATE='utf8_general_ci'
|
||||
) COLLATE='utf8mb4_general_ci'
|
||||
ENGINE=InnoDB;
|
||||
|
||||
|
||||
@@ -95,22 +95,22 @@ VALUES
|
||||
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `ppi_likelihoods` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||
`id` BIGINT NOT NULL AUTO_INCREMENT,
|
||||
`code` varchar(100) NOT NULL,
|
||||
`name` varchar(250) NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) COLLATE='utf8_general_ci'
|
||||
) COLLATE='utf8mb4_general_ci'
|
||||
ENGINE=InnoDB ;
|
||||
|
||||
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `ppi_likelihoods_ppi` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||
`likelihood_id` bigint(20) NOT NULL,
|
||||
`id` BIGINT NOT NULL AUTO_INCREMENT,
|
||||
`likelihood_id` BIGINT NOT NULL,
|
||||
`ppi_name` varchar(250) NOT NULL,
|
||||
`enabled` int(11) NOT NULL DEFAULT '100',
|
||||
`enabled` INT NOT NULL DEFAULT '100',
|
||||
PRIMARY KEY (`id`)
|
||||
) COLLATE='utf8_general_ci'
|
||||
) COLLATE='utf8mb4_general_ci'
|
||||
ENGINE=InnoDB;
|
||||
|
||||
/**PPI permission**/
|
||||
|
||||
+14
-14
@@ -18,8 +18,8 @@
|
||||
--
|
||||
|
||||
ALTER TABLE `m_client`
|
||||
ADD COLUMN `client_type_cv_id` INT(11) NULL DEFAULT NULL AFTER `default_savings_account`,
|
||||
ADD COLUMN `client_classification_cv_id` INT(11) NULL DEFAULT NULL AFTER `client_type_cv_id`,
|
||||
ADD COLUMN `client_type_cv_id` INT NULL DEFAULT NULL AFTER `default_savings_account`,
|
||||
ADD COLUMN `client_classification_cv_id` INT NULL DEFAULT NULL AFTER `client_type_cv_id`,
|
||||
ADD CONSTRAINT `FK_m_client_type_m_code_value` FOREIGN KEY (`client_type_cv_id`) REFERENCES `m_code_value` (`id`),
|
||||
ADD CONSTRAINT `FK_m_client_classification_m_code_value` FOREIGN KEY (`client_classification_cv_id`) REFERENCES `m_code_value` (`id`),
|
||||
ADD CONSTRAINT `FK1_m_client_gender_m_code_value` FOREIGN KEY (`gender_cv_id`) REFERENCES `m_code_value` (`id`);
|
||||
@@ -29,13 +29,13 @@ INSERT INTO `m_code` (`code_name`, `is_system_defined`) VALUES ('ClientClassific
|
||||
|
||||
|
||||
CREATE TABLE `m_interest_incentives` (
|
||||
`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
|
||||
`interest_rate_slab_id` BIGINT(20) NOT NULL,
|
||||
`entiry_type` SMALLINT(2) NOT NULL,
|
||||
`attribute_name` SMALLINT(2) NOT NULL,
|
||||
`condition_type` SMALLINT(2) NOT NULL,
|
||||
`id` BIGINT NOT NULL AUTO_INCREMENT,
|
||||
`interest_rate_slab_id` BIGINT NOT NULL,
|
||||
`entiry_type` SMALLINT NOT NULL,
|
||||
`attribute_name` SMALLINT NOT NULL,
|
||||
`condition_type` SMALLINT NOT NULL,
|
||||
`attribute_value` VARCHAR(50) NOT NULL,
|
||||
`incentive_type` SMALLINT(2) NOT NULL,
|
||||
`incentive_type` SMALLINT NOT NULL,
|
||||
`amount` DECIMAL(19,6) NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
INDEX `FK_m_interest_incentives_m_interest_rate_slab` (`interest_rate_slab_id`),
|
||||
@@ -44,13 +44,13 @@ CREATE TABLE `m_interest_incentives` (
|
||||
|
||||
|
||||
CREATE TABLE `m_savings_interest_incentives` (
|
||||
`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
|
||||
`deposit_account_interest_rate_slab_id` BIGINT(20) NOT NULL,
|
||||
`entiry_type` SMALLINT(2) NOT NULL,
|
||||
`attribute_name` SMALLINT(2) NOT NULL,
|
||||
`condition_type` SMALLINT(2) NOT NULL,
|
||||
`id` BIGINT NOT NULL AUTO_INCREMENT,
|
||||
`deposit_account_interest_rate_slab_id` BIGINT NOT NULL,
|
||||
`entiry_type` SMALLINT NOT NULL,
|
||||
`attribute_name` SMALLINT NOT NULL,
|
||||
`condition_type` SMALLINT NOT NULL,
|
||||
`attribute_value` VARCHAR(50) NOT NULL,
|
||||
`incentive_type` SMALLINT(2) NOT NULL,
|
||||
`incentive_type` SMALLINT NOT NULL,
|
||||
`amount` DECIMAL(19,6) NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
INDEX `FK_m_savings_interest_incentives_m_savings_interest_rate_slab` (`deposit_account_interest_rate_slab_id`),
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ ALTER TABLE `acc_gl_office_mapping`
|
||||
ALTER `financial_account_type` DROP DEFAULT;
|
||||
|
||||
ALTER TABLE `acc_gl_office_mapping`
|
||||
CHANGE COLUMN `financial_account_type` `financial_activity_type` SMALLINT(5) NOT NULL;
|
||||
CHANGE COLUMN `financial_account_type` `financial_activity_type` SMALLINT NOT NULL;
|
||||
|
||||
ALTER TABLE `acc_gl_office_mapping`
|
||||
ADD UNIQUE INDEX `financial_activity_type` (`financial_activity_type`);
|
||||
|
||||
+11
-11
@@ -22,18 +22,18 @@ Reason for all the tmp tables and renames is had mysql problems with foreign key
|
||||
*/
|
||||
|
||||
CREATE TABLE `stretchy_report_tmp` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`id` INT NOT NULL AUTO_INCREMENT,
|
||||
`report_name` varchar(100) NOT NULL,
|
||||
`report_type` varchar(20) NOT NULL,
|
||||
`report_subtype` varchar(20) DEFAULT NULL,
|
||||
`report_category` varchar(45) DEFAULT NULL,
|
||||
`report_sql` text,
|
||||
`description` text,
|
||||
`core_report` tinyint(1) DEFAULT '0',
|
||||
`use_report` tinyint(1) DEFAULT '0',
|
||||
`core_report` tinyint DEFAULT '0',
|
||||
`use_report` tinyint DEFAULT '0',
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `report_name_UNIQUE` (`report_name`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
|
||||
|
||||
insert into stretchy_report_tmp
|
||||
(id, report_name, report_type, report_subtype, report_category,
|
||||
@@ -43,7 +43,7 @@ report_sql, description, core_report, use_report
|
||||
from stretchy_report;
|
||||
|
||||
CREATE TABLE `stretchy_parameter_tmp` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`id` INT NOT NULL AUTO_INCREMENT,
|
||||
`parameter_name` varchar(45) NOT NULL,
|
||||
`parameter_variable` varchar(45) DEFAULT NULL,
|
||||
`parameter_label` varchar(45) NOT NULL,
|
||||
@@ -54,10 +54,10 @@ CREATE TABLE `stretchy_parameter_tmp` (
|
||||
`selectOne` varchar(1) DEFAULT NULL,
|
||||
`selectAll` varchar(1) DEFAULT NULL,
|
||||
`parameter_sql` text,
|
||||
`parent_id` int(11) DEFAULT NULL,
|
||||
`parent_id` INT DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `name_UNIQUE` (`parameter_name`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
|
||||
|
||||
insert into stretchy_parameter_tmp
|
||||
(id, parameter_name, parameter_variable, parameter_label, parameter_displayType, parameter_FormatType,
|
||||
@@ -67,13 +67,13 @@ parameter_default, special, selectOne, selectAll, parameter_sql, parent_paramete
|
||||
from stretchy_parameter;
|
||||
|
||||
CREATE TABLE `stretchy_report_parameter_tmp` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`report_id` int(11) NOT NULL,
|
||||
`parameter_id` int(11) NOT NULL,
|
||||
`id` INT NOT NULL AUTO_INCREMENT,
|
||||
`report_id` INT NOT NULL,
|
||||
`parameter_id` INT NOT NULL,
|
||||
`report_parameter_name` varchar(45) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `report_id_name_UNIQUE` (`report_id`,`report_parameter_name`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
|
||||
|
||||
insert into stretchy_report_parameter_tmp(report_id, parameter_id, report_parameter_name)
|
||||
select report_id, parameter_id, report_parameter_name
|
||||
|
||||
+2
-2
@@ -18,8 +18,8 @@
|
||||
--
|
||||
|
||||
CREATE TABLE `m_account_transfer_standing_instructions_history` (
|
||||
`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
|
||||
`standing_instruction_id` BIGINT(20) NOT NULL,
|
||||
`id` BIGINT NOT NULL AUTO_INCREMENT,
|
||||
`standing_instruction_id` BIGINT NOT NULL,
|
||||
`status` VARCHAR(20) NOT NULL,
|
||||
`execution_time` DATETIME NOT NULL,
|
||||
`amount` DECIMAL(19,6) NOT NULL,
|
||||
|
||||
+2
-2
@@ -19,8 +19,8 @@
|
||||
|
||||
ALTER TABLE `m_savings_product`
|
||||
ADD COLUMN `min_required_balance` DECIMAL(19,6) NULL AFTER `overdraft_limit`,
|
||||
ADD COLUMN `allow_overdraft_min_balance` TINYINT(1) NOT NULL DEFAULT '0' AFTER `min_required_balance`;
|
||||
ADD COLUMN `allow_overdraft_min_balance` tinyint NOT NULL DEFAULT '0' AFTER `min_required_balance`;
|
||||
|
||||
ALTER TABLE `m_savings_account`
|
||||
ADD COLUMN `min_required_balance` DECIMAL(19,6) NULL AFTER `account_balance_derived`,
|
||||
ADD COLUMN `allow_overdraft_min_balance` TINYINT(1) NOT NULL DEFAULT '0' AFTER `min_required_balance`;
|
||||
ADD COLUMN `allow_overdraft_min_balance` tinyint NOT NULL DEFAULT '0' AFTER `min_required_balance`;
|
||||
|
||||
+2
-2
@@ -18,7 +18,7 @@
|
||||
--
|
||||
|
||||
ALTER TABLE `m_savings_product`
|
||||
CHANGE COLUMN `allow_overdraft_min_balance` `enforce_min_required_balance` TINYINT(1) NOT NULL DEFAULT '0' AFTER `min_required_balance`;
|
||||
CHANGE COLUMN `allow_overdraft_min_balance` `enforce_min_required_balance` tinyint NOT NULL DEFAULT '0' AFTER `min_required_balance`;
|
||||
|
||||
ALTER TABLE `m_savings_account`
|
||||
CHANGE COLUMN `allow_overdraft_min_balance` `enforce_min_required_balance` TINYINT(1) NOT NULL DEFAULT '0' AFTER `min_required_balance`;
|
||||
CHANGE COLUMN `allow_overdraft_min_balance` `enforce_min_required_balance` tinyint NOT NULL DEFAULT '0' AFTER `min_required_balance`;
|
||||
|
||||
+12
-12
@@ -18,20 +18,20 @@
|
||||
--
|
||||
|
||||
ALTER TABLE `m_product_loan`
|
||||
ADD COLUMN `days_in_month_enum` SMALLINT(5) NOT NULL DEFAULT '1' AFTER `overdue_days_for_npa`,
|
||||
ADD COLUMN `days_in_year_enum` SMALLINT(5) NOT NULL DEFAULT '1' AFTER `days_in_month_enum`,
|
||||
ADD COLUMN `days_in_month_enum` SMALLINT NOT NULL DEFAULT '1' AFTER `overdue_days_for_npa`,
|
||||
ADD COLUMN `days_in_year_enum` SMALLINT NOT NULL DEFAULT '1' AFTER `days_in_month_enum`,
|
||||
ADD COLUMN `interest_recalculation_enabled` TINYINT NOT NULL DEFAULT '0' AFTER `days_in_year_enum`;
|
||||
|
||||
ALTER TABLE `m_loan`
|
||||
ADD COLUMN `days_in_month_enum` SMALLINT(5) NOT NULL DEFAULT '1' AFTER `accrued_till`,
|
||||
ADD COLUMN `days_in_year_enum` SMALLINT(5) NOT NULL DEFAULT '1' AFTER `days_in_month_enum`,
|
||||
ADD COLUMN `days_in_month_enum` SMALLINT NOT NULL DEFAULT '1' AFTER `accrued_till`,
|
||||
ADD COLUMN `days_in_year_enum` SMALLINT NOT NULL DEFAULT '1' AFTER `days_in_month_enum`,
|
||||
ADD COLUMN `interest_recalculation_enabled` TINYINT NOT NULL DEFAULT '0' AFTER `days_in_year_enum`;
|
||||
|
||||
CREATE TABLE `m_product_loan_recalculation_details` (
|
||||
`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
|
||||
`product_id` BIGINT(20) NOT NULL,
|
||||
`compound_type_enum` SMALLINT(5) NOT NULL,
|
||||
`reschedule_strategy_enum` SMALLINT(5) NOT NULL,
|
||||
`id` BIGINT NOT NULL AUTO_INCREMENT,
|
||||
`product_id` BIGINT NOT NULL,
|
||||
`compound_type_enum` SMALLINT NOT NULL,
|
||||
`reschedule_strategy_enum` SMALLINT NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
CONSTRAINT `FK_m_product_loan_m_product_loan_recalculation_details` FOREIGN KEY (`product_id`) REFERENCES `m_product_loan` (`id`)
|
||||
)
|
||||
@@ -39,10 +39,10 @@ COLLATE='latin1_swedish_ci'
|
||||
ENGINE=InnoDB;
|
||||
|
||||
CREATE TABLE `m_loan_recalculation_details` (
|
||||
`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
|
||||
`loan_id` BIGINT(20) NOT NULL,
|
||||
`compound_type_enum` SMALLINT(5) NOT NULL,
|
||||
`reschedule_strategy_enum` SMALLINT(5) NOT NULL,
|
||||
`id` BIGINT NOT NULL AUTO_INCREMENT,
|
||||
`loan_id` BIGINT NOT NULL,
|
||||
`compound_type_enum` SMALLINT NOT NULL,
|
||||
`reschedule_strategy_enum` SMALLINT NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
CONSTRAINT `FK_m_loan_m_loan_recalculation_details` FOREIGN KEY (`loan_id`) REFERENCES `m_loan` (`id`)
|
||||
)
|
||||
|
||||
+1
-1
@@ -18,4 +18,4 @@
|
||||
--
|
||||
|
||||
ALTER TABLE `m_loan_repayment_schedule`
|
||||
ADD COLUMN `recalculated_interest_component` TINYINT(1) NOT NULL DEFAULT '0';
|
||||
ADD COLUMN `recalculated_interest_component` tinyint NOT NULL DEFAULT '0';
|
||||
+4
-4
@@ -18,11 +18,11 @@
|
||||
--
|
||||
|
||||
ALTER TABLE `m_product_loan_recalculation_details`
|
||||
ADD COLUMN `rest_frequency_type_enum` SMALLINT(1) NOT NULL AFTER `reschedule_strategy_enum`,
|
||||
ADD COLUMN `rest_frequency_interval` SMALLINT(3) NOT NULL DEFAULT '0' AFTER `rest_frequency_type_enum`,
|
||||
ADD COLUMN `rest_frequency_type_enum` SMALLINT NOT NULL AFTER `reschedule_strategy_enum`,
|
||||
ADD COLUMN `rest_frequency_interval` SMALLINT NOT NULL DEFAULT '0' AFTER `rest_frequency_type_enum`,
|
||||
ADD COLUMN `rest_freqency_date` DATE NULL DEFAULT NULL AFTER `rest_frequency_interval`;
|
||||
|
||||
ALTER TABLE `m_loan_recalculation_details`
|
||||
ADD COLUMN `rest_frequency_type_enum` SMALLINT(1) NOT NULL AFTER `reschedule_strategy_enum`,
|
||||
ADD COLUMN `rest_frequency_interval` SMALLINT(3) NOT NULL DEFAULT '0' AFTER `rest_frequency_type_enum`,
|
||||
ADD COLUMN `rest_frequency_type_enum` SMALLINT NOT NULL AFTER `reschedule_strategy_enum`,
|
||||
ADD COLUMN `rest_frequency_interval` SMALLINT NOT NULL DEFAULT '0' AFTER `rest_frequency_type_enum`,
|
||||
ADD COLUMN `rest_freqency_date` DATE NULL DEFAULT NULL AFTER `rest_frequency_interval`;
|
||||
+2
-2
@@ -18,8 +18,8 @@
|
||||
--
|
||||
|
||||
CREATE TABLE `m_loan_transaction_temp` (
|
||||
`id` BIGINT(20) NOT NULL,
|
||||
`loan_id` BIGINT(20) NOT NULL,
|
||||
`id` BIGINT NOT NULL,
|
||||
`loan_id` BIGINT NOT NULL,
|
||||
`amount` DECIMAL(19,6) NOT NULL DEFAULT '0',
|
||||
`transaction_date` DATE NOT NULL
|
||||
);
|
||||
|
||||
+19
-19
@@ -18,25 +18,25 @@
|
||||
--
|
||||
|
||||
create table m_loan_reschedule_request (
|
||||
id bigint(20) primary key auto_increment,
|
||||
loan_id bigint(20) not null,
|
||||
status_enum smallint(5) not null,
|
||||
reschedule_from_installment smallint(5) not null comment 'Rescheduling will start from this installment',
|
||||
grace_on_principal smallint(5) null comment 'Number of installments that should be added with 0 principal amount',
|
||||
grace_on_interest smallint(5) null comment 'Number of installments that should be added with 0 interest rate',
|
||||
id BIGINT primary key auto_increment,
|
||||
loan_id BIGINT not null,
|
||||
status_enum SMALLINT not null,
|
||||
reschedule_from_installment SMALLINT not null comment 'Rescheduling will start from this installment',
|
||||
grace_on_principal SMALLINT null comment 'Number of installments that should be added with 0 principal amount',
|
||||
grace_on_interest SMALLINT null comment 'Number of installments that should be added with 0 interest rate',
|
||||
reschedule_from_date date not null comment 'Rescheduling will start from the installment with due date similar to this date.',
|
||||
extra_terms smallint(5) comment 'Number of extra terms to be added to the schedule',
|
||||
extra_terms SMALLINT comment 'Number of extra terms to be added to the schedule',
|
||||
interest_rate decimal(19,6) null comment 'If provided, the interest rate for the unpaid installments will be recalculated',
|
||||
recalculate_interest tinyint(1) null comment 'If set to 1, interest will be recalculated starting from the reschedule period.',
|
||||
recalculate_interest tinyint null comment 'If set to 1, interest will be recalculated starting from the reschedule period.',
|
||||
adjusted_due_date date null comment 'New due date for the first rescheduled installment',
|
||||
reschedule_reason_cv_id int(11) null comment 'ID of code value of reason for rescheduling',
|
||||
reschedule_reason_cv_id INT null comment 'ID of code value of reason for rescheduling',
|
||||
reschedule_reason_comment varchar(500) null comment 'Text provided in addition to the reason code value',
|
||||
submitted_on_date date not null,
|
||||
submitted_by_user_id bigint(20) not null,
|
||||
submitted_by_user_id BIGINT not null,
|
||||
approved_on_date date null,
|
||||
approved_by_user_id bigint(20) null,
|
||||
approved_by_user_id BIGINT null,
|
||||
rejected_on_date date null,
|
||||
rejected_by_user_id bigint(20) null,
|
||||
rejected_by_user_id BIGINT null,
|
||||
foreign key (loan_id) references m_loan(id),
|
||||
foreign key (reschedule_reason_cv_id) references m_code_value(id),
|
||||
foreign key (submitted_by_user_id) references m_appuser(id),
|
||||
@@ -45,12 +45,12 @@ foreign key (rejected_by_user_id) references m_appuser(id)
|
||||
);
|
||||
|
||||
create table m_loan_repayment_schedule_history (
|
||||
id bigint(20) primary key auto_increment,
|
||||
loan_id bigint(20) not null,
|
||||
loan_reschedule_request_id bigint(20) null,
|
||||
id BIGINT primary key auto_increment,
|
||||
loan_id BIGINT not null,
|
||||
loan_reschedule_request_id BIGINT null,
|
||||
fromdate date null,
|
||||
duedate date not null,
|
||||
installment smallint(5) not null,
|
||||
installment SMALLINT not null,
|
||||
principal_amount decimal(19,6) null,
|
||||
principal_completed_derived decimal(19,6) null,
|
||||
principal_writtenoff_derived decimal(19,6) null,
|
||||
@@ -73,15 +73,15 @@ create table m_loan_repayment_schedule_history (
|
||||
total_paid_late_derived decimal(19,6) null,
|
||||
completed_derived bit(1) not null,
|
||||
obligations_met_on_date date null,
|
||||
createdby_id bigint(20) null,
|
||||
createdby_id BIGINT null,
|
||||
created_date datetime null,
|
||||
lastmodified_date datetime null,
|
||||
lastmodifiedby_id bigint(20) null,
|
||||
lastmodifiedby_id BIGINT null,
|
||||
foreign key (loan_id) references m_loan(id),
|
||||
foreign key (loan_reschedule_request_id) references m_loan_reschedule_request(id)
|
||||
);
|
||||
|
||||
alter table m_loan add rescheduledon_userid bigint(20) null after rescheduledon_date;
|
||||
alter table m_loan add rescheduledon_userid BIGINT null after rescheduledon_date;
|
||||
|
||||
insert into `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) values ('loan_reschedule', 'READ_RESCHEDULELOAN', 'RESCHEDULELOAN', 'READ', '0');
|
||||
|
||||
|
||||
+1
-1
@@ -36,4 +36,4 @@ ALTER TABLE `m_loan_repayment_schedule_history`
|
||||
DROP COLUMN `total_paid_late_derived`,
|
||||
DROP COLUMN `completed_derived`,
|
||||
DROP COLUMN `obligations_met_on_date`,
|
||||
ADD COLUMN `version` INT(5) NOT NULL;
|
||||
ADD COLUMN `version` INT NOT NULL;
|
||||
|
||||
+274
-274
File diff suppressed because it is too large
Load Diff
@@ -21,56 +21,56 @@
|
||||
-- Table `m_hook_templates`
|
||||
-- -----------------------------------------------------
|
||||
CREATE TABLE IF NOT EXISTS `m_hook_templates` (
|
||||
`id` SMALLINT(6) NOT NULL AUTO_INCREMENT,
|
||||
`id` SMALLINT NOT NULL AUTO_INCREMENT,
|
||||
`name` VARCHAR(45) NOT NULL,
|
||||
PRIMARY KEY (`id`))
|
||||
ENGINE = InnoDB DEFAULT CHARSET=utf8;
|
||||
ENGINE = InnoDB DEFAULT CHARSET=UTF8MB4;
|
||||
|
||||
|
||||
-- -----------------------------------------------------
|
||||
-- Table `m_hook`
|
||||
-- -----------------------------------------------------
|
||||
CREATE TABLE IF NOT EXISTS `m_hook` (
|
||||
`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
|
||||
`template_id` SMALLINT(6) NOT NULL,
|
||||
`is_active` SMALLINT(3) NOT NULL DEFAULT 1,
|
||||
`id` BIGINT NOT NULL AUTO_INCREMENT,
|
||||
`template_id` SMALLINT NOT NULL,
|
||||
`is_active` SMALLINT NOT NULL DEFAULT 1,
|
||||
`name` VARCHAR(45) NOT NULL,
|
||||
`createdby_id` bigint(20) DEFAULT NULL,
|
||||
`createdby_id` BIGINT DEFAULT NULL,
|
||||
`created_date` datetime DEFAULT NULL,
|
||||
`lastmodifiedby_id` bigint(20) DEFAULT NULL,
|
||||
`lastmodifiedby_id` BIGINT DEFAULT NULL,
|
||||
`lastmodified_date` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
INDEX `fk_template_id_idx` (`template_id` ASC),
|
||||
CONSTRAINT `fk_template_id`
|
||||
FOREIGN KEY (`template_id`)
|
||||
REFERENCES `m_hook_templates` (`id`))
|
||||
ENGINE = InnoDB DEFAULT CHARSET=utf8;
|
||||
ENGINE = InnoDB DEFAULT CHARSET=UTF8MB4;
|
||||
|
||||
|
||||
-- -----------------------------------------------------
|
||||
-- Table `m_hook_schema`
|
||||
-- -----------------------------------------------------
|
||||
CREATE TABLE IF NOT EXISTS `m_hook_schema` (
|
||||
`id` SMALLINT(6) NOT NULL AUTO_INCREMENT,
|
||||
`hook_template_id` SMALLINT(6) NOT NULL,
|
||||
`id` SMALLINT NOT NULL AUTO_INCREMENT,
|
||||
`hook_template_id` SMALLINT NOT NULL,
|
||||
`field_type` VARCHAR(45) NOT NULL,
|
||||
`field_name` VARCHAR(100) NOT NULL,
|
||||
`placeholder` VARCHAR(100) DEFAULT NULL,
|
||||
`optional` TINYINT(3) NOT NULL DEFAULT 0,
|
||||
`optional` TINYINT NOT NULL DEFAULT 0,
|
||||
PRIMARY KEY (`id`),
|
||||
INDEX `fk_hook_template_id_idx` (`hook_template_id` ASC),
|
||||
CONSTRAINT `fk_hook_template_id`
|
||||
FOREIGN KEY (`hook_template_id`)
|
||||
REFERENCES `m_hook_templates` (`id`))
|
||||
ENGINE = InnoDB DEFAULT CHARSET=utf8;
|
||||
ENGINE = InnoDB DEFAULT CHARSET=UTF8MB4;
|
||||
|
||||
|
||||
-- -----------------------------------------------------
|
||||
-- Table `m_hook_registered_events`
|
||||
-- -----------------------------------------------------
|
||||
CREATE TABLE IF NOT EXISTS `m_hook_registered_events` (
|
||||
`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
|
||||
`hook_id` BIGINT(20) NOT NULL,
|
||||
`id` BIGINT NOT NULL AUTO_INCREMENT,
|
||||
`hook_id` BIGINT NOT NULL,
|
||||
`entity_name` VARCHAR(45) NOT NULL,
|
||||
`action_name` VARCHAR(45) NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
@@ -78,15 +78,15 @@ CREATE TABLE IF NOT EXISTS `m_hook_registered_events` (
|
||||
CONSTRAINT `fk_hook_idc`
|
||||
FOREIGN KEY (`hook_id`)
|
||||
REFERENCES `m_hook` (`id`))
|
||||
ENGINE = InnoDB DEFAULT CHARSET=utf8;
|
||||
ENGINE = InnoDB DEFAULT CHARSET=UTF8MB4;
|
||||
|
||||
|
||||
-- -----------------------------------------------------
|
||||
-- Table `m_hook_configuration`
|
||||
-- -----------------------------------------------------
|
||||
CREATE TABLE IF NOT EXISTS `m_hook_configuration` (
|
||||
`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
|
||||
`hook_id` BIGINT(20) NULL,
|
||||
`id` BIGINT NOT NULL AUTO_INCREMENT,
|
||||
`hook_id` BIGINT NULL,
|
||||
`field_type` VARCHAR(45) NOT NULL,
|
||||
`field_name` VARCHAR(100) NOT NULL,
|
||||
`field_value` VARCHAR(100) NOT NULL,
|
||||
@@ -95,7 +95,7 @@ CREATE TABLE IF NOT EXISTS `m_hook_configuration` (
|
||||
CONSTRAINT `fk_hook_id_cfg`
|
||||
FOREIGN KEY (`hook_id`)
|
||||
REFERENCES `m_hook` (`id`))
|
||||
ENGINE = InnoDB DEFAULT CHARSET=utf8;
|
||||
ENGINE = InnoDB DEFAULT CHARSET=UTF8MB4;
|
||||
|
||||
insert into `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`)
|
||||
VALUES ('configuration', 'CREATE_HOOK', 'HOOK', 'CREATE', 0);
|
||||
|
||||
+6
-6
@@ -18,21 +18,21 @@
|
||||
--
|
||||
|
||||
CREATE TABLE `m_savings_officer_assignment_history` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||
`account_id` bigint(20) NOT NULL,
|
||||
`savings_officer_id` bigint(20) DEFAULT NULL,
|
||||
`id` BIGINT NOT NULL AUTO_INCREMENT,
|
||||
`account_id` BIGINT NOT NULL,
|
||||
`savings_officer_id` BIGINT DEFAULT NULL,
|
||||
`start_date` date NOT NULL,
|
||||
`end_date` date DEFAULT NULL,
|
||||
`createdby_id` bigint(20) DEFAULT NULL,
|
||||
`createdby_id` BIGINT DEFAULT NULL,
|
||||
`created_date` datetime DEFAULT NULL,
|
||||
`lastmodified_date` datetime DEFAULT NULL,
|
||||
`lastmodifiedby_id` bigint(20) DEFAULT NULL,
|
||||
`lastmodifiedby_id` BIGINT DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `fk_m_savings_officer_assignment_history_0001` (`account_id`),
|
||||
KEY `fk_m_savings_officer_assignment_history_0002` (`savings_officer_id`),
|
||||
CONSTRAINT `fk_m_savings_officer_assignment_history_0001` FOREIGN KEY (`account_id`) REFERENCES `m_savings_account` (`id`),
|
||||
CONSTRAINT `fk_m_savings_officer_assignment_history_0002` FOREIGN KEY (`savings_officer_id`) REFERENCES `m_staff` (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
|
||||
|
||||
insert into m_permission (`grouping`,code,entity_name,action_name) values ('portfolio','REMOVESAVINGSOFFICER_SAVINGSACCOUNT','SAVINGSACCOUNT','REMOVESAVINGSOFFICER');
|
||||
insert into m_permission (`grouping`,code,entity_name,action_name) values ('portfolio','UPDATESAVINGSOFFICER_SAVINGSACCOUNT','SAVINGSACCOUNT','UPDATESAVINGSOFFICER');
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@
|
||||
--
|
||||
|
||||
ALTER TABLE `m_loan_charge_paid_by`
|
||||
ADD COLUMN `installment_number` SMALLINT(5) NULL AFTER `amount`;
|
||||
ADD COLUMN `installment_number` SMALLINT NULL AFTER `amount`;
|
||||
|
||||
ALTER TABLE `m_loan_transaction`
|
||||
ADD COLUMN `unrecognized_income_portion` DECIMAL(19,6) NULL DEFAULT NULL AFTER `overpayment_portion_derived`;
|
||||
+2
-2
@@ -18,5 +18,5 @@
|
||||
--
|
||||
|
||||
ALTER TABLE `m_group_level`
|
||||
ADD COLUMN `min_clients` INT(11) NOT NULL DEFAULT '0' AFTER `can_have_clients`,
|
||||
ADD COLUMN `max_clients` INT(11) NOT NULL DEFAULT '0' AFTER `min_clients`;
|
||||
ADD COLUMN `min_clients` INT NOT NULL DEFAULT '0' AFTER `can_have_clients`,
|
||||
ADD COLUMN `max_clients` INT NOT NULL DEFAULT '0' AFTER `min_clients`;
|
||||
+1
-1
@@ -18,4 +18,4 @@
|
||||
--
|
||||
|
||||
Alter table m_loan_transaction
|
||||
Add column manually_adjusted_or_reversed tinyint(1) default 0;
|
||||
Add column manually_adjusted_or_reversed tinyint default 0;
|
||||
+1
-1
@@ -18,4 +18,4 @@
|
||||
--
|
||||
|
||||
ALTER TABLE `m_product_loan`
|
||||
ADD COLUMN `min_days_between_disbursal_and_first_repayment` INT(3) NULL AFTER `interest_recalculation_enabled`;
|
||||
ADD COLUMN `min_days_between_disbursal_and_first_repayment` INT NULL AFTER `interest_recalculation_enabled`;
|
||||
+2
-2
@@ -18,5 +18,5 @@
|
||||
--
|
||||
|
||||
ALTER TABLE `m_loan`
|
||||
ADD COLUMN `repayment_frequency_nth_day_enum` SMALLINT(5) NOT NULL DEFAULT '0' AFTER `repayment_period_frequency_enum`,
|
||||
ADD COLUMN `repayment_frequency_day_of_week_enum` SMALLINT(5) NOT NULL DEFAULT '0' AFTER `repayment_frequency_nth_day_enum`;
|
||||
ADD COLUMN `repayment_frequency_nth_day_enum` SMALLINT NOT NULL DEFAULT '0' AFTER `repayment_period_frequency_enum`,
|
||||
ADD COLUMN `repayment_frequency_day_of_week_enum` SMALLINT NOT NULL DEFAULT '0' AFTER `repayment_frequency_nth_day_enum`;
|
||||
|
||||
+2
-2
@@ -18,5 +18,5 @@
|
||||
--
|
||||
|
||||
ALTER TABLE `m_loan`
|
||||
CHANGE COLUMN `repayment_frequency_nth_day_enum` `repayment_frequency_nth_day_enum` SMALLINT(5) NULL DEFAULT '0' AFTER `repayment_period_frequency_enum`,
|
||||
CHANGE COLUMN `repayment_frequency_day_of_week_enum` `repayment_frequency_day_of_week_enum` SMALLINT(5) NULL DEFAULT '0' AFTER `repayment_frequency_nth_day_enum`;
|
||||
CHANGE COLUMN `repayment_frequency_nth_day_enum` `repayment_frequency_nth_day_enum` SMALLINT NULL DEFAULT '0' AFTER `repayment_period_frequency_enum`,
|
||||
CHANGE COLUMN `repayment_frequency_day_of_week_enum` `repayment_frequency_day_of_week_enum` SMALLINT NULL DEFAULT '0' AFTER `repayment_frequency_nth_day_enum`;
|
||||
|
||||
+1
-1
@@ -17,4 +17,4 @@
|
||||
-- under the License.
|
||||
--
|
||||
|
||||
alter table `m_loan` add `create_standing_instruction_at_disbursement` tinyint(1) null;
|
||||
alter table `m_loan` add `create_standing_instruction_at_disbursement` tinyint null;
|
||||
|
||||
+4
-4
@@ -21,11 +21,11 @@ ALTER TABLE `m_savings_account`
|
||||
ADD COLUMN `on_hold_funds_derived` DECIMAL(19,6) NULL DEFAULT NULL;
|
||||
|
||||
ALTER TABLE `m_portfolio_account_associations`
|
||||
ADD COLUMN `association_type_enum` SMALLINT(1) NOT NULL DEFAULT '1';
|
||||
ADD COLUMN `association_type_enum` SMALLINT NOT NULL DEFAULT '1';
|
||||
|
||||
CREATE TABLE `m_product_loan_guarantee_details` (
|
||||
`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
|
||||
`loan_product_id` BIGINT(20) NOT NULL,
|
||||
`id` BIGINT NOT NULL AUTO_INCREMENT,
|
||||
`loan_product_id` BIGINT NOT NULL,
|
||||
`mandatory_guarantee` DECIMAL(19,5) NOT NULL,
|
||||
`minimum_guarantee_from_own_funds` DECIMAL(19,5) NULL,
|
||||
`minimum_guarantee_from_guarantor_funds` DECIMAL(19,5) NULL,
|
||||
@@ -34,4 +34,4 @@ CREATE TABLE `m_product_loan_guarantee_details` (
|
||||
);
|
||||
|
||||
ALTER TABLE `m_product_loan`
|
||||
ADD COLUMN `hold_guarantee_funds` TINYINT(1) NOT NULL DEFAULT '0';
|
||||
ADD COLUMN `hold_guarantee_funds` tinyint NOT NULL DEFAULT '0';
|
||||
+1
-1
@@ -19,7 +19,7 @@
|
||||
|
||||
|
||||
ALTER TABLE `m_client`
|
||||
ADD COLUMN `sub_status` INT(11) NULL DEFAULT NULL AFTER `status_enum`,
|
||||
ADD COLUMN `sub_status` INT NULL DEFAULT NULL AFTER `status_enum`,
|
||||
ADD CONSTRAINT `FK_m_client_substatus_m_code_value` FOREIGN KEY (`sub_status`) REFERENCES `m_code_value` (`id`);
|
||||
|
||||
|
||||
|
||||
+2
-2
@@ -20,8 +20,8 @@
|
||||
ALTER TABLE `m_loan_transaction`
|
||||
ADD COLUMN (
|
||||
`created_date` DATETIME,
|
||||
`appuser_id` BIGINT(20)
|
||||
`appuser_id` BIGINT
|
||||
);
|
||||
|
||||
ALTER TABLE `m_savings_account_transaction`
|
||||
ADD COLUMN `appuser_id` BIGINT(20);
|
||||
ADD COLUMN `appuser_id` BIGINT;
|
||||
+15
-15
@@ -18,42 +18,42 @@
|
||||
--
|
||||
|
||||
ALTER TABLE `m_portfolio_account_associations`
|
||||
ADD COLUMN `is_active` TINYINT(1) NOT NULL DEFAULT '1';
|
||||
ADD COLUMN `is_active` tinyint NOT NULL DEFAULT '1';
|
||||
|
||||
ALTER TABLE `m_guarantor`
|
||||
ADD COLUMN `is_active` TINYINT(1) NOT NULL DEFAULT '1';
|
||||
ADD COLUMN `is_active` tinyint NOT NULL DEFAULT '1';
|
||||
|
||||
CREATE TABLE `m_guarantor_funding_details` (
|
||||
`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
|
||||
`guarantor_id` BIGINT(20) NOT NULL,
|
||||
`account_associations_id` BIGINT(20) NOT NULL,
|
||||
`id` BIGINT NOT NULL AUTO_INCREMENT,
|
||||
`guarantor_id` BIGINT NOT NULL,
|
||||
`account_associations_id` BIGINT NOT NULL,
|
||||
`amount` DECIMAL(19,6) NOT NULL,
|
||||
`amount_released_derived` DECIMAL(19,6) NULL,
|
||||
`amount_remaining_derived` DECIMAL(19,6) NULL,
|
||||
`amount_transfered_derived` DECIMAL(19,6) NULL,
|
||||
`status_enum` SMALLINT(3) NOT NULL,
|
||||
`status_enum` SMALLINT NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
CONSTRAINT `FK_m_guarantor_fund_details_m_guarantor` FOREIGN KEY (`guarantor_id`) REFERENCES `m_guarantor` (`id`),
|
||||
CONSTRAINT `FK_m_guarantor_fund_details_account_associations_id` FOREIGN KEY (`account_associations_id`) REFERENCES `m_portfolio_account_associations` (`id`)
|
||||
);
|
||||
|
||||
CREATE TABLE `m_deposit_account_on_hold_transaction` (
|
||||
`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
|
||||
`savings_account_id` BIGINT(20) NOT NULL,
|
||||
`id` BIGINT NOT NULL AUTO_INCREMENT,
|
||||
`savings_account_id` BIGINT NOT NULL,
|
||||
`amount` DECIMAL(19,6) NOT NULL,
|
||||
`transaction_type_enum` SMALLINT(1) NOT NULL,
|
||||
`transaction_type_enum` SMALLINT NOT NULL,
|
||||
`transaction_date` DATE NOT NULL,
|
||||
`is_reversed` TINYINT(1) NOT NULL DEFAULT '0',
|
||||
`is_reversed` tinyint NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`id`),
|
||||
CONSTRAINT `FK_deposit_on_hold_transaction_m_savings_account` FOREIGN KEY (`savings_account_id`) REFERENCES `m_savings_account` (`id`)
|
||||
);
|
||||
|
||||
CREATE TABLE `m_guarantor_transaction` (
|
||||
`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
|
||||
`guarantor_fund_detail_id` BIGINT(20) NOT NULL,
|
||||
`loan_transaction_id` BIGINT(20) NOT NULL,
|
||||
`deposit_on_hold_transaction_id` BIGINT(20) NOT NULL,
|
||||
`is_reversed` TINYINT(1) NOT NULL DEFAULT '0',
|
||||
`id` BIGINT NOT NULL AUTO_INCREMENT,
|
||||
`guarantor_fund_detail_id` BIGINT NOT NULL,
|
||||
`loan_transaction_id` BIGINT NOT NULL,
|
||||
`deposit_on_hold_transaction_id` BIGINT NOT NULL,
|
||||
`is_reversed` tinyint NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`id`),
|
||||
CONSTRAINT `FK_guarantor_transaction_m_deposit_account_on_hold_transaction` FOREIGN KEY (`deposit_on_hold_transaction_id`) REFERENCES `m_deposit_account_on_hold_transaction` (`id`),
|
||||
CONSTRAINT `FK_guarantor_transaction_guarantor_fund_detail` FOREIGN KEY (`guarantor_fund_detail_id`) REFERENCES `m_guarantor_funding_details` (`id`),
|
||||
|
||||
+1
-1
@@ -23,5 +23,5 @@ INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `c
|
||||
|
||||
ALTER TABLE `m_client`
|
||||
CHANGE COLUMN `external_id` `external_id` VARCHAR(100) NULL DEFAULT NULL AFTER `account_no`,
|
||||
CHANGE COLUMN `status_enum` `status_enum` INT(5) NOT NULL DEFAULT '300' AFTER `external_id`,
|
||||
CHANGE COLUMN `status_enum` `status_enum` INT NOT NULL DEFAULT '300' AFTER `external_id`,
|
||||
CHANGE COLUMN `joined_date` `activation_date` DATE NULL DEFAULT NULL AFTER `status_enum`;
|
||||
+4
-4
@@ -18,13 +18,13 @@
|
||||
--
|
||||
|
||||
CREATE TABLE `c_account_number_format` (
|
||||
`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
|
||||
`account_type_enum` SMALLINT(1) NOT NULL,
|
||||
`prefix_type_enum` SMALLINT(2) NULL DEFAULT NULL,
|
||||
`id` BIGINT NOT NULL AUTO_INCREMENT,
|
||||
`account_type_enum` SMALLINT NOT NULL,
|
||||
`prefix_type_enum` SMALLINT NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE INDEX `account_type_enum` (`account_type_enum`)
|
||||
)
|
||||
COLLATE='utf8_general_ci'
|
||||
COLLATE='utf8mb4_general_ci'
|
||||
ENGINE=InnoDB
|
||||
;
|
||||
|
||||
|
||||
+1
-1
@@ -18,4 +18,4 @@
|
||||
--
|
||||
|
||||
ALTER TABLE `m_savings_account`
|
||||
ADD COLUMN `version` INT(15) NOT NULL DEFAULT '1' AFTER `on_hold_funds_derived`;
|
||||
ADD COLUMN `version` INT NOT NULL DEFAULT '1' AFTER `on_hold_funds_derived`;
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@ ALTER TABLE `m_guarantor_transaction`
|
||||
ALTER `loan_transaction_id` DROP DEFAULT;
|
||||
|
||||
ALTER TABLE `m_guarantor_transaction`
|
||||
CHANGE COLUMN `loan_transaction_id` `loan_transaction_id` BIGINT(20) NULL ;
|
||||
CHANGE COLUMN `loan_transaction_id` `loan_transaction_id` BIGINT NULL ;
|
||||
|
||||
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('portfolio', 'RECOVERGUARANTEES_LOAN', 'LOAN', 'RECOVERGUARANTEES', 0);
|
||||
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('portfolio', 'RECOVERGUARANTEES_LOAN_CHECKER', 'LOAN', 'RECOVERGUARANTEES_CHECKER', 0);
|
||||
|
||||
+1
-1
@@ -18,4 +18,4 @@
|
||||
--
|
||||
|
||||
ALTER TABLE `m_loan`
|
||||
ADD COLUMN `version` INT(15) NOT NULL DEFAULT '1' AFTER `create_standing_instruction_at_disbursement`;
|
||||
ADD COLUMN `version` INT NOT NULL DEFAULT '1' AFTER `create_standing_instruction_at_disbursement`;
|
||||
|
||||
+6
-6
@@ -19,20 +19,20 @@
|
||||
|
||||
/**add columns to m_client**/
|
||||
ALTER TABLE `m_client`
|
||||
ADD COLUMN `reject_reason_cv_id` INT(11) NULL DEFAULT NULL AFTER `client_classification_cv_id`,
|
||||
ADD COLUMN `reject_reason_cv_id` INT NULL DEFAULT NULL AFTER `client_classification_cv_id`,
|
||||
ADD COLUMN `rejectedon_date` DATE NULL DEFAULT NULL AFTER `reject_reason_cv_id`,
|
||||
ADD COLUMN `rejectedon_userid` BIGINT(20) NULL DEFAULT NULL AFTER `rejectedon_date`,
|
||||
ADD COLUMN `withdraw_reason_cv_id` INT(11) NULL DEFAULT NULL AFTER `rejectedon_userid`,
|
||||
ADD COLUMN `rejectedon_userid` BIGINT NULL DEFAULT NULL AFTER `rejectedon_date`,
|
||||
ADD COLUMN `withdraw_reason_cv_id` INT NULL DEFAULT NULL AFTER `rejectedon_userid`,
|
||||
ADD COLUMN `withdrawn_on_date` DATE NULL DEFAULT NULL AFTER `withdraw_reason_cv_id`,
|
||||
ADD COLUMN `withdraw_on_userid` BIGINT(20) NULL DEFAULT NULL AFTER `withdrawn_on_date`,
|
||||
ADD COLUMN `withdraw_on_userid` BIGINT NULL DEFAULT NULL AFTER `withdrawn_on_date`,
|
||||
ADD COLUMN `reactivated_on_date` DATE NULL AFTER `withdraw_on_userid`,
|
||||
ADD COLUMN `reactivated_on_userid` BIGINT(20) NULL AFTER `reactivated_on_date`,
|
||||
ADD COLUMN `reactivated_on_userid` BIGINT NULL AFTER `reactivated_on_date`,
|
||||
ADD CONSTRAINT `FK_m_client_type_mcode_value_reject` FOREIGN KEY (`reject_reason_cv_id`) REFERENCES `m_code_value` (`id`),
|
||||
ADD CONSTRAINT `FK_m_client_type_m_code_value_withdraw` FOREIGN KEY (`withdraw_reason_cv_id`) REFERENCES `m_code_value` (`id`);
|
||||
|
||||
|
||||
ALTER TABLE `m_client`
|
||||
ADD COLUMN `updated_by` BIGINT(20) NULL DEFAULT NULL AFTER `closedon_date`,
|
||||
ADD COLUMN `updated_by` BIGINT NULL DEFAULT NULL AFTER `closedon_date`,
|
||||
ADD COLUMN `updated_on` DATE NULL DEFAULT NULL AFTER `updated_by`;
|
||||
|
||||
|
||||
|
||||
+4
-4
@@ -42,12 +42,12 @@ values (
|
||||
|
||||
-- Table where the actual restrictions will be stored
|
||||
CREATE TABLE `m_entity_to_entity_access` (
|
||||
`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
|
||||
`id` BIGINT NOT NULL AUTO_INCREMENT,
|
||||
`entity_type` VARCHAR(50) NOT NULL,
|
||||
`entity_id` BIGINT(20) NOT NULL,
|
||||
`access_type_code_value_id` INT(11) NOT NULL,
|
||||
`entity_id` BIGINT NOT NULL,
|
||||
`access_type_code_value_id` INT NOT NULL,
|
||||
`second_entity_type` VARCHAR(50) NOT NULL,
|
||||
`second_entity_id` BIGINT(20) NOT NULL,
|
||||
`second_entity_id` BIGINT NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
INDEX `IDX_OFFICE` (`entity_type`,`entity_id`),
|
||||
UNIQUE KEY `id_uniq_m_entity_to_entity_access` (`entity_type`,`entity_id`,`access_type_code_value_id`,`second_entity_type`,`second_entity_id`),
|
||||
|
||||
+12
-12
@@ -18,15 +18,15 @@
|
||||
--
|
||||
|
||||
CREATE TABLE `m_tellers` (
|
||||
`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
|
||||
`office_id` BIGINT(20) NOT NULL,
|
||||
`debit_account_id` BIGINT(20),
|
||||
`credit_account_id` BIGINT(20),
|
||||
`id` BIGINT NOT NULL AUTO_INCREMENT,
|
||||
`office_id` BIGINT NOT NULL,
|
||||
`debit_account_id` BIGINT,
|
||||
`credit_account_id` BIGINT,
|
||||
`name` VARCHAR(50) NOT NULL,
|
||||
`description` VARCHAR(100),
|
||||
`valid_from` DATE,
|
||||
`valid_to` DATE,
|
||||
`state` SMALLINT(5),
|
||||
`state` SMALLINT,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE INDEX `m_tellers_name_unq` (`name`),
|
||||
INDEX `IK_m_tellers_m_office` (`office_id`),
|
||||
@@ -36,9 +36,9 @@ CREATE TABLE `m_tellers` (
|
||||
);
|
||||
|
||||
CREATE TABLE `m_cashiers` (
|
||||
`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
|
||||
`staff_id` BIGINT(20),
|
||||
`teller_id` BIGINT(20),
|
||||
`id` BIGINT NOT NULL AUTO_INCREMENT,
|
||||
`staff_id` BIGINT,
|
||||
`teller_id` BIGINT,
|
||||
`description` VARCHAR(100),
|
||||
`start_date` DATE,
|
||||
`end_date` DATE,
|
||||
@@ -53,14 +53,14 @@ CREATE TABLE `m_cashiers` (
|
||||
);
|
||||
|
||||
CREATE TABLE `m_cashier_transactions` (
|
||||
`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
|
||||
`cashier_id` BIGINT(20) NOT NULL,
|
||||
`txn_type` SMALLINT(5) NOT NULL,
|
||||
`id` BIGINT NOT NULL AUTO_INCREMENT,
|
||||
`cashier_id` BIGINT NOT NULL,
|
||||
`txn_type` SMALLINT NOT NULL,
|
||||
`txn_amount` DECIMAL (19,6) NOT NULL,
|
||||
`txn_date` DATE NOT NULL,
|
||||
`created_date` DATETIME NOT NULL,
|
||||
`entity_type` VARCHAR(50),
|
||||
`entity_id` BIGINT(20),
|
||||
`entity_id` BIGINT,
|
||||
`txn_note` VARCHAR(200),
|
||||
PRIMARY KEY (`id`),
|
||||
INDEX `IK_m_teller_transactions_m_cashier` (`cashier_id`),
|
||||
|
||||
+2
-2
@@ -27,9 +27,9 @@ INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `c
|
||||
ALTER TABLE `m_group` DROP FOREIGN KEY `FK_m_group_level`;
|
||||
ALTER TABLE `m_group`
|
||||
CHANGE COLUMN `external_id` `external_id` VARCHAR(100) NULL DEFAULT NULL AFTER `id`,
|
||||
CHANGE COLUMN `status_enum` `status_enum` INT(5) NOT NULL DEFAULT '300' AFTER `external_id`,
|
||||
CHANGE COLUMN `status_enum` `status_enum` INT NOT NULL DEFAULT '300' AFTER `external_id`,
|
||||
CHANGE COLUMN `name` `display_name` VARCHAR(100) NOT NULL AFTER `level_id`,
|
||||
CHANGE COLUMN `level_Id` `level_id` INT(11) NOT NULL,
|
||||
CHANGE COLUMN `level_Id` `level_id` INT NOT NULL,
|
||||
ADD CONSTRAINT `FK_m_group_level` FOREIGN KEY (`level_id`) REFERENCES `m_group_level` (`id`);
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@
|
||||
-- under the License.
|
||||
--
|
||||
|
||||
ALTER TABLE `m_role` ADD COLUMN `is_disabled` TINYINT(1) NOT NULL DEFAULT 0 AFTER `description`;
|
||||
ALTER TABLE `m_role` ADD COLUMN `is_disabled` tinyint NOT NULL DEFAULT 0 AFTER `description`;
|
||||
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('authorisation', 'DISABLE_ROLE', 'ROLE', 'DISABLE', 0);
|
||||
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('authorisation', 'DISABLE_ROLE_CHECKER', 'ROLE', 'DISABLE_CHECKER', 0);
|
||||
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('authorisation', 'ENABLE_ROLE', 'ROLE', 'ENABLE', 0);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user