Add extended fields to ClientNonPersonDetails: authorizedSignatory, additionalInfo, dateOfRegistration
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
90c21d40c1
commit
87e132f93d
@@ -652,6 +652,8 @@ fineract.kyc.lincpay.path.aadhaar-generate-otp=${FINERACT_KYC_LINCPAY_PATH_AADHA
|
||||
fineract.kyc.lincpay.path.aadhaar-verify-otp=${FINERACT_KYC_LINCPAY_PATH_AADHAAR_VERIFY_OTP:/aadhaar/verify-otp}
|
||||
fineract.kyc.lincpay.path.pan-validate=${FINERACT_KYC_LINCPAY_PATH_PAN_VALIDATE:/validate-pan}
|
||||
fineract.kyc.lincpay.path.gstin-validate=${FINERACT_KYC_LINCPAY_PATH_GSTIN_VALIDATE:/validate-gstn}
|
||||
fineract.kyc.lincpay.path.cin-validate=${FINERACT_KYC_LINCPAY_PATH_CIN_VALIDATE:/validate-company}
|
||||
fineract.kyc.lincpay.path.din-validate=${FINERACT_KYC_LINCPAY_PATH_DIN_VALIDATE:/validate-director}
|
||||
|
||||
# ── OpenProject Integration ──────────────────────────────────────────────────
|
||||
# Set FINERACT_OPENPROJECT_API_TOKEN as env var in production.
|
||||
|
||||
@@ -247,4 +247,25 @@
|
||||
<include file="parts/0226_add_cfcfrms_tables.xml" relativeToChangelogFile="true"/>
|
||||
<include file="parts/0227_add_client_cif_number.xml" relativeToChangelogFile="true"/>
|
||||
<include file="parts/0228_add_occupation_fields.xml" relativeToChangelogFile="true"/>
|
||||
<include file="parts/0229_add_salutation_field.xml" relativeToChangelogFile="true"/>
|
||||
<include file="parts/0230_add_client_form60.xml" relativeToChangelogFile="true"/>
|
||||
<include file="parts/0231_add_menu_permissions.xml" relativeToChangelogFile="true"/>
|
||||
<include file="parts/0232_add_pan_name_fields.xml" relativeToChangelogFile="true"/>
|
||||
<include file="parts/0233_auto_verify_kyc_status.xml" relativeToChangelogFile="true"/>
|
||||
<include file="parts/0234_add_monthly_income.xml" relativeToChangelogFile="true"/>
|
||||
<include file="parts/0235_add_form60_purpose_code.xml" relativeToChangelogFile="true"/>
|
||||
<include file="parts/0236_add_marital_status.xml" relativeToChangelogFile="true"/>
|
||||
<include file="parts/0237_extend_family_members.xml" relativeToChangelogFile="true"/>
|
||||
<include file="parts/0238_add_annual_turnover.xml" relativeToChangelogFile="true"/>
|
||||
<include file="parts/0239_add_minor_guardian_nationality.xml" relativeToChangelogFile="true"/>
|
||||
<include file="parts/0240_add_entity_classification_tables.xml" relativeToChangelogFile="true"/>
|
||||
<include file="parts/0241_add_client_nominee_table.xml" relativeToChangelogFile="true"/>
|
||||
<include file="parts/0242_add_marriage_authority.xml" relativeToChangelogFile="true"/>
|
||||
<include file="parts/0243_add_nominee_identifier.xml" relativeToChangelogFile="true"/>
|
||||
<include file="parts/0244_add_alternate_mobile.xml" relativeToChangelogFile="true"/>
|
||||
<include file="parts/0245_add_address_client_fk_and_types.xml" relativeToChangelogFile="true"/>
|
||||
<include file="parts/0246_add_kyc_extended_fields.xml" relativeToChangelogFile="true"/>
|
||||
<include file="parts/0247_add_huf_client_classification.xml" relativeToChangelogFile="true"/>
|
||||
<include file="parts/0248_add_cin_din_verification_fields.xml" relativeToChangelogFile="true"/>
|
||||
<include file="parts/0249_add_non_person_extended_fields.xml" relativeToChangelogFile="true"/>
|
||||
</databaseChangeLog>
|
||||
|
||||
+12
-12
@@ -39,7 +39,7 @@
|
||||
<!-- ═══════════════════════════════════════════════════════════════════════
|
||||
MySQL – m_cfcfrms_complaint_ticket
|
||||
═══════════════════════════════════════════════════════════════════ -->
|
||||
<changeSet author="fineract" id="1" context="mysql">
|
||||
<changeSet author="fineract" id="0226-1" context="mysql">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><tableExists tableName="m_cfcfrms_complaint_ticket"/></not>
|
||||
</preConditions>
|
||||
@@ -110,7 +110,7 @@
|
||||
</changeSet>
|
||||
|
||||
<!-- PostgreSQL – m_cfcfrms_complaint_ticket -->
|
||||
<changeSet author="fineract" id="1" context="postgresql">
|
||||
<changeSet author="fineract" id="0226-2" context="postgresql">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><tableExists tableName="m_cfcfrms_complaint_ticket"/></not>
|
||||
</preConditions>
|
||||
@@ -183,7 +183,7 @@
|
||||
<!-- ═══════════════════════════════════════════════════════════════════════
|
||||
MySQL – m_cfcfrms_complaint_audit_log
|
||||
═══════════════════════════════════════════════════════════════════ -->
|
||||
<changeSet author="fineract" id="2" context="mysql">
|
||||
<changeSet author="fineract" id="0226-3" context="mysql">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><tableExists tableName="m_cfcfrms_complaint_audit_log"/></not>
|
||||
</preConditions>
|
||||
@@ -220,7 +220,7 @@
|
||||
</changeSet>
|
||||
|
||||
<!-- PostgreSQL – m_cfcfrms_complaint_audit_log -->
|
||||
<changeSet author="fineract" id="2" context="postgresql">
|
||||
<changeSet author="fineract" id="0226-4" context="postgresql">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><tableExists tableName="m_cfcfrms_complaint_audit_log"/></not>
|
||||
</preConditions>
|
||||
@@ -259,7 +259,7 @@
|
||||
<!-- ═══════════════════════════════════════════════════════════════════════
|
||||
MySQL – m_cfcfrms_simulator_log
|
||||
═══════════════════════════════════════════════════════════════════ -->
|
||||
<changeSet author="fineract" id="3" context="mysql">
|
||||
<changeSet author="fineract" id="0226-5" context="mysql">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><tableExists tableName="m_cfcfrms_simulator_log"/></not>
|
||||
</preConditions>
|
||||
@@ -299,7 +299,7 @@
|
||||
</changeSet>
|
||||
|
||||
<!-- PostgreSQL – m_cfcfrms_simulator_log -->
|
||||
<changeSet author="fineract" id="3" context="postgresql">
|
||||
<changeSet author="fineract" id="0226-6" context="postgresql">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><tableExists tableName="m_cfcfrms_simulator_log"/></not>
|
||||
</preConditions>
|
||||
@@ -339,7 +339,7 @@
|
||||
</changeSet>
|
||||
|
||||
<!-- Indexes -->
|
||||
<changeSet author="fineract" id="4">
|
||||
<changeSet author="fineract" id="0226-7">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><indexExists indexName="idx_cfcfrms_ticket_id"/></not>
|
||||
</preConditions>
|
||||
@@ -348,7 +348,7 @@
|
||||
</createIndex>
|
||||
</changeSet>
|
||||
|
||||
<changeSet author="fineract" id="5">
|
||||
<changeSet author="fineract" id="0226-8">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><indexExists indexName="idx_cfcfrms_ticket_status"/></not>
|
||||
</preConditions>
|
||||
@@ -357,7 +357,7 @@
|
||||
</createIndex>
|
||||
</changeSet>
|
||||
|
||||
<changeSet author="fineract" id="6">
|
||||
<changeSet author="fineract" id="0226-9">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><indexExists indexName="idx_cfcfrms_fraud_account"/></not>
|
||||
</preConditions>
|
||||
@@ -366,7 +366,7 @@
|
||||
</createIndex>
|
||||
</changeSet>
|
||||
|
||||
<changeSet author="fineract" id="7">
|
||||
<changeSet author="fineract" id="0226-10">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><indexExists indexName="idx_cfcfrms_audit_ticket_id"/></not>
|
||||
</preConditions>
|
||||
@@ -375,7 +375,7 @@
|
||||
</createIndex>
|
||||
</changeSet>
|
||||
|
||||
<changeSet author="fineract" id="8">
|
||||
<changeSet author="fineract" id="0226-11">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><indexExists indexName="idx_cfcfrms_sim_ref"/></not>
|
||||
</preConditions>
|
||||
@@ -387,7 +387,7 @@
|
||||
<!-- ═══════════════════════════════════════════════════════════════════════
|
||||
Permissions
|
||||
═══════════════════════════════════════════════════════════════════ -->
|
||||
<changeSet author="fineract" id="9">
|
||||
<changeSet author="fineract" id="0226-12">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">
|
||||
SELECT COUNT(*) FROM m_permission WHERE code = 'READ_CFCFRMS'
|
||||
|
||||
+78
@@ -0,0 +1,78 @@
|
||||
<?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.13.xsd">
|
||||
|
||||
<!-- ==================== Add Salutation code ==================== -->
|
||||
<changeSet author="fineract" id="0229-1">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">SELECT COUNT(*) FROM m_code WHERE code_name = 'Salutation'</sqlCheck>
|
||||
</preConditions>
|
||||
<insert tableName="m_code">
|
||||
<column name="code_name" value="Salutation"/>
|
||||
<column name="is_system_defined" valueBoolean="true"/>
|
||||
</insert>
|
||||
</changeSet>
|
||||
|
||||
<changeSet author="fineract" id="0229-2">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">SELECT COUNT(*) FROM m_code_value WHERE code_id = (SELECT id FROM m_code WHERE code_name = 'Salutation')</sqlCheck>
|
||||
</preConditions>
|
||||
<sql>
|
||||
INSERT INTO m_code_value (code_id, code_value, order_position, is_active, is_mandatory)
|
||||
SELECT id, val, pos, true, false FROM m_code
|
||||
CROSS JOIN (VALUES
|
||||
('Mr.', 1),
|
||||
('Mrs.', 2),
|
||||
('Ms.', 3),
|
||||
('Miss', 4),
|
||||
('Dr.', 5),
|
||||
('Shri', 6),
|
||||
('Smt.', 7)
|
||||
) AS t(val, pos)
|
||||
WHERE code_name = 'Salutation';
|
||||
</sql>
|
||||
</changeSet>
|
||||
|
||||
<!-- ==================== Add salutation_cv_id column to m_client ==================== -->
|
||||
<changeSet author="fineract" id="0229-3">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_client" columnName="salutation_cv_id"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_client">
|
||||
<column name="salutation_cv_id" type="BIGINT">
|
||||
<constraints nullable="true" />
|
||||
</column>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<changeSet author="fineract" id="0229-4">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><foreignKeyConstraintExists foreignKeyName="FK_m_client_salutation_cv_id"/></not>
|
||||
</preConditions>
|
||||
<addForeignKeyConstraint baseTableName="m_client" baseColumnNames="salutation_cv_id"
|
||||
referencedTableName="m_code_value" referencedColumnNames="id"
|
||||
constraintName="FK_m_client_salutation_cv_id" />
|
||||
</changeSet>
|
||||
|
||||
</databaseChangeLog>
|
||||
+85
@@ -0,0 +1,85 @@
|
||||
<?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.13.xsd">
|
||||
|
||||
<!-- ==================== Create m_client_form60 table ==================== -->
|
||||
<changeSet author="fineract" id="0230-1">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><tableExists tableName="m_client_form60"/></not>
|
||||
</preConditions>
|
||||
<createTable tableName="m_client_form60">
|
||||
<column name="id" type="BIGINT" autoIncrement="true">
|
||||
<constraints primaryKey="true" nullable="false"/>
|
||||
</column>
|
||||
<column name="client_id" type="BIGINT">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="full_name" type="VARCHAR(200)">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="date_of_birth" type="DATE"/>
|
||||
<column name="father_name" type="VARCHAR(200)"/>
|
||||
<column name="address" type="VARCHAR(500)"/>
|
||||
<column name="transaction_type" type="VARCHAR(100)">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="transaction_amount" type="DECIMAL(19,6)"/>
|
||||
<column name="estimated_total_income" type="DECIMAL(19,6)"/>
|
||||
<column name="reason_for_no_pan" type="VARCHAR(200)"/>
|
||||
<column name="declaration" type="BOOLEAN" defaultValueBoolean="false">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="submitted_on" type="DATE"/>
|
||||
<column name="created_by" type="BIGINT"/>
|
||||
<column name="created_on_utc" type="TIMESTAMP"/>
|
||||
<column name="last_modified_by" type="BIGINT"/>
|
||||
<column name="last_modified_on_utc" type="TIMESTAMP"/>
|
||||
</createTable>
|
||||
<addForeignKeyConstraint baseTableName="m_client_form60" baseColumnNames="client_id"
|
||||
referencedTableName="m_client" referencedColumnNames="id"
|
||||
constraintName="FK_m_client_form60_client_id"/>
|
||||
</changeSet>
|
||||
|
||||
<!-- ==================== Add permissions ==================== -->
|
||||
<changeSet author="fineract" id="0230-2">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">SELECT COUNT(*) FROM m_permission WHERE code = 'CREATE_CLIENTFORM60'</sqlCheck>
|
||||
</preConditions>
|
||||
<insert tableName="m_permission">
|
||||
<column name="grouping" value="portfolio"/>
|
||||
<column name="code" value="CREATE_CLIENTFORM60"/>
|
||||
<column name="entity_name" value="CLIENTFORM60"/>
|
||||
<column name="action_name" value="CREATE"/>
|
||||
<column name="can_maker_checker" valueBoolean="false"/>
|
||||
</insert>
|
||||
<insert tableName="m_permission">
|
||||
<column name="grouping" value="portfolio"/>
|
||||
<column name="code" value="READ_CLIENTFORM60"/>
|
||||
<column name="entity_name" value="CLIENTFORM60"/>
|
||||
<column name="action_name" value="READ"/>
|
||||
<column name="can_maker_checker" valueBoolean="false"/>
|
||||
</insert>
|
||||
</changeSet>
|
||||
|
||||
</databaseChangeLog>
|
||||
+304
@@ -0,0 +1,304 @@
|
||||
<?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.13.xsd">
|
||||
|
||||
<!-- ==================== Heading Menu Permissions (Top Nav Bar) ==================== -->
|
||||
<changeSet author="fineract" id="0231-1">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">SELECT COUNT(*) FROM m_permission WHERE code = 'MENU_INSTITUTION'</sqlCheck>
|
||||
</preConditions>
|
||||
|
||||
<!-- Row 1 — 11 items -->
|
||||
<insert tableName="m_permission">
|
||||
<column name="grouping" value="heading_menu"/>
|
||||
<column name="code" value="MENU_INSTITUTION"/>
|
||||
<column name="entity_name" value="MENU"/>
|
||||
<column name="action_name" value="INSTITUTION"/>
|
||||
<column name="can_maker_checker" valueBoolean="false"/>
|
||||
</insert>
|
||||
<insert tableName="m_permission">
|
||||
<column name="grouping" value="heading_menu"/>
|
||||
<column name="code" value="MENU_TASKS"/>
|
||||
<column name="entity_name" value="MENU"/>
|
||||
<column name="action_name" value="TASKS"/>
|
||||
<column name="can_maker_checker" valueBoolean="false"/>
|
||||
</insert>
|
||||
<insert tableName="m_permission">
|
||||
<column name="grouping" value="heading_menu"/>
|
||||
<column name="code" value="MENU_ACCOUNTING"/>
|
||||
<column name="entity_name" value="MENU"/>
|
||||
<column name="action_name" value="ACCOUNTING"/>
|
||||
<column name="can_maker_checker" valueBoolean="false"/>
|
||||
</insert>
|
||||
<insert tableName="m_permission">
|
||||
<column name="grouping" value="heading_menu"/>
|
||||
<column name="code" value="MENU_REPORTS"/>
|
||||
<column name="entity_name" value="MENU"/>
|
||||
<column name="action_name" value="REPORTS"/>
|
||||
<column name="can_maker_checker" valueBoolean="false"/>
|
||||
</insert>
|
||||
<insert tableName="m_permission">
|
||||
<column name="grouping" value="heading_menu"/>
|
||||
<column name="code" value="MENU_ADMIN"/>
|
||||
<column name="entity_name" value="MENU"/>
|
||||
<column name="action_name" value="ADMIN"/>
|
||||
<column name="can_maker_checker" valueBoolean="false"/>
|
||||
</insert>
|
||||
<insert tableName="m_permission">
|
||||
<column name="grouping" value="heading_menu"/>
|
||||
<column name="code" value="MENU_SUB_LEDGER"/>
|
||||
<column name="entity_name" value="MENU"/>
|
||||
<column name="action_name" value="SUB_LEDGER"/>
|
||||
<column name="can_maker_checker" valueBoolean="false"/>
|
||||
</insert>
|
||||
<insert tableName="m_permission">
|
||||
<column name="grouping" value="heading_menu"/>
|
||||
<column name="code" value="MENU_GENERAL_LEDGER"/>
|
||||
<column name="entity_name" value="MENU"/>
|
||||
<column name="action_name" value="GENERAL_LEDGER"/>
|
||||
<column name="can_maker_checker" valueBoolean="false"/>
|
||||
</insert>
|
||||
<insert tableName="m_permission">
|
||||
<column name="grouping" value="heading_menu"/>
|
||||
<column name="code" value="MENU_CASHIER"/>
|
||||
<column name="entity_name" value="MENU"/>
|
||||
<column name="action_name" value="CASHIER"/>
|
||||
<column name="can_maker_checker" valueBoolean="false"/>
|
||||
</insert>
|
||||
<insert tableName="m_permission">
|
||||
<column name="grouping" value="heading_menu"/>
|
||||
<column name="code" value="MENU_OFFICER"/>
|
||||
<column name="entity_name" value="MENU"/>
|
||||
<column name="action_name" value="OFFICER"/>
|
||||
<column name="can_maker_checker" valueBoolean="false"/>
|
||||
</insert>
|
||||
<insert tableName="m_permission">
|
||||
<column name="grouping" value="heading_menu"/>
|
||||
<column name="code" value="MENU_DEPOSITS"/>
|
||||
<column name="entity_name" value="MENU"/>
|
||||
<column name="action_name" value="DEPOSITS"/>
|
||||
<column name="can_maker_checker" valueBoolean="false"/>
|
||||
</insert>
|
||||
<insert tableName="m_permission">
|
||||
<column name="grouping" value="heading_menu"/>
|
||||
<column name="code" value="MENU_CLEARING"/>
|
||||
<column name="entity_name" value="MENU"/>
|
||||
<column name="action_name" value="CLEARING"/>
|
||||
<column name="can_maker_checker" valueBoolean="false"/>
|
||||
</insert>
|
||||
|
||||
<!-- Row 2 — 11 items -->
|
||||
<insert tableName="m_permission">
|
||||
<column name="grouping" value="heading_menu"/>
|
||||
<column name="code" value="MENU_HRM"/>
|
||||
<column name="entity_name" value="MENU"/>
|
||||
<column name="action_name" value="HRM"/>
|
||||
<column name="can_maker_checker" valueBoolean="false"/>
|
||||
</insert>
|
||||
<insert tableName="m_permission">
|
||||
<column name="grouping" value="heading_menu"/>
|
||||
<column name="code" value="MENU_SHARE"/>
|
||||
<column name="entity_name" value="MENU"/>
|
||||
<column name="action_name" value="SHARE"/>
|
||||
<column name="can_maker_checker" valueBoolean="false"/>
|
||||
</insert>
|
||||
<insert tableName="m_permission">
|
||||
<column name="grouping" value="heading_menu"/>
|
||||
<column name="code" value="MENU_OTHERS"/>
|
||||
<column name="entity_name" value="MENU"/>
|
||||
<column name="action_name" value="OTHERS"/>
|
||||
<column name="can_maker_checker" valueBoolean="false"/>
|
||||
</insert>
|
||||
<insert tableName="m_permission">
|
||||
<column name="grouping" value="heading_menu"/>
|
||||
<column name="code" value="MENU_NPA"/>
|
||||
<column name="entity_name" value="MENU"/>
|
||||
<column name="action_name" value="NPA"/>
|
||||
<column name="can_maker_checker" valueBoolean="false"/>
|
||||
</insert>
|
||||
<insert tableName="m_permission">
|
||||
<column name="grouping" value="heading_menu"/>
|
||||
<column name="code" value="MENU_ADVANCES"/>
|
||||
<column name="entity_name" value="MENU"/>
|
||||
<column name="action_name" value="ADVANCES"/>
|
||||
<column name="can_maker_checker" valueBoolean="false"/>
|
||||
</insert>
|
||||
<insert tableName="m_permission">
|
||||
<column name="grouping" value="heading_menu"/>
|
||||
<column name="code" value="MENU_INSURANCE"/>
|
||||
<column name="entity_name" value="MENU"/>
|
||||
<column name="action_name" value="INSURANCE"/>
|
||||
<column name="can_maker_checker" valueBoolean="false"/>
|
||||
</insert>
|
||||
<insert tableName="m_permission">
|
||||
<column name="grouping" value="heading_menu"/>
|
||||
<column name="code" value="MENU_RBI"/>
|
||||
<column name="entity_name" value="MENU"/>
|
||||
<column name="action_name" value="RBI"/>
|
||||
<column name="can_maker_checker" valueBoolean="false"/>
|
||||
</insert>
|
||||
<insert tableName="m_permission">
|
||||
<column name="grouping" value="heading_menu"/>
|
||||
<column name="code" value="MENU_DIGITAL"/>
|
||||
<column name="entity_name" value="MENU"/>
|
||||
<column name="action_name" value="DIGITAL"/>
|
||||
<column name="can_maker_checker" valueBoolean="false"/>
|
||||
</insert>
|
||||
<insert tableName="m_permission">
|
||||
<column name="grouping" value="heading_menu"/>
|
||||
<column name="code" value="MENU_CONFIG_WIZARD"/>
|
||||
<column name="entity_name" value="MENU"/>
|
||||
<column name="action_name" value="CONFIG_WIZARD"/>
|
||||
<column name="can_maker_checker" valueBoolean="false"/>
|
||||
</insert>
|
||||
<insert tableName="m_permission">
|
||||
<column name="grouping" value="heading_menu"/>
|
||||
<column name="code" value="MENU_CKYC_MGMT"/>
|
||||
<column name="entity_name" value="MENU"/>
|
||||
<column name="action_name" value="CKYC_MGMT"/>
|
||||
<column name="can_maker_checker" valueBoolean="false"/>
|
||||
</insert>
|
||||
<insert tableName="m_permission">
|
||||
<column name="grouping" value="heading_menu"/>
|
||||
<column name="code" value="MENU_LETTER_MGMT"/>
|
||||
<column name="entity_name" value="MENU"/>
|
||||
<column name="action_name" value="LETTER_MGMT"/>
|
||||
<column name="can_maker_checker" valueBoolean="false"/>
|
||||
</insert>
|
||||
</changeSet>
|
||||
|
||||
<!-- ==================== Left Panel Menu Permissions (Sidebar) ==================== -->
|
||||
<changeSet author="fineract" id="0231-2">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">SELECT COUNT(*) FROM m_permission WHERE code = 'SIDEBAR_DASHBOARD'</sqlCheck>
|
||||
</preConditions>
|
||||
|
||||
<insert tableName="m_permission">
|
||||
<column name="grouping" value="sidebar_menu"/>
|
||||
<column name="code" value="SIDEBAR_DASHBOARD"/>
|
||||
<column name="entity_name" value="SIDEBAR"/>
|
||||
<column name="action_name" value="DASHBOARD"/>
|
||||
<column name="can_maker_checker" valueBoolean="false"/>
|
||||
</insert>
|
||||
<insert tableName="m_permission">
|
||||
<column name="grouping" value="sidebar_menu"/>
|
||||
<column name="code" value="SIDEBAR_NAVIGATION"/>
|
||||
<column name="entity_name" value="SIDEBAR"/>
|
||||
<column name="action_name" value="NAVIGATION"/>
|
||||
<column name="can_maker_checker" valueBoolean="false"/>
|
||||
</insert>
|
||||
<insert tableName="m_permission">
|
||||
<column name="grouping" value="sidebar_menu"/>
|
||||
<column name="code" value="SIDEBAR_CKYC"/>
|
||||
<column name="entity_name" value="SIDEBAR"/>
|
||||
<column name="action_name" value="CKYC"/>
|
||||
<column name="can_maker_checker" valueBoolean="false"/>
|
||||
</insert>
|
||||
<insert tableName="m_permission">
|
||||
<column name="grouping" value="sidebar_menu"/>
|
||||
<column name="code" value="SIDEBAR_CALENDAR"/>
|
||||
<column name="entity_name" value="SIDEBAR"/>
|
||||
<column name="action_name" value="CALENDAR"/>
|
||||
<column name="can_maker_checker" valueBoolean="false"/>
|
||||
</insert>
|
||||
<insert tableName="m_permission">
|
||||
<column name="grouping" value="sidebar_menu"/>
|
||||
<column name="code" value="SIDEBAR_CHECKER_INBOX"/>
|
||||
<column name="entity_name" value="SIDEBAR"/>
|
||||
<column name="action_name" value="CHECKER_INBOX"/>
|
||||
<column name="can_maker_checker" valueBoolean="false"/>
|
||||
</insert>
|
||||
<insert tableName="m_permission">
|
||||
<column name="grouping" value="sidebar_menu"/>
|
||||
<column name="code" value="SIDEBAR_COLLECTION_SHEET"/>
|
||||
<column name="entity_name" value="SIDEBAR"/>
|
||||
<column name="action_name" value="COLLECTION_SHEET"/>
|
||||
<column name="can_maker_checker" valueBoolean="false"/>
|
||||
</insert>
|
||||
<insert tableName="m_permission">
|
||||
<column name="grouping" value="sidebar_menu"/>
|
||||
<column name="code" value="SIDEBAR_REMITTANCES"/>
|
||||
<column name="entity_name" value="SIDEBAR"/>
|
||||
<column name="action_name" value="REMITTANCES"/>
|
||||
<column name="can_maker_checker" valueBoolean="false"/>
|
||||
</insert>
|
||||
<insert tableName="m_permission">
|
||||
<column name="grouping" value="sidebar_menu"/>
|
||||
<column name="code" value="SIDEBAR_ANALYTICS"/>
|
||||
<column name="entity_name" value="SIDEBAR"/>
|
||||
<column name="action_name" value="ANALYTICS"/>
|
||||
<column name="can_maker_checker" valueBoolean="false"/>
|
||||
</insert>
|
||||
<insert tableName="m_permission">
|
||||
<column name="grouping" value="sidebar_menu"/>
|
||||
<column name="code" value="SIDEBAR_CFCFRMS"/>
|
||||
<column name="entity_name" value="SIDEBAR"/>
|
||||
<column name="action_name" value="CFCFRMS"/>
|
||||
<column name="can_maker_checker" valueBoolean="false"/>
|
||||
</insert>
|
||||
<insert tableName="m_permission">
|
||||
<column name="grouping" value="sidebar_menu"/>
|
||||
<column name="code" value="SIDEBAR_RBI_INTEGRATION"/>
|
||||
<column name="entity_name" value="SIDEBAR"/>
|
||||
<column name="action_name" value="RBI_INTEGRATION"/>
|
||||
<column name="can_maker_checker" valueBoolean="false"/>
|
||||
</insert>
|
||||
<insert tableName="m_permission">
|
||||
<column name="grouping" value="sidebar_menu"/>
|
||||
<column name="code" value="SIDEBAR_RBI_CIRCULARS"/>
|
||||
<column name="entity_name" value="SIDEBAR"/>
|
||||
<column name="action_name" value="RBI_CIRCULARS"/>
|
||||
<column name="can_maker_checker" valueBoolean="false"/>
|
||||
</insert>
|
||||
<insert tableName="m_permission">
|
||||
<column name="grouping" value="sidebar_menu"/>
|
||||
<column name="code" value="SIDEBAR_NOTIFICATIONS"/>
|
||||
<column name="entity_name" value="SIDEBAR"/>
|
||||
<column name="action_name" value="NOTIFICATIONS"/>
|
||||
<column name="can_maker_checker" valueBoolean="false"/>
|
||||
</insert>
|
||||
<insert tableName="m_permission">
|
||||
<column name="grouping" value="sidebar_menu"/>
|
||||
<column name="code" value="SIDEBAR_FREQUENT_POSTINGS"/>
|
||||
<column name="entity_name" value="SIDEBAR"/>
|
||||
<column name="action_name" value="FREQUENT_POSTINGS"/>
|
||||
<column name="can_maker_checker" valueBoolean="false"/>
|
||||
</insert>
|
||||
<insert tableName="m_permission">
|
||||
<column name="grouping" value="sidebar_menu"/>
|
||||
<column name="code" value="SIDEBAR_JOURNAL_ENTRY"/>
|
||||
<column name="entity_name" value="SIDEBAR"/>
|
||||
<column name="action_name" value="JOURNAL_ENTRY"/>
|
||||
<column name="can_maker_checker" valueBoolean="false"/>
|
||||
</insert>
|
||||
<insert tableName="m_permission">
|
||||
<column name="grouping" value="sidebar_menu"/>
|
||||
<column name="code" value="SIDEBAR_CHART_OF_ACCOUNTS"/>
|
||||
<column name="entity_name" value="SIDEBAR"/>
|
||||
<column name="action_name" value="CHART_OF_ACCOUNTS"/>
|
||||
<column name="can_maker_checker" valueBoolean="false"/>
|
||||
</insert>
|
||||
</changeSet>
|
||||
|
||||
</databaseChangeLog>
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
<?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.13.xsd">
|
||||
|
||||
<!-- Add first_name and last_name from PAN verification response -->
|
||||
<changeSet author="fineract" id="0232-1">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_client_kyc" columnName="pan_first_name"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_client_kyc">
|
||||
<column name="pan_first_name" type="VARCHAR(200)"/>
|
||||
<column name="pan_last_name" type="VARCHAR(200)"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
</databaseChangeLog>
|
||||
+55
@@ -0,0 +1,55 @@
|
||||
<?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.13.xsd">
|
||||
|
||||
<!-- Auto-promote KYC status to VERIFIED (300) for Individual clients
|
||||
that already have both PAN and Aadhaar verified -->
|
||||
<changeSet author="fineract" id="0233-1" context="default">
|
||||
<sql>
|
||||
UPDATE m_client_kyc
|
||||
SET kyc_status = 300,
|
||||
verified_on = CURRENT_DATE
|
||||
WHERE kyc_type = 1
|
||||
AND pan_verified = true
|
||||
AND aadhaar_verified = true
|
||||
AND kyc_status != 300
|
||||
AND kyc_status != 400;
|
||||
</sql>
|
||||
</changeSet>
|
||||
|
||||
<!-- Auto-promote KYC status to VERIFIED (300) for Non-Individual clients
|
||||
that already have both PAN and GSTIN verified -->
|
||||
<changeSet author="fineract" id="0233-2" context="default">
|
||||
<sql>
|
||||
UPDATE m_client_kyc
|
||||
SET kyc_status = 300,
|
||||
verified_on = CURRENT_DATE
|
||||
WHERE kyc_type = 2
|
||||
AND pan_verified = true
|
||||
AND gstin_verified = true
|
||||
AND kyc_status != 300
|
||||
AND kyc_status != 400;
|
||||
</sql>
|
||||
</changeSet>
|
||||
|
||||
</databaseChangeLog>
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
<?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.13.xsd">
|
||||
|
||||
<changeSet author="fineract" id="0234-1" context="default">
|
||||
<addColumn tableName="m_client">
|
||||
<column name="monthly_income" type="DECIMAL(19,2)" defaultValue="null">
|
||||
<constraints nullable="true"/>
|
||||
</column>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
</databaseChangeLog>
|
||||
+101
@@ -0,0 +1,101 @@
|
||||
<?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.13.xsd">
|
||||
|
||||
<!-- Create the FORM_60_PURPOSE code -->
|
||||
<changeSet author="fineract" id="0235-1" context="default">
|
||||
<sql>
|
||||
INSERT INTO m_code (code_name, is_system_defined)
|
||||
SELECT 'FORM_60_PURPOSE', false
|
||||
WHERE NOT EXISTS (SELECT 1 FROM m_code WHERE code_name = 'FORM_60_PURPOSE');
|
||||
</sql>
|
||||
</changeSet>
|
||||
|
||||
<!-- Insert all purpose values -->
|
||||
<changeSet author="fineract" id="0235-2" context="default">
|
||||
<sql>
|
||||
INSERT INTO m_code_value (code_id, code_value, order_position, is_active, is_mandatory)
|
||||
SELECT id, v.code_value, v.order_position, true, false
|
||||
FROM m_code,
|
||||
(VALUES
|
||||
('Opening Bank Account', 1),
|
||||
('Cash Deposit in Bank', 2),
|
||||
('Cash Withdrawal from Bank', 3),
|
||||
('Fixed Deposit / Term Deposit', 4),
|
||||
('Recurring Deposit', 5),
|
||||
('Purchase of Bank Draft / Pay Order / Bankers Cheque', 6),
|
||||
('Credit Card Application', 7),
|
||||
('Debit Card Application', 8),
|
||||
('Loan Application', 9),
|
||||
('Personal Loan', 10),
|
||||
('Home Loan', 11),
|
||||
('Vehicle Loan', 12),
|
||||
('Education Loan', 13),
|
||||
('Business Loan', 14),
|
||||
('Agricultural Loan', 15),
|
||||
('Gold Loan - New Loan', 16),
|
||||
('Gold Loan - Renewal', 17),
|
||||
('Gold Loan - Top Up', 18),
|
||||
('Gold Loan - Closure / Settlement', 19),
|
||||
('Gold Loan - Interest Payment', 20),
|
||||
('Gold Loan - Partial Payment', 21),
|
||||
('Gold Loan - Pledge of Gold Jewellery', 22),
|
||||
('Gold Loan - Release of Gold Jewellery', 23),
|
||||
('Loan Against Gold Coins', 24),
|
||||
('Loan Against Gold Ornaments', 25),
|
||||
('Agricultural Gold Loan', 26),
|
||||
('Purchase of Motor Vehicle', 27),
|
||||
('Purchase of Immovable Property', 28),
|
||||
('Sale of Immovable Property', 29),
|
||||
('Purchase of Securities / Shares', 30),
|
||||
('Purchase of Mutual Funds', 31),
|
||||
('Opening Demat Account', 32),
|
||||
('Life Insurance Premium Payment', 33),
|
||||
('Foreign Travel Payment', 34),
|
||||
('Purchase of Foreign Currency / Forex', 35),
|
||||
('Hotel or Restaurant Payment above prescribed limit', 36),
|
||||
('Purchase of Goods or Services above prescribed limit', 37),
|
||||
('Purchase of Gold Jewellery', 38),
|
||||
('Purchase of Gold Coins', 39),
|
||||
('Purchase of Gold Bullion', 40),
|
||||
('Sale of Gold Jewellery', 41),
|
||||
('Sale of Gold Coins', 42),
|
||||
('Sale of Gold Bullion', 43),
|
||||
('Gold Investment Purchase', 44),
|
||||
('Sovereign Gold Bond Purchase', 45),
|
||||
('Gold ETF Investment', 46),
|
||||
('Digital Gold Purchase', 47),
|
||||
('Gold Savings Scheme', 48),
|
||||
('Gold Deposit Scheme', 49),
|
||||
('Investment in Bonds / Debentures', 50),
|
||||
('Opening Post Office Savings Account', 51),
|
||||
('Opening Trading Account', 52),
|
||||
('Large Cash Transaction', 53),
|
||||
('High Value Financial Transaction', 54),
|
||||
('Other Financial Transaction', 55)
|
||||
) AS v(code_value, order_position)
|
||||
WHERE m_code.code_name = 'FORM_60_PURPOSE';
|
||||
</sql>
|
||||
</changeSet>
|
||||
|
||||
</databaseChangeLog>
|
||||
+67
@@ -0,0 +1,67 @@
|
||||
<?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 id="0236_01_insert_marital_status_code" author="fineract">
|
||||
<sql>
|
||||
INSERT INTO m_code (code_name, is_system_defined)
|
||||
SELECT 'MaritalStatus', false
|
||||
WHERE NOT EXISTS (SELECT 1 FROM m_code WHERE code_name = 'MaritalStatus');
|
||||
</sql>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="0236_02_insert_marital_status_values" author="fineract">
|
||||
<sql>
|
||||
INSERT INTO m_code_value (code_id, code_value, order_position, is_active, is_mandatory)
|
||||
SELECT c.id, v.code_value, v.order_position, true, false
|
||||
FROM m_code c
|
||||
CROSS JOIN (
|
||||
VALUES
|
||||
('Single', 1),
|
||||
('Married', 2),
|
||||
('Unmarried', 3),
|
||||
('Divorced', 4),
|
||||
('Widowed', 5),
|
||||
('Separated', 6),
|
||||
('Annulled', 7),
|
||||
('Live-in Relationship', 8),
|
||||
('Other', 9),
|
||||
('Not Disclosed', 10)
|
||||
) AS v(code_value, order_position)
|
||||
WHERE c.code_name = 'MaritalStatus'
|
||||
AND NOT EXISTS (
|
||||
SELECT 1 FROM m_code_value cv
|
||||
WHERE cv.code_id = c.id AND cv.code_value = v.code_value
|
||||
);
|
||||
</sql>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="0236_03_add_marital_status_to_client" author="fineract">
|
||||
<addColumn tableName="m_client">
|
||||
<column name="marital_status_cv_id" type="BIGINT"/>
|
||||
</addColumn>
|
||||
<addForeignKeyConstraint baseTableName="m_client" baseColumnNames="marital_status_cv_id"
|
||||
constraintName="fk_client_marital_status_cv"
|
||||
referencedTableName="m_code_value" referencedColumnNames="id"/>
|
||||
</changeSet>
|
||||
|
||||
</databaseChangeLog>
|
||||
+60
@@ -0,0 +1,60 @@
|
||||
<?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.13.xsd">
|
||||
|
||||
<!-- Add new columns to m_family_members for CBS requirements -->
|
||||
<changeSet author="fineract" id="0237-1" context="default">
|
||||
<addColumn tableName="m_family_members">
|
||||
<column name="aadhaar_number" type="VARCHAR(12)">
|
||||
<constraints nullable="true"/>
|
||||
</column>
|
||||
<column name="pan_number" type="VARCHAR(10)">
|
||||
<constraints nullable="true"/>
|
||||
</column>
|
||||
<column name="nationality" type="VARCHAR(50)">
|
||||
<constraints nullable="true"/>
|
||||
</column>
|
||||
<column name="is_alive" type="BOOLEAN" defaultValueBoolean="true">
|
||||
<constraints nullable="true"/>
|
||||
</column>
|
||||
<column name="linked_client_id" type="BIGINT">
|
||||
<constraints nullable="true"/>
|
||||
</column>
|
||||
<column name="marriage_date" type="DATE">
|
||||
<constraints nullable="true"/>
|
||||
</column>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<!-- FK for linked_client_id -->
|
||||
<changeSet author="fineract" id="0237-2" context="default">
|
||||
<addForeignKeyConstraint
|
||||
baseTableName="m_family_members"
|
||||
baseColumnNames="linked_client_id"
|
||||
referencedTableName="m_client"
|
||||
referencedColumnNames="id"
|
||||
constraintName="fk_family_member_linked_client"
|
||||
onDelete="SET NULL"/>
|
||||
</changeSet>
|
||||
|
||||
</databaseChangeLog>
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
<?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.13.xsd">
|
||||
|
||||
<changeSet author="fineract" id="0238-1" context="default">
|
||||
<addColumn tableName="m_client">
|
||||
<column name="annual_turnover" type="DECIMAL(19,2)" defaultValue="null"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
</databaseChangeLog>
|
||||
+90
@@ -0,0 +1,90 @@
|
||||
<?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.13.xsd">
|
||||
|
||||
<changeSet author="fineract" id="0239-1" context="default">
|
||||
<preConditions onFail="MARK_RAN"><not><columnExists tableName="m_client" columnName="nationality"/></not></preConditions>
|
||||
<addColumn tableName="m_client">
|
||||
<column name="nationality" type="VARCHAR(100)" defaultValue="null"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<changeSet author="fineract" id="0239-2" context="default">
|
||||
<preConditions onFail="MARK_RAN"><not><columnExists tableName="m_client" columnName="is_minor"/></not></preConditions>
|
||||
<addColumn tableName="m_client">
|
||||
<column name="is_minor" type="BOOLEAN" defaultValueBoolean="false"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<changeSet author="fineract" id="0239-3" context="default">
|
||||
<preConditions onFail="MARK_RAN"><not><columnExists tableName="m_client" columnName="guardian_client_id"/></not></preConditions>
|
||||
<addColumn tableName="m_client">
|
||||
<column name="guardian_client_id" type="BIGINT" defaultValue="null"/>
|
||||
</addColumn>
|
||||
<addForeignKeyConstraint baseTableName="m_client" baseColumnNames="guardian_client_id"
|
||||
referencedTableName="m_client" referencedColumnNames="id"
|
||||
constraintName="fk_client_guardian_client"/>
|
||||
</changeSet>
|
||||
|
||||
<changeSet author="fineract" id="0239-4" context="default">
|
||||
<preConditions onFail="MARK_RAN"><not><columnExists tableName="m_client" columnName="guardian_relation"/></not></preConditions>
|
||||
<addColumn tableName="m_client">
|
||||
<column name="guardian_relation" type="VARCHAR(50)" defaultValue="null"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<changeSet author="fineract" id="0239-5" context="default">
|
||||
<preConditions onFail="MARK_RAN"><not><columnExists tableName="m_client" columnName="dip_verified"/></not></preConditions>
|
||||
<addColumn tableName="m_client">
|
||||
<column name="dip_verified" type="BOOLEAN" defaultValueBoolean="false"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<changeSet author="fineract" id="0239-6" context="default">
|
||||
<preConditions onFail="MARK_RAN"><not><columnExists tableName="m_client" columnName="dip_lookup_log_id"/></not></preConditions>
|
||||
<addColumn tableName="m_client">
|
||||
<column name="dip_lookup_log_id" type="BIGINT" defaultValue="null"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<changeSet author="fineract" id="0239-7" context="default">
|
||||
<preConditions onFail="MARK_RAN"><not><columnExists tableName="m_client" columnName="dip_timestamp"/></not></preConditions>
|
||||
<addColumn tableName="m_client">
|
||||
<column name="dip_timestamp" type="VARCHAR(50)" defaultValue="null"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<changeSet author="fineract" id="0239-8" context="default">
|
||||
<preConditions onFail="MARK_RAN"><not><columnExists tableName="m_client" columnName="name_verified"/></not></preConditions>
|
||||
<addColumn tableName="m_client">
|
||||
<column name="name_verified" type="BOOLEAN" defaultValueBoolean="false"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<changeSet author="fineract" id="0239-9" context="default">
|
||||
<preConditions onFail="MARK_RAN"><not><columnExists tableName="m_client" columnName="screening_log_id"/></not></preConditions>
|
||||
<addColumn tableName="m_client">
|
||||
<column name="screening_log_id" type="BIGINT" defaultValue="null"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
</databaseChangeLog>
|
||||
+300
@@ -0,0 +1,300 @@
|
||||
<?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.13.xsd">
|
||||
|
||||
<!-- ==================== 1. Startup India (DPIIT) ==================== -->
|
||||
<changeSet author="fineract" id="0240-1">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><tableExists tableName="m_client_startup_india"/></not>
|
||||
</preConditions>
|
||||
<createTable tableName="m_client_startup_india">
|
||||
<column name="id" type="BIGINT" autoIncrement="true">
|
||||
<constraints primaryKey="true" nullable="false"/>
|
||||
</column>
|
||||
<column name="client_id" type="BIGINT">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="enabled" type="BOOLEAN" defaultValueBoolean="false"/>
|
||||
<column name="dpiit_recognition_number" type="VARCHAR(50)"/>
|
||||
<column name="recognition_date" type="DATE"/>
|
||||
<column name="certificate_expiry_date" type="DATE"/>
|
||||
<column name="entity_stage" type="VARCHAR(30)"/>
|
||||
<column name="sector_as_dpiit" type="VARCHAR(50)"/>
|
||||
<column name="nic_industry_code" type="VARCHAR(20)"/>
|
||||
<column name="tax_exemption_80iac" type="BOOLEAN" defaultValueBoolean="false"/>
|
||||
<column name="sidbi_fund" type="BOOLEAN" defaultValueBoolean="false"/>
|
||||
<column name="self_certification" type="BOOLEAN" defaultValueBoolean="false"/>
|
||||
<column name="fast_track_patent" type="BOOLEAN" defaultValueBoolean="false"/>
|
||||
<column name="govt_tender_exemption" type="BOOLEAN" defaultValueBoolean="false"/>
|
||||
<column name="credit_guarantee_cgss" type="BOOLEAN" defaultValueBoolean="false"/>
|
||||
<column name="psl_loan_limit" type="DECIMAL(19,2)"/>
|
||||
<column name="psl_sub_category" type="VARCHAR(50)"/>
|
||||
<column name="created_by" type="BIGINT"/>
|
||||
<column name="created_on_utc" type="TIMESTAMP"/>
|
||||
<column name="last_modified_by" type="BIGINT"/>
|
||||
<column name="last_modified_on_utc" type="TIMESTAMP"/>
|
||||
</createTable>
|
||||
<addForeignKeyConstraint baseTableName="m_client_startup_india" baseColumnNames="client_id"
|
||||
referencedTableName="m_client" referencedColumnNames="id"
|
||||
constraintName="FK_m_client_startup_india_client_id"/>
|
||||
</changeSet>
|
||||
|
||||
<!-- ==================== 2. Mudra Borrower (PMMY) ==================== -->
|
||||
<changeSet author="fineract" id="0240-2">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><tableExists tableName="m_client_mudra_borrower"/></not>
|
||||
</preConditions>
|
||||
<createTable tableName="m_client_mudra_borrower">
|
||||
<column name="id" type="BIGINT" autoIncrement="true">
|
||||
<constraints primaryKey="true" nullable="false"/>
|
||||
</column>
|
||||
<column name="client_id" type="BIGINT">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="enabled" type="BOOLEAN" defaultValueBoolean="false"/>
|
||||
<column name="mudra_category" type="VARCHAR(20)"/>
|
||||
<column name="mudra_loan_account_no" type="VARCHAR(50)"/>
|
||||
<column name="lending_institution_name" type="VARCHAR(100)"/>
|
||||
<column name="sanctioned_amount" type="DECIMAL(19,2)"/>
|
||||
<column name="disbursement_date" type="DATE"/>
|
||||
<column name="loan_purpose" type="VARCHAR(50)"/>
|
||||
<column name="mudra_card_number" type="VARCHAR(20)"/>
|
||||
<column name="current_outstanding" type="DECIMAL(19,2)"/>
|
||||
<column name="repayment_status" type="VARCHAR(30)"/>
|
||||
<column name="npa_flag" type="BOOLEAN" defaultValueBoolean="false"/>
|
||||
<column name="created_by" type="BIGINT"/>
|
||||
<column name="created_on_utc" type="TIMESTAMP"/>
|
||||
<column name="last_modified_by" type="BIGINT"/>
|
||||
<column name="last_modified_on_utc" type="TIMESTAMP"/>
|
||||
</createTable>
|
||||
<addForeignKeyConstraint baseTableName="m_client_mudra_borrower" baseColumnNames="client_id"
|
||||
referencedTableName="m_client" referencedColumnNames="id"
|
||||
constraintName="FK_m_client_mudra_borrower_client_id"/>
|
||||
</changeSet>
|
||||
|
||||
<!-- ==================== 3. Export Oriented Unit (EOU) ==================== -->
|
||||
<changeSet author="fineract" id="0240-3">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><tableExists tableName="m_client_eou"/></not>
|
||||
</preConditions>
|
||||
<createTable tableName="m_client_eou">
|
||||
<column name="id" type="BIGINT" autoIncrement="true">
|
||||
<constraints primaryKey="true" nullable="false"/>
|
||||
</column>
|
||||
<column name="client_id" type="BIGINT">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="enabled" type="BOOLEAN" defaultValueBoolean="false"/>
|
||||
<column name="eou_registration_number" type="VARCHAR(50)"/>
|
||||
<column name="registered_dc_zone" type="VARCHAR(50)"/>
|
||||
<column name="bond_lut_number" type="VARCHAR(50)"/>
|
||||
<column name="validity_from" type="DATE"/>
|
||||
<column name="validity_to" type="DATE"/>
|
||||
<column name="gstin_eou" type="VARCHAR(15)"/>
|
||||
<column name="annual_export_obligation" type="DECIMAL(19,2)"/>
|
||||
<column name="nfe_target" type="DECIMAL(19,2)"/>
|
||||
<column name="softex_filing_status" type="VARCHAR(20)"/>
|
||||
<column name="brc_submission_status" type="VARCHAR(20)"/>
|
||||
<column name="ad_category_bank_code" type="VARCHAR(20)"/>
|
||||
<column name="fema_declaration_date" type="DATE"/>
|
||||
<column name="created_by" type="BIGINT"/>
|
||||
<column name="created_on_utc" type="TIMESTAMP"/>
|
||||
<column name="last_modified_by" type="BIGINT"/>
|
||||
<column name="last_modified_on_utc" type="TIMESTAMP"/>
|
||||
</createTable>
|
||||
<addForeignKeyConstraint baseTableName="m_client_eou" baseColumnNames="client_id"
|
||||
referencedTableName="m_client" referencedColumnNames="id"
|
||||
constraintName="FK_m_client_eou_client_id"/>
|
||||
</changeSet>
|
||||
|
||||
<!-- ==================== 4. Import/Export (IEC / DGFT) ==================== -->
|
||||
<changeSet author="fineract" id="0240-4">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><tableExists tableName="m_client_import_export"/></not>
|
||||
</preConditions>
|
||||
<createTable tableName="m_client_import_export">
|
||||
<column name="id" type="BIGINT" autoIncrement="true">
|
||||
<constraints primaryKey="true" nullable="false"/>
|
||||
</column>
|
||||
<column name="client_id" type="BIGINT">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="enabled" type="BOOLEAN" defaultValueBoolean="false"/>
|
||||
<column name="iec_code" type="VARCHAR(10)"/>
|
||||
<column name="iec_issue_date" type="DATE"/>
|
||||
<column name="iec_status" type="VARCHAR(20)"/>
|
||||
<column name="trade_type" type="VARCHAR(30)"/>
|
||||
<column name="primary_hs_code" type="VARCHAR(20)"/>
|
||||
<column name="key_trading_countries" type="VARCHAR(200)"/>
|
||||
<column name="ad_category_bank_code" type="VARCHAR(20)"/>
|
||||
<column name="ecgc_policy_number" type="VARCHAR(50)"/>
|
||||
<column name="ecgc_policy_expiry" type="DATE"/>
|
||||
<column name="eefc_account_required" type="BOOLEAN" defaultValueBoolean="false"/>
|
||||
<column name="pcfc_facility_required" type="BOOLEAN" defaultValueBoolean="false"/>
|
||||
<column name="fema_declaration_obtained" type="BOOLEAN" defaultValueBoolean="false"/>
|
||||
<column name="created_by" type="BIGINT"/>
|
||||
<column name="created_on_utc" type="TIMESTAMP"/>
|
||||
<column name="last_modified_by" type="BIGINT"/>
|
||||
<column name="last_modified_on_utc" type="TIMESTAMP"/>
|
||||
</createTable>
|
||||
<addForeignKeyConstraint baseTableName="m_client_import_export" baseColumnNames="client_id"
|
||||
referencedTableName="m_client" referencedColumnNames="id"
|
||||
constraintName="FK_m_client_import_export_client_id"/>
|
||||
</changeSet>
|
||||
|
||||
<!-- ==================== 5. Priority Sector Lending (PSL) ==================== -->
|
||||
<changeSet author="fineract" id="0240-5">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><tableExists tableName="m_client_priority_sector"/></not>
|
||||
</preConditions>
|
||||
<createTable tableName="m_client_priority_sector">
|
||||
<column name="id" type="BIGINT" autoIncrement="true">
|
||||
<constraints primaryKey="true" nullable="false"/>
|
||||
</column>
|
||||
<column name="client_id" type="BIGINT">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="enabled" type="BOOLEAN" defaultValueBoolean="false"/>
|
||||
<column name="psl_category" type="VARCHAR(30)"/>
|
||||
<column name="psl_sub_category" type="VARCHAR(50)"/>
|
||||
<column name="psl_loan_purpose_code" type="VARCHAR(10)"/>
|
||||
<column name="psl_eligibility_basis" type="VARCHAR(100)"/>
|
||||
<column name="fidd_reporting_code" type="VARCHAR(20)"/>
|
||||
<column name="psl_sanctioned_limit" type="DECIMAL(19,2)"/>
|
||||
<column name="msme_classification" type="VARCHAR(50)"/>
|
||||
<column name="udyam_registration_number" type="VARCHAR(30)"/>
|
||||
<column name="udyam_registration_date" type="DATE"/>
|
||||
<column name="annual_turnover" type="DECIMAL(19,2)"/>
|
||||
<column name="investment_plant_machinery" type="DECIMAL(19,2)"/>
|
||||
<column name="weaker_section_flag" type="BOOLEAN" defaultValueBoolean="false"/>
|
||||
<column name="sc_st_borrower_flag" type="BOOLEAN" defaultValueBoolean="false"/>
|
||||
<column name="women_entrepreneur_flag" type="BOOLEAN" defaultValueBoolean="false"/>
|
||||
<column name="minority_community_flag" type="BOOLEAN" defaultValueBoolean="false"/>
|
||||
<column name="created_by" type="BIGINT"/>
|
||||
<column name="created_on_utc" type="TIMESTAMP"/>
|
||||
<column name="last_modified_by" type="BIGINT"/>
|
||||
<column name="last_modified_on_utc" type="TIMESTAMP"/>
|
||||
</createTable>
|
||||
<addForeignKeyConstraint baseTableName="m_client_priority_sector" baseColumnNames="client_id"
|
||||
referencedTableName="m_client" referencedColumnNames="id"
|
||||
constraintName="FK_m_client_priority_sector_client_id"/>
|
||||
</changeSet>
|
||||
|
||||
<!-- ==================== 6. Non-Priority Sector (NPS) ==================== -->
|
||||
<changeSet author="fineract" id="0240-6">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><tableExists tableName="m_client_non_priority_sector"/></not>
|
||||
</preConditions>
|
||||
<createTable tableName="m_client_non_priority_sector">
|
||||
<column name="id" type="BIGINT" autoIncrement="true">
|
||||
<constraints primaryKey="true" nullable="false"/>
|
||||
</column>
|
||||
<column name="client_id" type="BIGINT">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="enabled" type="BOOLEAN" defaultValueBoolean="false"/>
|
||||
<column name="industry_sector" type="VARCHAR(50)"/>
|
||||
<column name="nic_code" type="VARCHAR(10)"/>
|
||||
<column name="industry_description" type="VARCHAR(200)"/>
|
||||
<column name="annual_revenue_band" type="VARCHAR(30)"/>
|
||||
<column name="risk_category" type="VARCHAR(20)"/>
|
||||
<column name="customer_risk_score" type="INTEGER"/>
|
||||
<column name="aml_risk_classification" type="VARCHAR(50)"/>
|
||||
<column name="pep_flag" type="BOOLEAN" defaultValueBoolean="false"/>
|
||||
<column name="aml_watchlist_match" type="BOOLEAN" defaultValueBoolean="false"/>
|
||||
<column name="adverse_media_flag" type="BOOLEAN" defaultValueBoolean="false"/>
|
||||
<column name="created_by" type="BIGINT"/>
|
||||
<column name="created_on_utc" type="TIMESTAMP"/>
|
||||
<column name="last_modified_by" type="BIGINT"/>
|
||||
<column name="last_modified_on_utc" type="TIMESTAMP"/>
|
||||
</createTable>
|
||||
<addForeignKeyConstraint baseTableName="m_client_non_priority_sector" baseColumnNames="client_id"
|
||||
referencedTableName="m_client" referencedColumnNames="id"
|
||||
constraintName="FK_m_client_non_priority_sector_client_id"/>
|
||||
</changeSet>
|
||||
|
||||
<!-- ==================== 7. Permissions ==================== -->
|
||||
<changeSet author="fineract" id="0240-7">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">SELECT COUNT(*) FROM m_permission WHERE code = 'READ_ENTITYCLASSIFICATION'</sqlCheck>
|
||||
</preConditions>
|
||||
<insert tableName="m_permission">
|
||||
<column name="grouping" value="portfolio"/>
|
||||
<column name="code" value="READ_ENTITYCLASSIFICATION"/>
|
||||
<column name="entity_name" value="ENTITYCLASSIFICATION"/>
|
||||
<column name="action_name" value="READ"/>
|
||||
<column name="can_maker_checker" valueBoolean="false"/>
|
||||
</insert>
|
||||
<insert tableName="m_permission">
|
||||
<column name="grouping" value="portfolio"/>
|
||||
<column name="code" value="CREATE_ENTITYCLASSIFICATION"/>
|
||||
<column name="entity_name" value="ENTITYCLASSIFICATION"/>
|
||||
<column name="action_name" value="CREATE"/>
|
||||
<column name="can_maker_checker" valueBoolean="false"/>
|
||||
</insert>
|
||||
<insert tableName="m_permission">
|
||||
<column name="grouping" value="portfolio"/>
|
||||
<column name="code" value="UPDATE_ENTITYCLASSIFICATION"/>
|
||||
<column name="entity_name" value="ENTITYCLASSIFICATION"/>
|
||||
<column name="action_name" value="UPDATE"/>
|
||||
<column name="can_maker_checker" valueBoolean="false"/>
|
||||
</insert>
|
||||
</changeSet>
|
||||
|
||||
<!-- Table 7: m_client_msme -->
|
||||
<changeSet author="fineract" id="0240-8" context="default">
|
||||
<preConditions onFail="MARK_RAN"><not><tableExists tableName="m_client_msme"/></not></preConditions>
|
||||
<createTable tableName="m_client_msme">
|
||||
<column name="id" type="BIGINT" autoIncrement="true">
|
||||
<constraints primaryKey="true" nullable="false"/>
|
||||
</column>
|
||||
<column name="client_id" type="BIGINT">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="enabled" type="BOOLEAN" defaultValueBoolean="false"/>
|
||||
<column name="udyam_registration_number" type="VARCHAR(30)"/>
|
||||
<column name="registration_date" type="DATE"/>
|
||||
<column name="registration_status" type="VARCHAR(20)"/>
|
||||
<column name="msme_classification" type="VARCHAR(20)"/>
|
||||
<column name="enterprise_type" type="VARCHAR(30)"/>
|
||||
<column name="nic_activity_code" type="VARCHAR(20)"/>
|
||||
<column name="annual_turnover" type="DECIMAL(19,2)"/>
|
||||
<column name="investment_plant_machinery" type="DECIMAL(19,2)"/>
|
||||
<column name="financial_year_assessment" type="VARCHAR(10)"/>
|
||||
<column name="social_category_owner" type="VARCHAR(30)"/>
|
||||
<column name="gender_primary_owner" type="VARCHAR(20)"/>
|
||||
<column name="no_of_employees" type="INTEGER"/>
|
||||
<column name="women_led_enterprise" type="BOOLEAN" defaultValueBoolean="false"/>
|
||||
<column name="divyang_pwd_owned" type="BOOLEAN" defaultValueBoolean="false"/>
|
||||
<column name="created_by" type="BIGINT"/>
|
||||
<column name="created_on_utc" type="TIMESTAMP"/>
|
||||
<column name="last_modified_by" type="BIGINT"/>
|
||||
<column name="last_modified_on_utc" type="TIMESTAMP"/>
|
||||
</createTable>
|
||||
<addForeignKeyConstraint baseTableName="m_client_msme" baseColumnNames="client_id"
|
||||
referencedTableName="m_client" referencedColumnNames="id"
|
||||
constraintName="fk_msme_client_id"/>
|
||||
</changeSet>
|
||||
|
||||
</databaseChangeLog>
|
||||
+131
@@ -0,0 +1,131 @@
|
||||
<?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.13.xsd">
|
||||
|
||||
<changeSet author="fineract" id="0241-1" context="default">
|
||||
<preConditions onFail="MARK_RAN"><not><tableExists tableName="m_client_nominee"/></not></preConditions>
|
||||
<createTable tableName="m_client_nominee">
|
||||
<column name="id" type="BIGINT" autoIncrement="true">
|
||||
<constraints primaryKey="true" nullable="false"/>
|
||||
</column>
|
||||
<column name="client_id" type="BIGINT">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="nominee_client_id" type="BIGINT">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="relationship_cv_id" type="BIGINT"/>
|
||||
<column name="percentage_share" type="DECIMAL(5,2)"/>
|
||||
<column name="is_active" type="BOOLEAN" defaultValueBoolean="true"/>
|
||||
<column name="nominee_is_minor" type="BOOLEAN" defaultValueBoolean="false"/>
|
||||
<column name="guardian_client_id" type="BIGINT"/>
|
||||
<column name="guardian_relationship_cv_id" type="BIGINT"/>
|
||||
<column name="effective_date" type="DATE"/>
|
||||
<column name="remarks" type="VARCHAR(500)"/>
|
||||
<column name="created_by" type="BIGINT"/>
|
||||
<column name="created_on_utc" type="TIMESTAMP"/>
|
||||
<column name="last_modified_by" type="BIGINT"/>
|
||||
<column name="last_modified_on_utc" type="TIMESTAMP"/>
|
||||
</createTable>
|
||||
<addForeignKeyConstraint baseTableName="m_client_nominee" baseColumnNames="client_id"
|
||||
referencedTableName="m_client" referencedColumnNames="id"
|
||||
constraintName="fk_nominee_client_id"/>
|
||||
<addForeignKeyConstraint baseTableName="m_client_nominee" baseColumnNames="nominee_client_id"
|
||||
referencedTableName="m_client" referencedColumnNames="id"
|
||||
constraintName="fk_nominee_nominee_client_id"/>
|
||||
<addForeignKeyConstraint baseTableName="m_client_nominee" baseColumnNames="guardian_client_id"
|
||||
referencedTableName="m_client" referencedColumnNames="id"
|
||||
constraintName="fk_nominee_guardian_client_id"/>
|
||||
<addForeignKeyConstraint baseTableName="m_client_nominee" baseColumnNames="relationship_cv_id"
|
||||
referencedTableName="m_code_value" referencedColumnNames="id"
|
||||
constraintName="fk_nominee_relationship_cv"/>
|
||||
<addForeignKeyConstraint baseTableName="m_client_nominee" baseColumnNames="guardian_relationship_cv_id"
|
||||
referencedTableName="m_code_value" referencedColumnNames="id"
|
||||
constraintName="fk_nominee_guardian_rel_cv"/>
|
||||
</changeSet>
|
||||
|
||||
<!-- Add RELATIONSHIP code if not exists -->
|
||||
<changeSet author="fineract" id="0241-2" context="default">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">SELECT COUNT(*) FROM m_code WHERE code_name = 'RELATIONSHIP'</sqlCheck>
|
||||
</preConditions>
|
||||
<insert tableName="m_code">
|
||||
<column name="code_name" value="RELATIONSHIP"/>
|
||||
<column name="is_system_defined" valueBoolean="true"/>
|
||||
</insert>
|
||||
</changeSet>
|
||||
|
||||
<!-- Add relationship code values -->
|
||||
<changeSet author="fineract" id="0241-3" context="default">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">SELECT COUNT(*) FROM m_code_value cv JOIN m_code c ON c.id = cv.code_id WHERE c.code_name = 'RELATIONSHIP'</sqlCheck>
|
||||
</preConditions>
|
||||
<sql>
|
||||
INSERT INTO m_code_value (code_id, code_value, order_position, is_active, is_mandatory)
|
||||
SELECT c.id, v.val, v.pos, true, false
|
||||
FROM m_code c
|
||||
CROSS JOIN (VALUES
|
||||
('FATHER', 1), ('MOTHER', 2), ('SPOUSE', 3), ('SON', 4), ('DAUGHTER', 5),
|
||||
('BROTHER', 6), ('SISTER', 7), ('GRANDFATHER', 8), ('GRANDMOTHER', 9),
|
||||
('UNCLE', 10), ('AUNT', 11), ('NEPHEW', 12), ('NIECE', 13),
|
||||
('FATHER_IN_LAW', 14), ('MOTHER_IN_LAW', 15), ('FRIEND', 16), ('OTHER', 17)
|
||||
) AS v(val, pos)
|
||||
WHERE c.code_name = 'RELATIONSHIP';
|
||||
</sql>
|
||||
</changeSet>
|
||||
|
||||
<!-- Permissions -->
|
||||
<changeSet author="fineract" id="0241-4" context="default">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">SELECT COUNT(*) FROM m_permission WHERE code = 'READ_CLIENTNOMINEE'</sqlCheck>
|
||||
</preConditions>
|
||||
<insert tableName="m_permission">
|
||||
<column name="grouping" value="portfolio"/>
|
||||
<column name="code" value="READ_CLIENTNOMINEE"/>
|
||||
<column name="entity_name" value="CLIENTNOMINEE"/>
|
||||
<column name="action_name" value="READ"/>
|
||||
<column name="can_maker_checker" valueBoolean="false"/>
|
||||
</insert>
|
||||
<insert tableName="m_permission">
|
||||
<column name="grouping" value="portfolio"/>
|
||||
<column name="code" value="CREATE_CLIENTNOMINEE"/>
|
||||
<column name="entity_name" value="CLIENTNOMINEE"/>
|
||||
<column name="action_name" value="CREATE"/>
|
||||
<column name="can_maker_checker" valueBoolean="false"/>
|
||||
</insert>
|
||||
<insert tableName="m_permission">
|
||||
<column name="grouping" value="portfolio"/>
|
||||
<column name="code" value="UPDATE_CLIENTNOMINEE"/>
|
||||
<column name="entity_name" value="CLIENTNOMINEE"/>
|
||||
<column name="action_name" value="UPDATE"/>
|
||||
<column name="can_maker_checker" valueBoolean="false"/>
|
||||
</insert>
|
||||
<insert tableName="m_permission">
|
||||
<column name="grouping" value="portfolio"/>
|
||||
<column name="code" value="DELETE_CLIENTNOMINEE"/>
|
||||
<column name="entity_name" value="CLIENTNOMINEE"/>
|
||||
<column name="action_name" value="DELETE"/>
|
||||
<column name="can_maker_checker" valueBoolean="false"/>
|
||||
</insert>
|
||||
</changeSet>
|
||||
|
||||
</databaseChangeLog>
|
||||
+59
@@ -0,0 +1,59 @@
|
||||
<?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.13.xsd">
|
||||
|
||||
<!-- Add marriage_authority column to m_family_members -->
|
||||
<changeSet author="fineract" id="0242-1" context="default">
|
||||
<addColumn tableName="m_family_members">
|
||||
<column name="marriage_authority" type="VARCHAR(50)">
|
||||
<constraints nullable="true"/>
|
||||
</column>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<!-- Add permissions for family member documents (using existing m_document infrastructure) -->
|
||||
<changeSet author="fineract" id="0242-2" context="default">
|
||||
<insert tableName="m_permission">
|
||||
<column name="grouping" value="portfolio"/>
|
||||
<column name="code" value="READ_FAMILYMEMBERDOCUMENT"/>
|
||||
<column name="entity_name" value="FAMILYMEMBERDOCUMENT"/>
|
||||
<column name="action_name" value="READ"/>
|
||||
<column name="can_maker_checker" valueBoolean="false"/>
|
||||
</insert>
|
||||
<insert tableName="m_permission">
|
||||
<column name="grouping" value="portfolio"/>
|
||||
<column name="code" value="CREATE_FAMILYMEMBERDOCUMENT"/>
|
||||
<column name="entity_name" value="FAMILYMEMBERDOCUMENT"/>
|
||||
<column name="action_name" value="CREATE"/>
|
||||
<column name="can_maker_checker" valueBoolean="false"/>
|
||||
</insert>
|
||||
<insert tableName="m_permission">
|
||||
<column name="grouping" value="portfolio"/>
|
||||
<column name="code" value="DELETE_FAMILYMEMBERDOCUMENT"/>
|
||||
<column name="entity_name" value="FAMILYMEMBERDOCUMENT"/>
|
||||
<column name="action_name" value="DELETE"/>
|
||||
<column name="can_maker_checker" valueBoolean="false"/>
|
||||
</insert>
|
||||
</changeSet>
|
||||
|
||||
</databaseChangeLog>
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
<?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.13.xsd">
|
||||
|
||||
<!-- Add nominee_identifier, account_no, account_type to m_client_nominee -->
|
||||
<changeSet author="fineract" id="0243-1" context="default">
|
||||
<addColumn tableName="m_client_nominee">
|
||||
<column name="nominee_identifier" type="VARCHAR(50)">
|
||||
<constraints nullable="true" unique="true" uniqueConstraintName="uq_nominee_identifier"/>
|
||||
</column>
|
||||
<column name="account_no" type="VARCHAR(50)">
|
||||
<constraints nullable="true"/>
|
||||
</column>
|
||||
<column name="account_type" type="VARCHAR(10)">
|
||||
<constraints nullable="true"/>
|
||||
</column>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<changeSet author="fineract" id="0243-2" context="default">
|
||||
<createIndex tableName="m_client_nominee" indexName="idx_nominee_account_no_type">
|
||||
<column name="account_no"/>
|
||||
<column name="account_type"/>
|
||||
</createIndex>
|
||||
</changeSet>
|
||||
|
||||
</databaseChangeLog>
|
||||
+58
@@ -0,0 +1,58 @@
|
||||
<?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.13.xsd">
|
||||
|
||||
<!-- Add alternate mobile number and its DIP verification fields to m_client -->
|
||||
<changeSet author="fineract" id="0244-1" context="default">
|
||||
<addColumn tableName="m_client">
|
||||
<column name="alternate_mobile_no" type="VARCHAR(50)">
|
||||
<constraints nullable="true"/>
|
||||
</column>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<changeSet author="fineract" id="0244-2" context="default">
|
||||
<addColumn tableName="m_client">
|
||||
<column name="alternate_dip_verified" type="BOOLEAN" defaultValueBoolean="false">
|
||||
<constraints nullable="true"/>
|
||||
</column>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<changeSet author="fineract" id="0244-3" context="default">
|
||||
<addColumn tableName="m_client">
|
||||
<column name="alternate_dip_lookup_log_id" type="BIGINT">
|
||||
<constraints nullable="true"/>
|
||||
</column>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<changeSet author="fineract" id="0244-4" context="default">
|
||||
<addColumn tableName="m_client">
|
||||
<column name="alternate_dip_timestamp" type="VARCHAR(50)">
|
||||
<constraints nullable="true"/>
|
||||
</column>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
</databaseChangeLog>
|
||||
+155
@@ -0,0 +1,155 @@
|
||||
<?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.13.xsd">
|
||||
|
||||
<!-- Add client_id FK column to m_address -->
|
||||
<changeSet author="fineract" id="0245-1" context="default">
|
||||
<addColumn tableName="m_address">
|
||||
<column name="client_id" type="BIGINT">
|
||||
<constraints nullable="true"/>
|
||||
</column>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<changeSet author="fineract" id="0245-2" context="default">
|
||||
<addForeignKeyConstraint baseTableName="m_address" baseColumnNames="client_id"
|
||||
referencedTableName="m_client" referencedColumnNames="id"
|
||||
constraintName="fk_m_address_client_id"
|
||||
onDelete="SET NULL" onUpdate="CASCADE"/>
|
||||
</changeSet>
|
||||
|
||||
<changeSet author="fineract" id="0245-3" context="default">
|
||||
<createIndex tableName="m_address" indexName="idx_m_address_client_id">
|
||||
<column name="client_id"/>
|
||||
</createIndex>
|
||||
</changeSet>
|
||||
|
||||
<!-- Backfill client_id from m_client_address join table for existing records -->
|
||||
<changeSet author="fineract" id="0245-4" context="default">
|
||||
<sql>
|
||||
UPDATE m_address
|
||||
SET client_id = ca.client_id
|
||||
FROM m_client_address ca
|
||||
WHERE m_address.id = ca.address_id
|
||||
AND m_address.client_id IS NULL;
|
||||
</sql>
|
||||
</changeSet>
|
||||
|
||||
<!-- Seed ADDRESS_TYPE code values (code id=29) -->
|
||||
<changeSet author="fineract" id="0245-5" context="default">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">
|
||||
SELECT COUNT(*) FROM m_code_value WHERE code_id = 29
|
||||
</sqlCheck>
|
||||
</preConditions>
|
||||
<insert tableName="m_code_value">
|
||||
<column name="code_id" valueNumeric="29"/>
|
||||
<column name="code_value" value="Permanent Address"/>
|
||||
<column name="order_position" valueNumeric="1"/>
|
||||
<column name="code_description" value="Permanent / Home address"/>
|
||||
<column name="is_active" valueBoolean="true"/>
|
||||
<column name="is_mandatory" valueBoolean="false"/>
|
||||
</insert>
|
||||
<insert tableName="m_code_value">
|
||||
<column name="code_id" valueNumeric="29"/>
|
||||
<column name="code_value" value="Current / Residential"/>
|
||||
<column name="order_position" valueNumeric="2"/>
|
||||
<column name="code_description" value="Current residential address"/>
|
||||
<column name="is_active" valueBoolean="true"/>
|
||||
<column name="is_mandatory" valueBoolean="false"/>
|
||||
</insert>
|
||||
<insert tableName="m_code_value">
|
||||
<column name="code_id" valueNumeric="29"/>
|
||||
<column name="code_value" value="Office / Work"/>
|
||||
<column name="order_position" valueNumeric="3"/>
|
||||
<column name="code_description" value="Office or workplace address"/>
|
||||
<column name="is_active" valueBoolean="true"/>
|
||||
<column name="is_mandatory" valueBoolean="false"/>
|
||||
</insert>
|
||||
<insert tableName="m_code_value">
|
||||
<column name="code_id" valueNumeric="29"/>
|
||||
<column name="code_value" value="Correspondence"/>
|
||||
<column name="order_position" valueNumeric="4"/>
|
||||
<column name="code_description" value="Correspondence / mailing address"/>
|
||||
<column name="is_active" valueBoolean="true"/>
|
||||
<column name="is_mandatory" valueBoolean="false"/>
|
||||
</insert>
|
||||
</changeSet>
|
||||
|
||||
<!-- Enable townVillage, countyDistrict and restore street in field configuration -->
|
||||
<changeSet author="fineract" id="0245-6" context="default">
|
||||
<sql>
|
||||
UPDATE m_field_configuration SET is_enabled = true WHERE field = 'townVillage' AND entity = 'ADDRESS';
|
||||
UPDATE m_field_configuration SET is_enabled = true WHERE field = 'countyDistrict' AND entity = 'ADDRESS';
|
||||
</sql>
|
||||
</changeSet>
|
||||
|
||||
<changeSet author="fineract" id="0245-7" context="default">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">
|
||||
SELECT COUNT(*) FROM m_field_configuration WHERE entity = 'ADDRESS' AND field = 'street'
|
||||
</sqlCheck>
|
||||
</preConditions>
|
||||
<insert tableName="m_field_configuration">
|
||||
<column name="entity" value="ADDRESS"/>
|
||||
<column name="subentity" value="CLIENT"/>
|
||||
<column name="field" value="street"/>
|
||||
<column name="is_enabled" valueBoolean="true"/>
|
||||
<column name="is_mandatory" valueBoolean="false"/>
|
||||
<column name="validation_regex" value=""/>
|
||||
</insert>
|
||||
</changeSet>
|
||||
|
||||
<!-- Add address_type_id FK column to m_address -->
|
||||
<changeSet author="fineract" id="0245-8" context="default">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_address" columnName="address_type_id"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_address">
|
||||
<column name="address_type_id" type="INT">
|
||||
<constraints nullable="true"/>
|
||||
</column>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<changeSet author="fineract" id="0245-9" context="default">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><foreignKeyConstraintExists foreignKeyName="fk_m_address_address_type_id"/></not>
|
||||
</preConditions>
|
||||
<addForeignKeyConstraint baseTableName="m_address" baseColumnNames="address_type_id"
|
||||
referencedTableName="m_code_value" referencedColumnNames="id"
|
||||
constraintName="fk_m_address_address_type_id"/>
|
||||
</changeSet>
|
||||
|
||||
<!-- Backfill address_type_id from m_client_address -->
|
||||
<changeSet author="fineract" id="0245-10" context="default">
|
||||
<sql>
|
||||
UPDATE m_address
|
||||
SET address_type_id = ca.address_type_id
|
||||
FROM m_client_address ca
|
||||
WHERE m_address.id = ca.address_id
|
||||
AND m_address.address_type_id IS NULL;
|
||||
</sql>
|
||||
</changeSet>
|
||||
|
||||
</databaseChangeLog>
|
||||
+104
@@ -0,0 +1,104 @@
|
||||
<?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.13.xsd">
|
||||
|
||||
<changeSet author="fineract" id="0246-0" context="mysql,mariadb,postgresql">
|
||||
<comment>Widen pan_aadhaar_seeding_status from VARCHAR(5) to VARCHAR(20) to support LINKED/NOT_LINKED values</comment>
|
||||
<modifyDataType tableName="m_client_kyc" columnName="pan_aadhaar_seeding_status" newDataType="VARCHAR(20)"/>
|
||||
</changeSet>
|
||||
|
||||
<changeSet author="fineract" id="0246-1" context="mysql,mariadb,postgresql">
|
||||
<comment>Add extended KYC fields: enterprise/non-individual, KYC document, AML/compliance, account status, Form 60/15</comment>
|
||||
|
||||
<!-- Enterprise / Non-Individual fields -->
|
||||
<addColumn tableName="m_client_kyc">
|
||||
<column name="enterprise_pan" type="VARCHAR(10)"/>
|
||||
</addColumn>
|
||||
<addColumn tableName="m_client_kyc">
|
||||
<column name="cin_number" type="VARCHAR(21)"/>
|
||||
</addColumn>
|
||||
<addColumn tableName="m_client_kyc">
|
||||
<column name="incorporation_date" type="DATE"/>
|
||||
</addColumn>
|
||||
|
||||
<!-- KYC Document -->
|
||||
<addColumn tableName="m_client_kyc">
|
||||
<column name="kyc_document_name" type="VARCHAR(100)"/>
|
||||
</addColumn>
|
||||
<addColumn tableName="m_client_kyc">
|
||||
<column name="kyc_document_number" type="VARCHAR(50)"/>
|
||||
</addColumn>
|
||||
<addColumn tableName="m_client_kyc">
|
||||
<column name="kyc_doc_issue_date" type="DATE"/>
|
||||
</addColumn>
|
||||
<addColumn tableName="m_client_kyc">
|
||||
<column name="kyc_doc_expiry_date" type="DATE"/>
|
||||
</addColumn>
|
||||
|
||||
<!-- AML / Compliance flags -->
|
||||
<addColumn tableName="m_client_kyc">
|
||||
<column name="aml_check_status" type="VARCHAR(20)"/>
|
||||
</addColumn>
|
||||
<addColumn tableName="m_client_kyc">
|
||||
<column name="banned_entity_match" type="VARCHAR(10)"/>
|
||||
</addColumn>
|
||||
<addColumn tableName="m_client_kyc">
|
||||
<column name="willful_defaulter" type="VARCHAR(10)"/>
|
||||
</addColumn>
|
||||
<addColumn tableName="m_client_kyc">
|
||||
<column name="ecgc_sal_flag" type="VARCHAR(10)"/>
|
||||
</addColumn>
|
||||
<addColumn tableName="m_client_kyc">
|
||||
<column name="dormant_flag" type="VARCHAR(20)"/>
|
||||
</addColumn>
|
||||
|
||||
<!-- Account status / Freeze -->
|
||||
<addColumn tableName="m_client_kyc">
|
||||
<column name="account_status" type="VARCHAR(20)"/>
|
||||
</addColumn>
|
||||
<addColumn tableName="m_client_kyc">
|
||||
<column name="freeze_reason" type="VARCHAR(200)"/>
|
||||
</addColumn>
|
||||
<addColumn tableName="m_client_kyc">
|
||||
<column name="freeze_authority" type="VARCHAR(100)"/>
|
||||
</addColumn>
|
||||
|
||||
<!-- Form 60 / Form 15G/15H -->
|
||||
<addColumn tableName="m_client_kyc">
|
||||
<column name="form60_type" type="VARCHAR(20)"/>
|
||||
</addColumn>
|
||||
<addColumn tableName="m_client_kyc">
|
||||
<column name="form60_date" type="DATE"/>
|
||||
</addColumn>
|
||||
<addColumn tableName="m_client_kyc">
|
||||
<column name="form15_applicable" type="BOOLEAN"/>
|
||||
</addColumn>
|
||||
<addColumn tableName="m_client_kyc">
|
||||
<column name="form15_type" type="VARCHAR(10)"/>
|
||||
</addColumn>
|
||||
<addColumn tableName="m_client_kyc">
|
||||
<column name="form15_fy" type="VARCHAR(10)"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
</databaseChangeLog>
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
<?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.13.xsd">
|
||||
|
||||
<changeSet author="fineract" id="0247-1" context="default">
|
||||
<insert tableName="m_code_value">
|
||||
<column name="code_id" valueNumeric="17"/>
|
||||
<column name="code_value" value="HUF (Hindu Undivided Family)"/>
|
||||
<column name="code_description" value="Hindu Undivided Family"/>
|
||||
<column name="order_position" valueNumeric="1"/>
|
||||
<column name="is_active" valueBoolean="true"/>
|
||||
<column name="is_mandatory" valueBoolean="false"/>
|
||||
</insert>
|
||||
</changeSet>
|
||||
|
||||
</databaseChangeLog>
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
<?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.13.xsd">
|
||||
|
||||
<changeSet author="fineract" id="0248-1" context="default">
|
||||
<addColumn tableName="m_client_kyc">
|
||||
<column name="cin_verified" type="boolean" defaultValueBoolean="false">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="cin_verified_on" type="date"/>
|
||||
<column name="din_number" type="varchar(8)"/>
|
||||
<column name="din_verified" type="boolean" defaultValueBoolean="false">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="din_verified_on" type="date"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
</databaseChangeLog>
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
<?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.13.xsd">
|
||||
|
||||
<changeSet author="fineract" id="0249-1" context="default">
|
||||
<addColumn tableName="m_client_non_person">
|
||||
<column name="authorized_signatory" type="varchar(500)"/>
|
||||
<column name="additional_info" type="varchar(500)"/>
|
||||
<column name="date_of_registration" type="date"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
</databaseChangeLog>
|
||||
Reference in New Issue
Block a user