update saving product code
This commit is contained in:
+4
@@ -27,4 +27,8 @@
|
||||
<include file="parts/2002_add_savings_accrual_permission.xml" relativeToChangelogFile="true" />
|
||||
<include file="parts/2003_add_accrued_till_date_to_savings_account.xml" relativeToChangelogFile="true" />
|
||||
<include file="parts/2004_add_savings_account_cob_infrastructure.xml" relativeToChangelogFile="true" />
|
||||
<include file="parts/2005_add_savings_product_classification_code_values.xml" relativeToChangelogFile="true" />
|
||||
<include file="parts/2006_add_period_frequency_options.xml" relativeToChangelogFile="true" />
|
||||
<include file="parts/2007_add_interest_calculation_type_option.xml" relativeToChangelogFile="true" />
|
||||
<include file="parts/2008_add_other_gl_mappings_to_savings_product.xml" relativeToChangelogFile="true" />
|
||||
</databaseChangeLog>
|
||||
|
||||
+166
@@ -0,0 +1,166 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
|
||||
-->
|
||||
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.3.xsd">
|
||||
<changeSet author="fineract" id="2005-1-savings-product-account-type-code">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">select count(*) from m_code where code_name = 'SavingsProductAccountType'</sqlCheck>
|
||||
</preConditions>
|
||||
<insert tableName="m_code">
|
||||
<column name="code_name" value="SavingsProductAccountType"/>
|
||||
<column name="is_system_defined" valueBoolean="true"/>
|
||||
</insert>
|
||||
</changeSet>
|
||||
|
||||
<changeSet author="fineract" id="2005-2-savings-product-customer-segment-code">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">select count(*) from m_code where code_name = 'SavingsProductCustomerSegment'</sqlCheck>
|
||||
</preConditions>
|
||||
<insert tableName="m_code">
|
||||
<column name="code_name" value="SavingsProductCustomerSegment"/>
|
||||
<column name="is_system_defined" valueBoolean="true"/>
|
||||
</insert>
|
||||
</changeSet>
|
||||
|
||||
<changeSet author="fineract" id="2005-3-savings-product-account-type-values">
|
||||
<sql>
|
||||
INSERT INTO m_code (code_name, is_system_defined)
|
||||
SELECT 'SavingsProductAccountType', TRUE
|
||||
WHERE NOT EXISTS (SELECT 1 FROM m_code WHERE code_name = 'SavingsProductAccountType');
|
||||
|
||||
INSERT INTO m_code_value (code_id, code_value, order_position, code_description, is_active, is_mandatory)
|
||||
SELECT c.id, 'Savings Account Minor', 1, 'Savings Account Minor', TRUE, FALSE
|
||||
FROM m_code c
|
||||
WHERE c.code_name = 'SavingsProductAccountType'
|
||||
AND NOT EXISTS (
|
||||
SELECT 1 FROM m_code_value cv
|
||||
WHERE cv.code_id = c.id AND cv.code_value = 'Savings Account Minor'
|
||||
);
|
||||
|
||||
INSERT INTO m_code_value (code_id, code_value, order_position, code_description, is_active, is_mandatory)
|
||||
SELECT c.id, 'Small Saving Account', 2, 'Small Saving Account', TRUE, FALSE
|
||||
FROM m_code c
|
||||
WHERE c.code_name = 'SavingsProductAccountType'
|
||||
AND NOT EXISTS (
|
||||
SELECT 1 FROM m_code_value cv
|
||||
WHERE cv.code_id = c.id AND cv.code_value = 'Small Saving Account'
|
||||
);
|
||||
|
||||
INSERT INTO m_code_value (code_id, code_value, order_position, code_description, is_active, is_mandatory)
|
||||
SELECT c.id, 'Savings HUF', 3, 'Savings HUF', TRUE, FALSE
|
||||
FROM m_code c
|
||||
WHERE c.code_name = 'SavingsProductAccountType'
|
||||
AND NOT EXISTS (
|
||||
SELECT 1 FROM m_code_value cv
|
||||
WHERE cv.code_id = c.id AND cv.code_value = 'Savings HUF'
|
||||
);
|
||||
</sql>
|
||||
</changeSet>
|
||||
|
||||
<changeSet author="fineract" id="2005-4-savings-product-customer-segment-values">
|
||||
<sql>
|
||||
INSERT INTO m_code (code_name, is_system_defined)
|
||||
SELECT 'SavingsProductCustomerSegment', TRUE
|
||||
WHERE NOT EXISTS (SELECT 1 FROM m_code WHERE code_name = 'SavingsProductCustomerSegment');
|
||||
|
||||
INSERT INTO m_code_value (code_id, code_value, order_position, code_description, is_active, is_mandatory)
|
||||
SELECT c.id, 'Individual', 1, 'Individual', TRUE, FALSE
|
||||
FROM m_code c
|
||||
WHERE c.code_name = 'SavingsProductCustomerSegment'
|
||||
AND NOT EXISTS (
|
||||
SELECT 1 FROM m_code_value cv
|
||||
WHERE cv.code_id = c.id AND cv.code_value = 'Individual'
|
||||
);
|
||||
|
||||
INSERT INTO m_code_value (code_id, code_value, order_position, code_description, is_active, is_mandatory)
|
||||
SELECT c.id, 'Corporate', 2, 'Corporate', TRUE, FALSE
|
||||
FROM m_code c
|
||||
WHERE c.code_name = 'SavingsProductCustomerSegment'
|
||||
AND NOT EXISTS (
|
||||
SELECT 1 FROM m_code_value cv
|
||||
WHERE cv.code_id = c.id AND cv.code_value = 'Corporate'
|
||||
);
|
||||
</sql>
|
||||
</changeSet>
|
||||
|
||||
<changeSet author="fineract" id="2005-5-savings-product-classification-seed-upsert">
|
||||
<comment>
|
||||
Recover older databases where the original changesets may have been marked ran before the data was inserted.
|
||||
This keeps the seed idempotent for both fresh and existing tenants.
|
||||
</comment>
|
||||
<sql>
|
||||
INSERT INTO m_code (code_name, is_system_defined)
|
||||
SELECT 'SavingsProductAccountType', TRUE
|
||||
WHERE NOT EXISTS (SELECT 1 FROM m_code WHERE code_name = 'SavingsProductAccountType');
|
||||
|
||||
INSERT INTO m_code (code_name, is_system_defined)
|
||||
SELECT 'SavingsProductCustomerSegment', TRUE
|
||||
WHERE NOT EXISTS (SELECT 1 FROM m_code WHERE code_name = 'SavingsProductCustomerSegment');
|
||||
|
||||
INSERT INTO m_code_value (code_id, code_value, order_position, code_description, is_active, is_mandatory)
|
||||
SELECT c.id, 'Savings Account Minor', 1, 'Savings Account Minor', TRUE, FALSE
|
||||
FROM m_code c
|
||||
WHERE c.code_name = 'SavingsProductAccountType'
|
||||
AND NOT EXISTS (
|
||||
SELECT 1 FROM m_code_value cv
|
||||
WHERE cv.code_id = c.id AND cv.code_value = 'Savings Account Minor'
|
||||
);
|
||||
|
||||
INSERT INTO m_code_value (code_id, code_value, order_position, code_description, is_active, is_mandatory)
|
||||
SELECT c.id, 'Small Saving Account', 2, 'Small Saving Account', TRUE, FALSE
|
||||
FROM m_code c
|
||||
WHERE c.code_name = 'SavingsProductAccountType'
|
||||
AND NOT EXISTS (
|
||||
SELECT 1 FROM m_code_value cv
|
||||
WHERE cv.code_id = c.id AND cv.code_value = 'Small Saving Account'
|
||||
);
|
||||
|
||||
INSERT INTO m_code_value (code_id, code_value, order_position, code_description, is_active, is_mandatory)
|
||||
SELECT c.id, 'Savings HUF', 3, 'Savings HUF', TRUE, FALSE
|
||||
FROM m_code c
|
||||
WHERE c.code_name = 'SavingsProductAccountType'
|
||||
AND NOT EXISTS (
|
||||
SELECT 1 FROM m_code_value cv
|
||||
WHERE cv.code_id = c.id AND cv.code_value = 'Savings HUF'
|
||||
);
|
||||
|
||||
INSERT INTO m_code_value (code_id, code_value, order_position, code_description, is_active, is_mandatory)
|
||||
SELECT c.id, 'Individual', 1, 'Individual', TRUE, FALSE
|
||||
FROM m_code c
|
||||
WHERE c.code_name = 'SavingsProductCustomerSegment'
|
||||
AND NOT EXISTS (
|
||||
SELECT 1 FROM m_code_value cv
|
||||
WHERE cv.code_id = c.id AND cv.code_value = 'Individual'
|
||||
);
|
||||
|
||||
INSERT INTO m_code_value (code_id, code_value, order_position, code_description, is_active, is_mandatory)
|
||||
SELECT c.id, 'Corporate', 2, 'Corporate', TRUE, FALSE
|
||||
FROM m_code c
|
||||
WHERE c.code_name = 'SavingsProductCustomerSegment'
|
||||
AND NOT EXISTS (
|
||||
SELECT 1 FROM m_code_value cv
|
||||
WHERE cv.code_id = c.id AND cv.code_value = 'Corporate'
|
||||
);
|
||||
</sql>
|
||||
</changeSet>
|
||||
</databaseChangeLog>
|
||||
+68
@@ -0,0 +1,68 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
|
||||
-->
|
||||
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.3.xsd">
|
||||
<changeSet author="fineract" id="2006-period-frequency-code">
|
||||
<sql>
|
||||
INSERT INTO m_code (code_name, is_system_defined)
|
||||
SELECT 'PeriodFrequency', TRUE
|
||||
WHERE NOT EXISTS (SELECT 1 FROM m_code WHERE code_name = 'PeriodFrequency');
|
||||
|
||||
INSERT INTO m_code_value (code_id, code_value, order_position, code_description, is_active, is_mandatory)
|
||||
SELECT c.id, 'Monthly', 1, 'Monthly', TRUE, FALSE
|
||||
FROM m_code c
|
||||
WHERE c.code_name = 'PeriodFrequency'
|
||||
AND NOT EXISTS (
|
||||
SELECT 1 FROM m_code_value cv
|
||||
WHERE cv.code_id = c.id AND cv.code_value = 'Monthly'
|
||||
);
|
||||
|
||||
INSERT INTO m_code_value (code_id, code_value, order_position, code_description, is_active, is_mandatory)
|
||||
SELECT c.id, 'Quarterly', 2, 'Quarterly', TRUE, FALSE
|
||||
FROM m_code c
|
||||
WHERE c.code_name = 'PeriodFrequency'
|
||||
AND NOT EXISTS (
|
||||
SELECT 1 FROM m_code_value cv
|
||||
WHERE cv.code_id = c.id AND cv.code_value = 'Quarterly'
|
||||
);
|
||||
|
||||
INSERT INTO m_code_value (code_id, code_value, order_position, code_description, is_active, is_mandatory)
|
||||
SELECT c.id, 'Half Yearly', 3, 'Half Yearly', TRUE, FALSE
|
||||
FROM m_code c
|
||||
WHERE c.code_name = 'PeriodFrequency'
|
||||
AND NOT EXISTS (
|
||||
SELECT 1 FROM m_code_value cv
|
||||
WHERE cv.code_id = c.id AND cv.code_value = 'Half Yearly'
|
||||
);
|
||||
|
||||
INSERT INTO m_code_value (code_id, code_value, order_position, code_description, is_active, is_mandatory)
|
||||
SELECT c.id, 'Yearly', 4, 'Yearly', TRUE, FALSE
|
||||
FROM m_code c
|
||||
WHERE c.code_name = 'PeriodFrequency'
|
||||
AND NOT EXISTS (
|
||||
SELECT 1 FROM m_code_value cv
|
||||
WHERE cv.code_id = c.id AND cv.code_value = 'Yearly'
|
||||
);
|
||||
</sql>
|
||||
</changeSet>
|
||||
</databaseChangeLog>
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
|
||||
-->
|
||||
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.3.xsd">
|
||||
<changeSet author="fineract" id="2007-interest-calculation-type-option">
|
||||
<sql>
|
||||
INSERT INTO m_code (code_name, is_system_defined)
|
||||
SELECT 'InterestCalculationTypeOption', TRUE
|
||||
WHERE NOT EXISTS (SELECT 1 FROM m_code WHERE code_name = 'InterestCalculationTypeOption');
|
||||
|
||||
INSERT INTO m_code_value (code_id, code_value, order_position, code_description, is_active, is_mandatory)
|
||||
SELECT c.id, 'Compounding', 1, 'Compounding', TRUE, FALSE
|
||||
FROM m_code c
|
||||
WHERE c.code_name = 'InterestCalculationTypeOption'
|
||||
AND NOT EXISTS (
|
||||
SELECT 1 FROM m_code_value cv
|
||||
WHERE cv.code_id = c.id AND cv.code_value = 'Compounding'
|
||||
);
|
||||
|
||||
INSERT INTO m_code_value (code_id, code_value, order_position, code_description, is_active, is_mandatory)
|
||||
SELECT c.id, 'Accrual', 2, 'Accrual', TRUE, FALSE
|
||||
FROM m_code c
|
||||
WHERE c.code_name = 'InterestCalculationTypeOption'
|
||||
AND NOT EXISTS (
|
||||
SELECT 1 FROM m_code_value cv
|
||||
WHERE cv.code_id = c.id AND cv.code_value = 'Accrual'
|
||||
);
|
||||
</sql>
|
||||
</changeSet>
|
||||
</databaseChangeLog>
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. This file is licensed under the Apache License, Version 2.0.
|
||||
|
||||
-->
|
||||
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.3.xsd">
|
||||
<changeSet author="fineract" id="2008-add-other-gl-mappings-to-savings-product">
|
||||
<addColumn tableName="m_savings_product">
|
||||
<column name="other_gl_mappings" type="LONGTEXT"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
</databaseChangeLog>
|
||||
+3
@@ -109,6 +109,9 @@
|
||||
<class>org.apache.fineract.portfolio.savings.domain.SavingsAccountTransactionTaxDetails</class>
|
||||
<class>org.apache.fineract.portfolio.savings.domain.SavingsOfficerAssignmentHistory</class>
|
||||
<class>org.apache.fineract.portfolio.savings.domain.SavingsProduct</class>
|
||||
<class>org.apache.fineract.portfolio.savings.domain.SavingsProductDepositLimitKyc</class>
|
||||
<class>org.apache.fineract.portfolio.savings.domain.SavingsProductFacilityConfig</class>
|
||||
<class>org.apache.fineract.portfolio.savings.domain.SavingsProductFacilityLimit</class>
|
||||
|
||||
<!-- Charge Module Entities -->
|
||||
<class>org.apache.fineract.portfolio.charge.domain.Charge</class>
|
||||
|
||||
Reference in New Issue
Block a user