update DDL and patches files and move to migrations folder usage now.
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
ALTER TABLE `m_savings_account`
|
||||
ADD COLUMN `status_enum` SMALLINT(5) NOT NULL DEFAULT 300 AFTER `product_id` ;
|
||||
|
||||
ALTER TABLE `m_savings_account`
|
||||
ADD COLUMN `activation_date` DATE DEFAULT NULL AFTER `status_enum`;
|
||||
|
||||
ALTER TABLE `m_savings_account`
|
||||
ADD COLUMN `lockedin_until_date_derived` DATE DEFAULT NULL AFTER `lockin_period_frequency_enum`;
|
||||
|
||||
ALTER TABLE `m_portfolio_command_source`
|
||||
ADD COLUMN `savings_id` BIGINT(20) NULL DEFAULT NULL AFTER `loan_id` ;
|
||||
|
||||
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`)
|
||||
VALUES
|
||||
('transaction_savings', 'ACTIVATE_SAVINGSACCOUNT', 'SAVINGSACCOUNT', 'ACTIVATE', '1'),
|
||||
('transaction_savings', 'ACTIVATE_SAVINGSACCOUNT_CHECKER', 'SAVINGSACCOUNT', 'ACTIVATE', '0');
|
||||
@@ -0,0 +1,4 @@
|
||||
|
||||
ALTER TABLE m_portfolio_command_source
|
||||
CHANGE COLUMN `savings_id` `savings_account_id` BIGINT(20) NULL DEFAULT NULL ;
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
ALTER TABLE `m_loan_collateral`
|
||||
ADD COLUMN `value` DECIMAL(19,6) NULL DEFAULT NULL AFTER `type_cv_id`;
|
||||
|
||||
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`)
|
||||
VALUES('portfolio', 'CREATE_COLLATERAL', 'COLLATERAL', 'CREATE', '0'),
|
||||
('portfolio', 'READ_COLLATERAL', 'COLLATERAL', 'READ', '0'),
|
||||
('portfolio', 'UPDATE_COLLATERAL', 'COLLATERAL', 'UPDATE', '0'),
|
||||
('portfolio', 'DELETE_COLLATERAL', 'COLLATERAL', 'DELETE', '0'),
|
||||
('portfolio', 'CREATE_COLLATERAL_CHECKER', 'COLLATERAL', 'CREATE', '0'),
|
||||
('portfolio', 'UPDATE_COLLATERAL_CHECKER', 'COLLATERAL', 'UPDATE', '0'),
|
||||
('portfolio', 'DELETE_COLLATERAL_CHECKER', 'COLLATERAL', 'DELETE', '0');
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
ALTER TABLE `m_savings_product`
|
||||
ADD COLUMN `interest_period_enum` SMALLINT(5) NOT NULL AFTER `nominal_interest_rate_period_frequency_enum`,
|
||||
ADD COLUMN `interest_calculation_type_enum` SMALLINT(5) NOT NULL AFTER `interest_period_enum`;
|
||||
|
||||
|
||||
ALTER TABLE `m_savings_account`
|
||||
ADD COLUMN `interest_period_enum` SMALLINT(5) NOT NULL AFTER `annual_nominal_interest_rate`,
|
||||
ADD COLUMN `interest_calculation_type_enum` SMALLINT(5) NOT NULL AFTER `interest_period_enum`;
|
||||
|
||||
|
||||
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`)
|
||||
VALUES
|
||||
('transaction_savings', 'CALCULATEINTEREST_SAVINGSACCOUNT', 'SAVINGSACCOUNT', 'CALCULATEINTEREST', '1'),
|
||||
('transaction_savings', 'CALCULATEINTEREST_SAVINGSACCOUNT_CHECKER', 'SAVINGSACCOUNT', 'CALCULATEINTEREST', '0');
|
||||
|
||||
|
||||
ALTER TABLE `m_savings_account_transaction`
|
||||
ADD COLUMN `running_balance_derived` DECIMAL(19,6) NULL AFTER `is_reversed`,
|
||||
ADD COLUMN `balance_number_of_days_derived` INT NULL AFTER `running_balance_derived`,
|
||||
ADD COLUMN `balance_end_date_derived` DATE NULL AFTER `balance_number_of_days_derived`,
|
||||
ADD COLUMN `cumulative_balance_derived` DECIMAL(19,6) NULL AFTER `balance_end_date_derived`;
|
||||
|
||||
ALTER TABLE `m_savings_account`
|
||||
ADD COLUMN `total_interest_earned_derived` DECIMAL(19,6) DEFAULT NULL AFTER `total_withdrawals_derived`;
|
||||
|
||||
|
||||
ALTER TABLE `m_savings_product`
|
||||
ADD COLUMN `interest_calculation_days_in_year_type_enum` SMALLINT(5) NOT NULL AFTER `interest_calculation_type_enum`;
|
||||
|
||||
ALTER TABLE `m_savings_account`
|
||||
ADD COLUMN `interest_calculation_days_in_year_type_enum` SMALLINT(5) NOT NULL AFTER `interest_calculation_type_enum`;
|
||||
@@ -0,0 +1,34 @@
|
||||
-- Adding new system defined code for tracking guarantor relation ship type
|
||||
insert into m_code (code_name,is_system_defined) values ('GuarantorRelationship',1);
|
||||
|
||||
-- Adding a few Default Guarantor Relationships
|
||||
|
||||
insert into m_code_value (code_id,code_value,order_position)
|
||||
select id,"Spouse",0
|
||||
from m_code
|
||||
where m_code.code_name="GuarantorRelationship";
|
||||
|
||||
insert into m_code_value (code_id,code_value,order_position)
|
||||
select id,"Parent",0
|
||||
from m_code
|
||||
where m_code.code_name="GuarantorRelationship";
|
||||
|
||||
insert into m_code_value (code_id,code_value,order_position)
|
||||
select id,"Sibling",0
|
||||
from m_code
|
||||
where m_code.code_name="GuarantorRelationship";
|
||||
|
||||
insert into m_code_value (code_id,code_value,order_position)
|
||||
select id,"Business Associate",0
|
||||
from m_code
|
||||
where m_code.code_name="GuarantorRelationship";
|
||||
|
||||
insert into m_code_value (code_id,code_value,order_position)
|
||||
select id,"Other",0
|
||||
from m_code
|
||||
where m_code.code_name="GuarantorRelationship";
|
||||
|
||||
-- Add a column to link Guarantor to Code value
|
||||
ALTER TABLE `m_guarantor`
|
||||
ADD COLUMN `client_reln_cv_id` INT(11) NULL DEFAULT NULL AFTER `loan_id`,
|
||||
ADD CONSTRAINT `FK_m_guarantor_m_code_value` FOREIGN KEY (`client_reln_cv_id`) REFERENCES `m_code_value` (`id`);
|
||||
Reference in New Issue
Block a user