feat(db): idempotent catch-up migrations for UAT schema gaps (0358-0367)
Add 10 Liquibase catch-up changeSets covering m_client, m_client_kyc, m_family_members, m_client_nominee, m_client_msme, m_rbi_feed_item, m_savings_product, m_current_product, m_clerk_withdrawal_request, m_daily_token_counter, and misc column additions (0207-0348 range). All changeSets use preConditions (tableExists/columnExists) so they MARK_RAN if already applied. Fixes PostgreSQL startup crash in 0360 by replacing MySQL-specific INFORMATION_SCHEMA sqlCheck with Liquibase- native foreignKeyConstraintExists. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
87b308b527
commit
0e076889e9
@@ -385,4 +385,13 @@
|
||||
<include file="parts/0355_director_designation_code.xml" relativeToChangelogFile="true"/>
|
||||
<include file="parts/0356_meeting_vote_remark.xml" relativeToChangelogFile="true"/>
|
||||
<include file="parts/0357_meeting_vote_token_designation.xml" relativeToChangelogFile="true"/>
|
||||
<include file="parts/0358_catchup_m_client_columns.xml" relativeToChangelogFile="true"/>
|
||||
<include file="parts/0359_catchup_m_client_kyc_columns.xml" relativeToChangelogFile="true"/>
|
||||
<include file="parts/0360_catchup_family_members_nominee.xml" relativeToChangelogFile="true"/>
|
||||
<include file="parts/0361_catchup_misc_columns.xml" relativeToChangelogFile="true"/>
|
||||
<include file="parts/0362_catchup_rbi_feed.xml" relativeToChangelogFile="true"/>
|
||||
<include file="parts/0363_catchup_savings_product_enhanced.xml" relativeToChangelogFile="true"/>
|
||||
<include file="parts/0364_catchup_current_product_tables.xml" relativeToChangelogFile="true"/>
|
||||
<include file="parts/0366_catchup_clerk_withdrawal_token.xml" relativeToChangelogFile="true"/>
|
||||
<include file="parts/0367_catchup_missing_tables.xml" relativeToChangelogFile="true"/>
|
||||
</databaseChangeLog>
|
||||
|
||||
+141
@@ -0,0 +1,141 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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.1.xsd">
|
||||
|
||||
<!-- Idempotent catch-up for m_client columns from migrations 0234/0236/0238/0244/0256/0257/0258
|
||||
that lack preConditions guards. Safe to run on environments where columns already exist. -->
|
||||
|
||||
<!-- 0234: monthly_income -->
|
||||
<changeSet id="0358-client-monthly-income" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_client" columnName="monthly_income"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_client">
|
||||
<column name="monthly_income" type="DECIMAL(19,2)"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<!-- 0236: marital_status_cv_id -->
|
||||
<changeSet id="0358-client-marital-status" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_client" columnName="marital_status_cv_id"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_client">
|
||||
<column name="marital_status_cv_id" type="BIGINT"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<!-- 0238: annual_turnover -->
|
||||
<changeSet id="0358-client-annual-turnover" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_client" columnName="annual_turnover"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_client">
|
||||
<column name="annual_turnover" type="DECIMAL(19,2)"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<!-- 0244: alternate mobile + DIP fields -->
|
||||
<changeSet id="0358-client-alternate-mobile-no" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_client" columnName="alternate_mobile_no"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_client">
|
||||
<column name="alternate_mobile_no" type="VARCHAR(50)">
|
||||
<constraints nullable="true"/>
|
||||
</column>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="0358-client-alternate-dip-verified" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_client" columnName="alternate_dip_verified"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_client">
|
||||
<column name="alternate_dip_verified" type="BOOLEAN" defaultValueBoolean="false">
|
||||
<constraints nullable="true"/>
|
||||
</column>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="0358-client-alternate-dip-lookup-log-id" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_client" columnName="alternate_dip_lookup_log_id"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_client">
|
||||
<column name="alternate_dip_lookup_log_id" type="BIGINT">
|
||||
<constraints nullable="true"/>
|
||||
</column>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="0358-client-alternate-dip-timestamp" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_client" columnName="alternate_dip_timestamp"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_client">
|
||||
<column name="alternate_dip_timestamp" type="VARCHAR(50)">
|
||||
<constraints nullable="true"/>
|
||||
</column>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<!-- 0256: education fields -->
|
||||
<changeSet id="0358-client-education-level" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_client" columnName="education_level_cv_id"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_client">
|
||||
<column name="education_level_cv_id" type="BIGINT"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="0358-client-degree-qualification" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_client" columnName="degree_qualification_cv_id"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_client">
|
||||
<column name="degree_qualification_cv_id" type="BIGINT"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<!-- 0257: religion + social category -->
|
||||
<changeSet id="0358-client-religion" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_client" columnName="religion_cv_id"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_client">
|
||||
<column name="religion_cv_id" type="BIGINT"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="0358-client-social-category" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_client" columnName="social_category_cv_id"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_client">
|
||||
<column name="social_category_cv_id" type="BIGINT"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<!-- 0258: agriculture income -->
|
||||
<changeSet id="0358-client-agriculture-income" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_client" columnName="agriculture_income"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_client">
|
||||
<column name="agriculture_income" type="DECIMAL(19,6)"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="0358-client-non-agriculture-income" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_client" columnName="non_agriculture_income"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_client">
|
||||
<column name="non_agriculture_income" type="DECIMAL(19,6)"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
</databaseChangeLog>
|
||||
+299
@@ -0,0 +1,299 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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.1.xsd">
|
||||
|
||||
<!-- Idempotent catch-up for m_client_kyc columns from migrations 0218/0246/0248/0250
|
||||
that lack preConditions guards. Safe to run on environments where columns already exist. -->
|
||||
|
||||
<!-- 0218: PAN response fields (no preConditions in original migration) -->
|
||||
<changeSet id="0359-kyc-pan-full-name" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_client_kyc" columnName="pan_full_name"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_client_kyc">
|
||||
<column name="pan_full_name" type="VARCHAR(200)"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<!-- Created as VARCHAR(20) directly — covers both 0218 (VARCHAR(5)) and 0246-0 widening -->
|
||||
<changeSet id="0359-kyc-pan-aadhaar-seeding-status" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_client_kyc" columnName="pan_aadhaar_seeding_status"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_client_kyc">
|
||||
<column name="pan_aadhaar_seeding_status" type="VARCHAR(20)"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="0359-kyc-pan-category" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_client_kyc" columnName="pan_category"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_client_kyc">
|
||||
<column name="pan_category" type="VARCHAR(50)"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="0359-kyc-pan-status" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_client_kyc" columnName="pan_status"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_client_kyc">
|
||||
<column name="pan_status" type="VARCHAR(20)"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<!-- 0246: Extended KYC fields -->
|
||||
<changeSet id="0359-kyc-enterprise-pan" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_client_kyc" columnName="enterprise_pan"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_client_kyc">
|
||||
<column name="enterprise_pan" type="VARCHAR(10)"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="0359-kyc-cin-number" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_client_kyc" columnName="cin_number"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_client_kyc">
|
||||
<column name="cin_number" type="VARCHAR(21)"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="0359-kyc-incorporation-date" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_client_kyc" columnName="incorporation_date"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_client_kyc">
|
||||
<column name="incorporation_date" type="DATE"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="0359-kyc-document-name" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_client_kyc" columnName="kyc_document_name"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_client_kyc">
|
||||
<column name="kyc_document_name" type="VARCHAR(100)"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="0359-kyc-document-number" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_client_kyc" columnName="kyc_document_number"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_client_kyc">
|
||||
<column name="kyc_document_number" type="VARCHAR(50)"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="0359-kyc-doc-issue-date" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_client_kyc" columnName="kyc_doc_issue_date"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_client_kyc">
|
||||
<column name="kyc_doc_issue_date" type="DATE"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="0359-kyc-doc-expiry-date" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_client_kyc" columnName="kyc_doc_expiry_date"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_client_kyc">
|
||||
<column name="kyc_doc_expiry_date" type="DATE"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="0359-kyc-aml-check-status" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_client_kyc" columnName="aml_check_status"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_client_kyc">
|
||||
<column name="aml_check_status" type="VARCHAR(20)"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="0359-kyc-banned-entity-match" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_client_kyc" columnName="banned_entity_match"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_client_kyc">
|
||||
<column name="banned_entity_match" type="VARCHAR(10)"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="0359-kyc-willful-defaulter" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_client_kyc" columnName="willful_defaulter"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_client_kyc">
|
||||
<column name="willful_defaulter" type="VARCHAR(10)"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="0359-kyc-ecgc-sal-flag" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_client_kyc" columnName="ecgc_sal_flag"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_client_kyc">
|
||||
<column name="ecgc_sal_flag" type="VARCHAR(10)"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="0359-kyc-dormant-flag" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_client_kyc" columnName="dormant_flag"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_client_kyc">
|
||||
<column name="dormant_flag" type="VARCHAR(20)"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="0359-kyc-account-status" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_client_kyc" columnName="account_status"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_client_kyc">
|
||||
<column name="account_status" type="VARCHAR(20)"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="0359-kyc-freeze-reason" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_client_kyc" columnName="freeze_reason"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_client_kyc">
|
||||
<column name="freeze_reason" type="VARCHAR(200)"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="0359-kyc-freeze-authority" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_client_kyc" columnName="freeze_authority"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_client_kyc">
|
||||
<column name="freeze_authority" type="VARCHAR(100)"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="0359-kyc-form60-type" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_client_kyc" columnName="form60_type"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_client_kyc">
|
||||
<column name="form60_type" type="VARCHAR(20)"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="0359-kyc-form60-date" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_client_kyc" columnName="form60_date"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_client_kyc">
|
||||
<column name="form60_date" type="DATE"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="0359-kyc-form15-applicable" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_client_kyc" columnName="form15_applicable"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_client_kyc">
|
||||
<column name="form15_applicable" type="BOOLEAN"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="0359-kyc-form15-type" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_client_kyc" columnName="form15_type"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_client_kyc">
|
||||
<column name="form15_type" type="VARCHAR(10)"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="0359-kyc-form15-fy" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_client_kyc" columnName="form15_fy"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_client_kyc">
|
||||
<column name="form15_fy" type="VARCHAR(10)"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<!-- 0248: CIN / DIN verification -->
|
||||
<changeSet id="0359-kyc-cin-verified" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_client_kyc" columnName="cin_verified"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_client_kyc">
|
||||
<column name="cin_verified" type="BOOLEAN" defaultValueBoolean="false">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="0359-kyc-cin-verified-on" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_client_kyc" columnName="cin_verified_on"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_client_kyc">
|
||||
<column name="cin_verified_on" type="DATE"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="0359-kyc-din-number" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_client_kyc" columnName="din_number"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_client_kyc">
|
||||
<column name="din_number" type="VARCHAR(8)"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="0359-kyc-din-verified" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_client_kyc" columnName="din_verified"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_client_kyc">
|
||||
<column name="din_verified" type="BOOLEAN" defaultValueBoolean="false">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="0359-kyc-din-verified-on" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_client_kyc" columnName="din_verified_on"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_client_kyc">
|
||||
<column name="din_verified_on" type="DATE"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<!-- 0250: Director fields -->
|
||||
<changeSet id="0359-kyc-is-director" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_client_kyc" columnName="is_director"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_client_kyc">
|
||||
<column name="is_director" type="BOOLEAN" defaultValueBoolean="false">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="0359-kyc-din-mca-response" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_client_kyc" columnName="din_mca_response"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_client_kyc">
|
||||
<column name="din_mca_response" type="TEXT"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
</databaseChangeLog>
|
||||
+154
@@ -0,0 +1,154 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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.1.xsd">
|
||||
|
||||
<!-- Idempotent catch-up for m_family_members columns (0217, 0237, 0242)
|
||||
and m_client_nominee columns (0243) that lack preConditions guards. -->
|
||||
|
||||
<!-- 0217: Nominee fields -->
|
||||
<changeSet id="0360-fm-nomination-type" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_family_members" columnName="nomination_type"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_family_members">
|
||||
<column name="nomination_type" type="VARCHAR(50)"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="0360-fm-percentage-share" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_family_members" columnName="percentage_share"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_family_members">
|
||||
<column name="percentage_share" type="DECIMAL(5,2)"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="0360-fm-remarks" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_family_members" columnName="remarks"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_family_members">
|
||||
<column name="remarks" type="VARCHAR(500)"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<!-- 0237: Extended family member fields -->
|
||||
<changeSet id="0360-fm-aadhaar-number" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_family_members" columnName="aadhaar_number"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_family_members">
|
||||
<column name="aadhaar_number" type="VARCHAR(12)"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="0360-fm-pan-number" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_family_members" columnName="pan_number"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_family_members">
|
||||
<column name="pan_number" type="VARCHAR(10)"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="0360-fm-nationality" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_family_members" columnName="nationality"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_family_members">
|
||||
<column name="nationality" type="VARCHAR(50)"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="0360-fm-is-alive" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_family_members" columnName="is_alive"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_family_members">
|
||||
<column name="is_alive" type="BOOLEAN" defaultValueBoolean="true"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="0360-fm-linked-client-id" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_family_members" columnName="linked_client_id"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_family_members">
|
||||
<column name="linked_client_id" type="BIGINT"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="0360-fm-marriage-date" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_family_members" columnName="marriage_date"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_family_members">
|
||||
<column name="marriage_date" type="DATE"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<!-- FK: linked_client_id → m_client.id ON DELETE SET NULL -->
|
||||
<changeSet id="0360-fm-linked-client-fk" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<columnExists tableName="m_family_members" columnName="linked_client_id"/>
|
||||
<not>
|
||||
<foreignKeyConstraintExists foreignKeyTableName="m_family_members"
|
||||
foreignKeyName="fk_family_members_linked_client"/>
|
||||
</not>
|
||||
</preConditions>
|
||||
<addForeignKeyConstraint
|
||||
constraintName="fk_family_members_linked_client"
|
||||
baseTableName="m_family_members"
|
||||
baseColumnNames="linked_client_id"
|
||||
referencedTableName="m_client"
|
||||
referencedColumnNames="id"
|
||||
onDelete="SET NULL"/>
|
||||
</changeSet>
|
||||
|
||||
<!-- 0242: Marriage authority -->
|
||||
<changeSet id="0360-fm-marriage-authority" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_family_members" columnName="marriage_authority"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_family_members">
|
||||
<column name="marriage_authority" type="VARCHAR(50)"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<!-- 0243: Nominee identifier fields on m_client_nominee
|
||||
tableExists guard: if table is absent, 0367 will createTable with these columns included -->
|
||||
<changeSet id="0360-nominee-identifier" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<tableExists tableName="m_client_nominee"/>
|
||||
<not><columnExists tableName="m_client_nominee" columnName="nominee_identifier"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_client_nominee">
|
||||
<column name="nominee_identifier" type="VARCHAR(50)">
|
||||
<constraints unique="true" uniqueConstraintName="uq_nominee_identifier"/>
|
||||
</column>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="0360-nominee-account-no" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<tableExists tableName="m_client_nominee"/>
|
||||
<not><columnExists tableName="m_client_nominee" columnName="account_no"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_client_nominee">
|
||||
<column name="account_no" type="VARCHAR(50)"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="0360-nominee-account-type" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<tableExists tableName="m_client_nominee"/>
|
||||
<not><columnExists tableName="m_client_nominee" columnName="account_type"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_client_nominee">
|
||||
<column name="account_type" type="VARCHAR(10)"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
</databaseChangeLog>
|
||||
+144
@@ -0,0 +1,144 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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.1.xsd">
|
||||
|
||||
<!-- Idempotent catch-up for miscellaneous columns across multiple tables
|
||||
from migrations 0207, 0212, 0245, 0249, 0320, 0348 that lack preConditions,
|
||||
plus PeriodFrequency reference data from unregistered 0250 file. -->
|
||||
|
||||
<!-- 0207: Loan tranche field -->
|
||||
<changeSet id="0361-product-loan-allow-full-term" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_product_loan" columnName="allow_full_term_for_tranche"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_product_loan">
|
||||
<column name="allow_full_term_for_tranche" type="BOOLEAN" defaultValueBoolean="false">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="0361-loan-allow-full-term" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_loan" columnName="allow_full_term_for_tranche"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_loan">
|
||||
<column name="allow_full_term_for_tranche" type="BOOLEAN" defaultValueBoolean="false">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<!-- 0212: Force password reset -->
|
||||
<changeSet id="0361-appuser-password-reset-required" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_appuser" columnName="password_reset_required"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_appuser">
|
||||
<column name="password_reset_required" type="BOOLEAN" defaultValueBoolean="false">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<!-- 0245: Address client FK column (changeSet 0245-1 has no preConditions) -->
|
||||
<changeSet id="0361-address-client-id" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_address" columnName="client_id"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_address">
|
||||
<column name="client_id" type="BIGINT"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<!-- 0249: Non-person extended fields -->
|
||||
<changeSet id="0361-non-person-authorized-signatory" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_client_non_person" columnName="authorized_signatory"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_client_non_person">
|
||||
<column name="authorized_signatory" type="VARCHAR(500)"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="0361-non-person-additional-info" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_client_non_person" columnName="additional_info"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_client_non_person">
|
||||
<column name="additional_info" type="VARCHAR(500)"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="0361-non-person-date-of-registration" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_client_non_person" columnName="date_of_registration"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_client_non_person">
|
||||
<column name="date_of_registration" type="DATE"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<!-- 0320: Payment type on denomination -->
|
||||
<changeSet id="0361-savings-txn-payment-type" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_savings_txn_denomination" columnName="payment_type"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_savings_txn_denomination">
|
||||
<column name="payment_type" type="VARCHAR(100)"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<!-- 0348: Election config duration -->
|
||||
<changeSet id="0361-election-config-duration-years" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_election_config" columnName="duration_years"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_election_config">
|
||||
<column name="duration_years" type="INT"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<!-- PeriodFrequency reference data from unregistered 0250_add_period_frequency_options.xml -->
|
||||
<changeSet id="0361-period-frequency-code" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">
|
||||
SELECT COUNT(*) FROM m_code WHERE code_name = 'PeriodFrequency'
|
||||
</sqlCheck>
|
||||
</preConditions>
|
||||
<sql>
|
||||
INSERT INTO m_code (code_name, is_system_defined)
|
||||
SELECT 'PeriodFrequency', true
|
||||
WHERE NOT EXISTS (SELECT 1 FROM m_code WHERE code_name = 'PeriodFrequency');
|
||||
</sql>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="0361-period-frequency-values" author="CBS">
|
||||
<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 = 'PeriodFrequency'
|
||||
</sqlCheck>
|
||||
</preConditions>
|
||||
<sql>
|
||||
INSERT INTO m_code_value (code_id, code_value, order_position)
|
||||
SELECT c.id, 'Monthly', 1 FROM m_code c WHERE c.code_name = 'PeriodFrequency'
|
||||
AND NOT EXISTS (SELECT 1 FROM m_code_value cv2 JOIN m_code c2 ON c2.id = cv2.code_id WHERE c2.code_name = 'PeriodFrequency' AND cv2.code_value = 'Monthly');
|
||||
|
||||
INSERT INTO m_code_value (code_id, code_value, order_position)
|
||||
SELECT c.id, 'Quarterly', 2 FROM m_code c WHERE c.code_name = 'PeriodFrequency'
|
||||
AND NOT EXISTS (SELECT 1 FROM m_code_value cv2 JOIN m_code c2 ON c2.id = cv2.code_id WHERE c2.code_name = 'PeriodFrequency' AND cv2.code_value = 'Quarterly');
|
||||
|
||||
INSERT INTO m_code_value (code_id, code_value, order_position)
|
||||
SELECT c.id, 'Half Yearly', 3 FROM m_code c WHERE c.code_name = 'PeriodFrequency'
|
||||
AND NOT EXISTS (SELECT 1 FROM m_code_value cv2 JOIN m_code c2 ON c2.id = cv2.code_id WHERE c2.code_name = 'PeriodFrequency' AND cv2.code_value = 'Half Yearly');
|
||||
|
||||
INSERT INTO m_code_value (code_id, code_value, order_position)
|
||||
SELECT c.id, 'Yearly', 4 FROM m_code c WHERE c.code_name = 'PeriodFrequency'
|
||||
AND NOT EXISTS (SELECT 1 FROM m_code_value cv2 JOIN m_code c2 ON c2.id = cv2.code_id WHERE c2.code_name = 'PeriodFrequency' AND cv2.code_value = 'Yearly');
|
||||
</sql>
|
||||
</changeSet>
|
||||
|
||||
</databaseChangeLog>
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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.1.xsd">
|
||||
|
||||
<!-- Idempotent catch-up for m_rbi_feed_item table and columns
|
||||
from migrations 0219 (createTable) and 0221 (addColumn) that lack preConditions. -->
|
||||
|
||||
<!-- 0219: Create RBI feed table -->
|
||||
<changeSet id="0362-create-rbi-feed-item" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><tableExists tableName="m_rbi_feed_item"/></not>
|
||||
</preConditions>
|
||||
<createTable tableName="m_rbi_feed_item">
|
||||
<column name="id" type="BIGINT" autoIncrement="true">
|
||||
<constraints primaryKey="true" nullable="false"/>
|
||||
</column>
|
||||
<column name="title" type="VARCHAR(1000)">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="description" type="TEXT"/>
|
||||
<column name="link" type="VARCHAR(1000)">
|
||||
<constraints nullable="false" unique="true" uniqueConstraintName="uk_rbi_feed_item_link"/>
|
||||
</column>
|
||||
<column name="pub_date" type="DATETIME"/>
|
||||
<column name="category" type="VARCHAR(50)">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="fetched_on" type="DATETIME"/>
|
||||
</createTable>
|
||||
</changeSet>
|
||||
|
||||
<!-- 0221: OpenProject work package fields -->
|
||||
<changeSet id="0362-rbi-feed-openproject-wp-id" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_rbi_feed_item" columnName="openproject_wp_id"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_rbi_feed_item">
|
||||
<column name="openproject_wp_id" type="BIGINT"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="0362-rbi-feed-openproject-wp-status" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_rbi_feed_item" columnName="openproject_wp_status"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_rbi_feed_item">
|
||||
<column name="openproject_wp_status" type="VARCHAR(100)"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="0362-rbi-feed-openproject-wp-progress" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_rbi_feed_item" columnName="openproject_wp_progress"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_rbi_feed_item">
|
||||
<column name="openproject_wp_progress" type="INT"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
</databaseChangeLog>
|
||||
+308
@@ -0,0 +1,308 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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.1.xsd">
|
||||
|
||||
<!-- Idempotent catch-up for m_savings_product enhanced fields (0251)
|
||||
and facility/limit child tables (0252, 0253, 0254) that lack preConditions. -->
|
||||
|
||||
<!-- 0251: Enhanced savings product fields (addColumn) -->
|
||||
<changeSet id="0363-sp-account-type" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_savings_product" columnName="account_type"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_savings_product">
|
||||
<column name="account_type" type="VARCHAR(50)"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="0363-sp-customer-segment" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_savings_product" columnName="customer_segment"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_savings_product">
|
||||
<column name="customer_segment" type="VARCHAR(50)"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="0363-sp-product-code" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_savings_product" columnName="product_code"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_savings_product">
|
||||
<column name="product_code" type="VARCHAR(20)">
|
||||
<constraints unique="true"/>
|
||||
</column>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="0363-sp-effective-date" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_savings_product" columnName="effective_date"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_savings_product">
|
||||
<column name="effective_date" type="DATE"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="0363-sp-effective-to" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_savings_product" columnName="effective_to"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_savings_product">
|
||||
<column name="effective_to" type="DATE"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="0363-sp-end-date" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_savings_product" columnName="end_date"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_savings_product">
|
||||
<column name="end_date" type="DATE"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="0363-sp-introducer-required" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_savings_product" columnName="introducer_required"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_savings_product">
|
||||
<column name="introducer_required" type="BOOLEAN" defaultValueBoolean="false">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="0363-sp-share-linking-enabled" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_savings_product" columnName="share_linking_enabled"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_savings_product">
|
||||
<column name="share_linking_enabled" type="BOOLEAN" defaultValueBoolean="false">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="0363-sp-nomination-facility" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_savings_product" columnName="nomination_facility"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_savings_product">
|
||||
<column name="nomination_facility" type="BOOLEAN" defaultValueBoolean="false">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="0363-sp-dormancy-alert" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_savings_product" columnName="dormancy_alert"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_savings_product">
|
||||
<column name="dormancy_alert" type="BOOLEAN" defaultValueBoolean="false">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="0363-sp-interest-calculate-selector" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_savings_product" columnName="interest_calculate_selector"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_savings_product">
|
||||
<column name="interest_calculate_selector" type="INT"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="0363-sp-average-period" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_savings_product" columnName="average_period"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_savings_product">
|
||||
<column name="average_period" type="VARCHAR(20)"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="0363-sp-auto-post" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_savings_product" columnName="auto_post"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_savings_product">
|
||||
<column name="auto_post" type="BOOLEAN" defaultValueBoolean="false">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="0363-sp-frequency-fix-day" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_savings_product" columnName="frequency_fix_day"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_savings_product">
|
||||
<column name="frequency_fix_day" type="INT"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="0363-sp-last-interest-date" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_savings_product" columnName="last_interest_date"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_savings_product">
|
||||
<column name="last_interest_date" type="DATE"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="0363-sp-enable-lockin-period" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_savings_product" columnName="enable_lockin_period"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_savings_product">
|
||||
<column name="enable_lockin_period" type="BOOLEAN" defaultValueBoolean="false">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<!-- 0252: Facility config child table -->
|
||||
<changeSet id="0363-create-savings-product-facility-config" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><tableExists tableName="m_savings_product_facility_config"/></not>
|
||||
</preConditions>
|
||||
<createTable tableName="m_savings_product_facility_config">
|
||||
<column name="id" type="BIGINT" autoIncrement="true">
|
||||
<constraints primaryKey="true" nullable="false"/>
|
||||
</column>
|
||||
<column name="savings_product_id" type="BIGINT">
|
||||
<constraints nullable="false" unique="true"/>
|
||||
</column>
|
||||
<column name="atm_facility" type="BOOLEAN" defaultValueBoolean="false">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="atm_withdrawal_facility" type="BOOLEAN" defaultValueBoolean="false">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="upi_facility" type="BOOLEAN" defaultValueBoolean="false">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="pos_transactions_facility" type="BOOLEAN" defaultValueBoolean="false">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="cheque_book" type="BOOLEAN" defaultValueBoolean="false">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="imps_facility" type="BOOLEAN" defaultValueBoolean="false">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="sms_alerts" type="BOOLEAN" defaultValueBoolean="false">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="bbps_facility" type="BOOLEAN" defaultValueBoolean="false">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="insurance_cover" type="BOOLEAN" defaultValueBoolean="false">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="bepg_facility" type="BOOLEAN" defaultValueBoolean="false">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="neft_facility" type="BOOLEAN" defaultValueBoolean="false">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="rtgs_facility" type="BOOLEAN" defaultValueBoolean="false">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="inter_bank_total_cap_facility" type="BOOLEAN" defaultValueBoolean="false">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="withdrawal_facility" type="BOOLEAN" defaultValueBoolean="false">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="deposit_facility_kyc" type="BOOLEAN" defaultValueBoolean="false">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="virtual_debit_card" type="BOOLEAN" defaultValueBoolean="false">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="created_date" type="DATETIME" defaultValueComputed="CURRENT_TIMESTAMP">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
</createTable>
|
||||
<addForeignKeyConstraint
|
||||
constraintName="fk_savings_product_facility_config_product_id"
|
||||
baseTableName="m_savings_product_facility_config"
|
||||
baseColumnNames="savings_product_id"
|
||||
referencedTableName="m_savings_product"
|
||||
referencedColumnNames="id"
|
||||
onDelete="CASCADE"/>
|
||||
</changeSet>
|
||||
|
||||
<!-- 0253: Facility limits child table -->
|
||||
<changeSet id="0363-create-savings-product-facility-limits" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><tableExists tableName="m_savings_product_facility_limits"/></not>
|
||||
</preConditions>
|
||||
<createTable tableName="m_savings_product_facility_limits">
|
||||
<column name="id" type="BIGINT" autoIncrement="true">
|
||||
<constraints primaryKey="true" nullable="false"/>
|
||||
</column>
|
||||
<column name="savings_product_id" type="BIGINT">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="limit_type" type="VARCHAR(100)">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="general_limit" type="VARCHAR(50)"/>
|
||||
<column name="minor_account_limit" type="VARCHAR(50)"/>
|
||||
<column name="small_saving_limit" type="VARCHAR(50)"/>
|
||||
<column name="created_date" type="DATETIME" defaultValueComputed="CURRENT_TIMESTAMP">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
</createTable>
|
||||
<addForeignKeyConstraint
|
||||
constraintName="fk_savings_product_facility_limits_product_id"
|
||||
baseTableName="m_savings_product_facility_limits"
|
||||
baseColumnNames="savings_product_id"
|
||||
referencedTableName="m_savings_product"
|
||||
referencedColumnNames="id"
|
||||
onDelete="CASCADE"/>
|
||||
<createIndex tableName="m_savings_product_facility_limits"
|
||||
indexName="idx_savings_product_facility_limits_product_type">
|
||||
<column name="savings_product_id"/>
|
||||
<column name="limit_type"/>
|
||||
</createIndex>
|
||||
</changeSet>
|
||||
|
||||
<!-- 0254: Deposit limit KYC child table -->
|
||||
<changeSet id="0363-create-savings-product-deposit-limit-kyc" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><tableExists tableName="m_savings_product_deposit_limit_kyc"/></not>
|
||||
</preConditions>
|
||||
<createTable tableName="m_savings_product_deposit_limit_kyc">
|
||||
<column name="id" type="BIGINT" autoIncrement="true">
|
||||
<constraints primaryKey="true" nullable="false"/>
|
||||
</column>
|
||||
<column name="savings_product_id" type="BIGINT">
|
||||
<constraints nullable="false" unique="true"/>
|
||||
</column>
|
||||
<column name="general_kyc_type" type="VARCHAR(50)"/>
|
||||
<column name="general_limit" type="VARCHAR(50)"/>
|
||||
<column name="minor_kyc_type" type="VARCHAR(50)"/>
|
||||
<column name="minor_limit" type="BIGINT"/>
|
||||
<column name="small_saving_kyc_type" type="VARCHAR(50)"/>
|
||||
<column name="small_saving_limit" type="BIGINT"/>
|
||||
<column name="created_date" type="DATETIME" defaultValueComputed="CURRENT_TIMESTAMP">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
</createTable>
|
||||
<addForeignKeyConstraint
|
||||
constraintName="fk_savings_product_deposit_limit_kyc_product_id"
|
||||
baseTableName="m_savings_product_deposit_limit_kyc"
|
||||
baseColumnNames="savings_product_id"
|
||||
referencedTableName="m_savings_product"
|
||||
referencedColumnNames="id"
|
||||
onDelete="CASCADE"/>
|
||||
</changeSet>
|
||||
|
||||
</databaseChangeLog>
|
||||
+337
@@ -0,0 +1,337 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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.1.xsd">
|
||||
|
||||
<!-- Idempotent catch-up for m_current_product and child tables
|
||||
from migrations 0255-0259, 0262, 0273 that lack preConditions. -->
|
||||
|
||||
<!-- 0255: Main current product table -->
|
||||
<changeSet id="0364-create-current-product" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><tableExists tableName="m_current_product"/></not>
|
||||
</preConditions>
|
||||
<createTable tableName="m_current_product">
|
||||
<column name="id" type="BIGINT" autoIncrement="true">
|
||||
<constraints primaryKey="true" nullable="false"/>
|
||||
</column>
|
||||
<column name="name" type="VARCHAR(100)">
|
||||
<constraints nullable="false" unique="true" uniqueConstraintName="cp_unq_name"/>
|
||||
</column>
|
||||
<column name="short_name" type="VARCHAR(4)">
|
||||
<constraints nullable="false" unique="true" uniqueConstraintName="cp_unq_short_name"/>
|
||||
</column>
|
||||
<column name="description" type="VARCHAR(500)">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="deposit_type_enum" type="SMALLINT" defaultValueNumeric="400">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="currency_code" type="VARCHAR(3)">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="currency_digits" type="SMALLINT">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="currency_multiplesof" type="SMALLINT"/>
|
||||
<column name="nominal_annual_interest_rate" type="DECIMAL(19,6)">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="interest_compounding_period_enum" type="SMALLINT">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="interest_posting_period_enum" type="SMALLINT" defaultValueNumeric="4">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="interest_calculation_type_enum" type="SMALLINT">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="interest_calculation_days_in_year_type_enum" type="SMALLINT">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="min_required_opening_balance" type="DECIMAL(19,6)"/>
|
||||
<column name="lockin_period_frequency" type="INT"/>
|
||||
<column name="lockin_period_frequency_enum" type="SMALLINT"/>
|
||||
<column name="accounting_type" type="SMALLINT">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="withdrawal_fee_for_transfer" type="BOOLEAN" defaultValueBoolean="true">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="allow_overdraft" type="BOOLEAN" defaultValueBoolean="false">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="overdraft_limit" type="DECIMAL(19,6)"/>
|
||||
<column name="nominal_annual_interest_rate_overdraft" type="DECIMAL(19,6)" defaultValueNumeric="0.000000"/>
|
||||
<column name="min_overdraft_for_interest_calculation" type="DECIMAL(19,6)" defaultValueNumeric="0.000000"/>
|
||||
<column name="enforce_min_required_balance" type="BOOLEAN" defaultValueBoolean="false">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="min_required_balance" type="DECIMAL(19,6)"/>
|
||||
<column name="is_lien_allowed" type="BOOLEAN" defaultValueBoolean="false">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="max_allowed_lien_limit" type="DECIMAL(19,6)"/>
|
||||
<column name="min_balance_for_interest_calculation" type="DECIMAL(19,6)"/>
|
||||
<column name="withhold_tax" type="BOOLEAN" defaultValueBoolean="false">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="tax_group_id" type="BIGINT"/>
|
||||
<column name="is_dormancy_tracking_active" type="BOOLEAN"/>
|
||||
<column name="days_to_inactive" type="INT"/>
|
||||
<column name="days_to_dormancy" type="INT"/>
|
||||
<column name="days_to_escheat" type="INT"/>
|
||||
<column name="other_gl_mappings" type="LONGTEXT"/>
|
||||
<column name="account_type" type="VARCHAR(50)"/>
|
||||
<column name="customer_segment" type="VARCHAR(50)"/>
|
||||
<column name="product_code" type="VARCHAR(20)">
|
||||
<constraints unique="true" uniqueConstraintName="cp_unq_product_code"/>
|
||||
</column>
|
||||
<column name="effective_date" type="DATE"/>
|
||||
<column name="effective_to" type="DATE"/>
|
||||
<column name="end_date" type="DATE"/>
|
||||
<column name="introducer_required" type="BOOLEAN" defaultValueBoolean="false">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="share_linking_enabled" type="BOOLEAN" defaultValueBoolean="false">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="nomination_facility" type="BOOLEAN" defaultValueBoolean="false">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="dormancy_alert" type="BOOLEAN" defaultValueBoolean="false">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="interest_calculate_selector" type="INT"/>
|
||||
<column name="average_period" type="VARCHAR(20)"/>
|
||||
<column name="auto_post" type="BOOLEAN" defaultValueBoolean="false">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="frequency_fix_day" type="INT"/>
|
||||
<column name="last_interest_date" type="DATE"/>
|
||||
<column name="enable_lockin_period" type="BOOLEAN" defaultValueBoolean="false">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="balance_frequency" type="VARCHAR(50)"/>
|
||||
<column name="account_closed_zero_balance_in_day_closing" type="BOOLEAN" defaultValueBoolean="false"/>
|
||||
</createTable>
|
||||
<addForeignKeyConstraint
|
||||
constraintName="fk_current_product_tax_group"
|
||||
baseTableName="m_current_product"
|
||||
baseColumnNames="tax_group_id"
|
||||
referencedTableName="m_tax_group"
|
||||
referencedColumnNames="id"/>
|
||||
</changeSet>
|
||||
|
||||
<!-- 0256: Charge junction table -->
|
||||
<changeSet id="0364-create-current-product-charge" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><tableExists tableName="m_current_product_charge"/></not>
|
||||
</preConditions>
|
||||
<createTable tableName="m_current_product_charge">
|
||||
<column name="current_product_id" type="BIGINT">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="charge_id" type="BIGINT">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
</createTable>
|
||||
<addPrimaryKey tableName="m_current_product_charge"
|
||||
columnNames="current_product_id,charge_id"
|
||||
constraintName="pk_current_product_charge"/>
|
||||
<addForeignKeyConstraint
|
||||
constraintName="fk_current_product_charge_product"
|
||||
baseTableName="m_current_product_charge"
|
||||
baseColumnNames="current_product_id"
|
||||
referencedTableName="m_current_product"
|
||||
referencedColumnNames="id"/>
|
||||
<addForeignKeyConstraint
|
||||
constraintName="fk_current_product_charge_charge"
|
||||
baseTableName="m_current_product_charge"
|
||||
baseColumnNames="charge_id"
|
||||
referencedTableName="m_charge"
|
||||
referencedColumnNames="id"/>
|
||||
</changeSet>
|
||||
|
||||
<!-- 0257: Facility config child table -->
|
||||
<changeSet id="0364-create-current-product-facility-config" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><tableExists tableName="m_current_product_facility_config"/></not>
|
||||
</preConditions>
|
||||
<createTable tableName="m_current_product_facility_config">
|
||||
<column name="id" type="BIGINT" autoIncrement="true">
|
||||
<constraints primaryKey="true" nullable="false"/>
|
||||
</column>
|
||||
<column name="current_product_id" type="BIGINT">
|
||||
<constraints nullable="false" unique="true" uniqueConstraintName="uq_current_product_facility_config_product_id"/>
|
||||
</column>
|
||||
<column name="atm_facility" type="BOOLEAN" defaultValueBoolean="false"/>
|
||||
<column name="atm_withdrawal_facility" type="BOOLEAN" defaultValueBoolean="false"/>
|
||||
<column name="upi_facility" type="BOOLEAN" defaultValueBoolean="false"/>
|
||||
<column name="pos_transactions_facility" type="BOOLEAN" defaultValueBoolean="false"/>
|
||||
<column name="cheque_book" type="BOOLEAN" defaultValueBoolean="false"/>
|
||||
<column name="imps_facility" type="BOOLEAN" defaultValueBoolean="false"/>
|
||||
<column name="sms_alerts" type="BOOLEAN" defaultValueBoolean="false"/>
|
||||
<column name="bbps_facility" type="BOOLEAN" defaultValueBoolean="false"/>
|
||||
<column name="insurance_cover" type="BOOLEAN" defaultValueBoolean="false"/>
|
||||
<column name="bepg_facility" type="BOOLEAN" defaultValueBoolean="false"/>
|
||||
<column name="neft_facility" type="BOOLEAN" defaultValueBoolean="false"/>
|
||||
<column name="rtgs_facility" type="BOOLEAN" defaultValueBoolean="false"/>
|
||||
<column name="inter_bank_total_cap_facility" type="BOOLEAN" defaultValueBoolean="false"/>
|
||||
<column name="withdrawal_facility" type="BOOLEAN" defaultValueBoolean="false"/>
|
||||
<column name="deposit_facility_kyc" type="BOOLEAN" defaultValueBoolean="false"/>
|
||||
<column name="virtual_debit_card" type="BOOLEAN" defaultValueBoolean="false"/>
|
||||
<column name="created_date" type="DATETIME"/>
|
||||
</createTable>
|
||||
<addForeignKeyConstraint
|
||||
constraintName="fk_current_product_facility_config_product_id"
|
||||
baseTableName="m_current_product_facility_config"
|
||||
baseColumnNames="current_product_id"
|
||||
referencedTableName="m_current_product"
|
||||
referencedColumnNames="id"
|
||||
onDelete="CASCADE"/>
|
||||
</changeSet>
|
||||
|
||||
<!-- 0258: Facility limits child table -->
|
||||
<changeSet id="0364-create-current-product-facility-limits" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><tableExists tableName="m_current_product_facility_limits"/></not>
|
||||
</preConditions>
|
||||
<createTable tableName="m_current_product_facility_limits">
|
||||
<column name="id" type="BIGINT" autoIncrement="true">
|
||||
<constraints primaryKey="true" nullable="false"/>
|
||||
</column>
|
||||
<column name="current_product_id" type="BIGINT">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="limit_type" type="VARCHAR(100)">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="general_limit" type="VARCHAR(50)"/>
|
||||
<column name="minor_account_limit" type="VARCHAR(50)"/>
|
||||
<column name="small_saving_limit" type="VARCHAR(50)"/>
|
||||
<column name="created_date" type="DATETIME"/>
|
||||
</createTable>
|
||||
<addForeignKeyConstraint
|
||||
constraintName="fk_current_product_facility_limits_product_id"
|
||||
baseTableName="m_current_product_facility_limits"
|
||||
baseColumnNames="current_product_id"
|
||||
referencedTableName="m_current_product"
|
||||
referencedColumnNames="id"
|
||||
onDelete="CASCADE"/>
|
||||
<createIndex tableName="m_current_product_facility_limits"
|
||||
indexName="idx_current_product_facility_limits_product_type">
|
||||
<column name="current_product_id"/>
|
||||
<column name="limit_type"/>
|
||||
</createIndex>
|
||||
</changeSet>
|
||||
|
||||
<!-- 0259: Deposit limit KYC child table -->
|
||||
<changeSet id="0364-create-current-product-deposit-limit-kyc" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><tableExists tableName="m_current_product_deposit_limit_kyc"/></not>
|
||||
</preConditions>
|
||||
<createTable tableName="m_current_product_deposit_limit_kyc">
|
||||
<column name="id" type="BIGINT" autoIncrement="true">
|
||||
<constraints primaryKey="true" nullable="false"/>
|
||||
</column>
|
||||
<column name="current_product_id" type="BIGINT">
|
||||
<constraints nullable="false" unique="true" uniqueConstraintName="uq_current_product_deposit_limit_kyc_product_id"/>
|
||||
</column>
|
||||
<column name="general_kyc_type" type="VARCHAR(50)"/>
|
||||
<column name="general_limit" type="VARCHAR(50)"/>
|
||||
<column name="minor_kyc_type" type="VARCHAR(50)"/>
|
||||
<column name="minor_limit" type="BIGINT"/>
|
||||
<column name="small_saving_kyc_type" type="VARCHAR(50)"/>
|
||||
<column name="small_saving_limit" type="BIGINT"/>
|
||||
<column name="created_date" type="DATETIME"/>
|
||||
</createTable>
|
||||
<addForeignKeyConstraint
|
||||
constraintName="fk_current_product_deposit_limit_kyc_product_id"
|
||||
baseTableName="m_current_product_deposit_limit_kyc"
|
||||
baseColumnNames="current_product_id"
|
||||
referencedTableName="m_current_product"
|
||||
referencedColumnNames="id"
|
||||
onDelete="CASCADE"/>
|
||||
</changeSet>
|
||||
|
||||
<!-- 0262: New UI fields on m_current_product -->
|
||||
<changeSet id="0364-cp-balance-swap-option" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_current_product" columnName="balance_swap_option"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_current_product">
|
||||
<column name="balance_swap_option" type="BOOLEAN" defaultValueBoolean="false">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="0364-cp-msme" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_current_product" columnName="msme"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_current_product">
|
||||
<column name="msme" type="BOOLEAN" defaultValueBoolean="false">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="0364-cp-auto-debit-facility" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_current_product" columnName="auto_debit_facility"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_current_product">
|
||||
<column name="auto_debit_facility" type="BOOLEAN" defaultValueBoolean="false">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="0364-cp-avg-balance-calc-period" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_current_product" columnName="avg_balance_calc_period"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_current_product">
|
||||
<column name="avg_balance_calc_period" type="VARCHAR(10)"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="0364-cp-valid-for-period" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_current_product" columnName="valid_for_period"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_current_product">
|
||||
<column name="valid_for_period" type="VARCHAR(10)"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="0364-cp-od-account-closed-zero-balance" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_current_product" columnName="od_account_closed_zero_balance_in_day_closing"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_current_product">
|
||||
<column name="od_account_closed_zero_balance_in_day_closing" type="BOOLEAN" defaultValueBoolean="false">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<!-- 0273: GL account mapping -->
|
||||
<changeSet id="0364-cp-gl-account-id" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_current_product" columnName="gl_account_id"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_current_product">
|
||||
<column name="gl_account_id" type="BIGINT"/>
|
||||
</addColumn>
|
||||
<addForeignKeyConstraint
|
||||
constraintName="fk_current_product_gl_account"
|
||||
baseTableName="m_current_product"
|
||||
baseColumnNames="gl_account_id"
|
||||
referencedTableName="acc_gl_account"
|
||||
referencedColumnNames="id"/>
|
||||
</changeSet>
|
||||
|
||||
</databaseChangeLog>
|
||||
+155
@@ -0,0 +1,155 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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.1.xsd">
|
||||
|
||||
<!-- Idempotent catch-up for m_clerk_withdrawal_request table and columns
|
||||
from migrations 0321-0327, and m_daily_token_counter from 0324. -->
|
||||
|
||||
<!-- 0321: Create clerk withdrawal request table -->
|
||||
<changeSet id="0366-create-clerk-withdrawal-request" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><tableExists tableName="m_clerk_withdrawal_request"/></not>
|
||||
</preConditions>
|
||||
<createTable tableName="m_clerk_withdrawal_request">
|
||||
<column name="id" type="BIGINT" autoIncrement="true">
|
||||
<constraints primaryKey="true" nullable="false"/>
|
||||
</column>
|
||||
<column name="account_no" type="VARCHAR(50)">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="account_type" type="VARCHAR(20)" defaultValue="SAVINGS">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="savings_account_id" type="BIGINT"/>
|
||||
<column name="client_id" type="BIGINT"/>
|
||||
<column name="client_name" type="VARCHAR(255)"/>
|
||||
<column name="amount" type="DECIMAL(19,6)">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="payment_type_id" type="INT"/>
|
||||
<column name="payment_type_name" type="VARCHAR(100)"/>
|
||||
<column name="description" type="TEXT"/>
|
||||
<column name="cheque_no" type="VARCHAR(50)"/>
|
||||
<column name="bank_name" type="VARCHAR(100)"/>
|
||||
<column name="txn_date" type="DATE"/>
|
||||
<column name="status" type="VARCHAR(20)" defaultValue="PENDING">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="clerk_id" type="BIGINT"/>
|
||||
<column name="clerk_name" type="VARCHAR(255)"/>
|
||||
<column name="clerk_username" type="VARCHAR(100)"/>
|
||||
<column name="manager_id" type="BIGINT"/>
|
||||
<column name="manager_username" type="VARCHAR(100)"/>
|
||||
<column name="rejection_reason" type="TEXT"/>
|
||||
<column name="txn_id" type="VARCHAR(100)"/>
|
||||
<column name="denomination_data" type="TEXT"/>
|
||||
<column name="activity_log" type="TEXT"/>
|
||||
<column name="submitted_at" type="TIMESTAMP" defaultValueComputed="CURRENT_TIMESTAMP">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="actioned_at" type="TIMESTAMP"/>
|
||||
</createTable>
|
||||
<createIndex tableName="m_clerk_withdrawal_request" indexName="idx_cwr_status">
|
||||
<column name="status"/>
|
||||
</createIndex>
|
||||
<createIndex tableName="m_clerk_withdrawal_request" indexName="idx_cwr_clerk_id">
|
||||
<column name="clerk_id"/>
|
||||
</createIndex>
|
||||
<createIndex tableName="m_clerk_withdrawal_request" indexName="idx_cwr_submitted_at">
|
||||
<column name="submitted_at"/>
|
||||
</createIndex>
|
||||
<createIndex tableName="m_clerk_withdrawal_request" indexName="idx_cwr_savings_account_id">
|
||||
<column name="savings_account_id"/>
|
||||
</createIndex>
|
||||
</changeSet>
|
||||
|
||||
<!-- 0322: Token number -->
|
||||
<changeSet id="0366-cwr-tok-no" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_clerk_withdrawal_request" columnName="tok_no"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_clerk_withdrawal_request">
|
||||
<column name="tok_no" type="VARCHAR(50)"/>
|
||||
</addColumn>
|
||||
<createIndex tableName="m_clerk_withdrawal_request" indexName="idx_cwr_tok_no">
|
||||
<column name="tok_no"/>
|
||||
</createIndex>
|
||||
</changeSet>
|
||||
|
||||
<!-- 0323: Manager name -->
|
||||
<changeSet id="0366-cwr-manager-name" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_clerk_withdrawal_request" columnName="manager_name"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_clerk_withdrawal_request">
|
||||
<column name="manager_name" type="VARCHAR(150)"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<!-- 0325: Disbursement fields -->
|
||||
<changeSet id="0366-cwr-cashier-id" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_clerk_withdrawal_request" columnName="cashier_id"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_clerk_withdrawal_request">
|
||||
<column name="cashier_id" type="BIGINT"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="0366-cwr-disbursed-by" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_clerk_withdrawal_request" columnName="disbursed_by"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_clerk_withdrawal_request">
|
||||
<column name="disbursed_by" type="VARCHAR(150)"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="0366-cwr-disbursed-at" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_clerk_withdrawal_request" columnName="disbursed_at"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_clerk_withdrawal_request">
|
||||
<column name="disbursed_at" type="TIMESTAMP"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="0366-cwr-disbursement-denomination-data" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_clerk_withdrawal_request" columnName="disbursement_denomination_data"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_clerk_withdrawal_request">
|
||||
<column name="disbursement_denomination_data" type="TEXT"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<!-- 0327: Voucher number -->
|
||||
<changeSet id="0366-cwr-voucher-no" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><columnExists tableName="m_clerk_withdrawal_request" columnName="voucher_no"/></not>
|
||||
</preConditions>
|
||||
<addColumn tableName="m_clerk_withdrawal_request">
|
||||
<column name="voucher_no" type="VARCHAR(6)"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
|
||||
<!-- 0324: Daily token counter table -->
|
||||
<changeSet id="0366-create-daily-token-counter" author="CBS">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not><tableExists tableName="m_daily_token_counter"/></not>
|
||||
</preConditions>
|
||||
<createTable tableName="m_daily_token_counter">
|
||||
<column name="id" type="BIGINT" autoIncrement="true">
|
||||
<constraints primaryKey="true" nullable="false"/>
|
||||
</column>
|
||||
<column name="counter_date" type="DATE">
|
||||
<constraints nullable="false" unique="true"/>
|
||||
</column>
|
||||
<column name="last_token" type="INTEGER" defaultValueNumeric="0">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
</createTable>
|
||||
</changeSet>
|
||||
|
||||
</databaseChangeLog>
|
||||
+150
@@ -0,0 +1,150 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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.1.xsd">
|
||||
|
||||
<!-- Catch-up for tables and columns confirmed missing from fineract_saga
|
||||
by direct DB comparison against fineract_default on 2026-07-09. -->
|
||||
|
||||
<!-- m_client_msme: entirely absent from fineract_saga -->
|
||||
<changeSet id="0367-create-m-client-msme" author="CBS">
|
||||
<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_at" type="TIMESTAMP"/>
|
||||
<column name="modified_by" type="BIGINT"/>
|
||||
<column name="modified_on" type="TIMESTAMP"/>
|
||||
<column name="is_active" type="BOOLEAN" defaultValueBoolean="true">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="is_deleted" type="BOOLEAN" defaultValueBoolean="false">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="deleted_by" type="BIGINT"/>
|
||||
<column name="deleted_at" type="TIMESTAMP"/>
|
||||
<column name="version" type="BIGINT" defaultValueNumeric="0">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
</createTable>
|
||||
<addForeignKeyConstraint
|
||||
constraintName="fk_msme_client_id"
|
||||
baseTableName="m_client_msme"
|
||||
baseColumnNames="client_id"
|
||||
referencedTableName="m_client"
|
||||
referencedColumnNames="id"/>
|
||||
</changeSet>
|
||||
|
||||
<!-- m_client_nominee: entirely absent from fineract_saga.
|
||||
Includes nominee_identifier/account_no/account_type so 0360 changeSets MARK_RAN safely. -->
|
||||
<changeSet id="0367-create-m-client-nominee" author="CBS">
|
||||
<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_at" type="TIMESTAMP"/>
|
||||
<column name="modified_by" type="BIGINT"/>
|
||||
<column name="modified_on" type="TIMESTAMP"/>
|
||||
<column name="nominee_identifier" type="VARCHAR(50)">
|
||||
<constraints unique="true" uniqueConstraintName="uq_nominee_identifier"/>
|
||||
</column>
|
||||
<column name="account_no" type="VARCHAR(50)"/>
|
||||
<column name="account_type" type="VARCHAR(10)"/>
|
||||
<column name="is_deleted" type="BOOLEAN" defaultValueBoolean="false">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="deleted_by" type="BIGINT"/>
|
||||
<column name="deleted_at" type="TIMESTAMP"/>
|
||||
<column name="version" type="BIGINT" defaultValueNumeric="0">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
</createTable>
|
||||
<addForeignKeyConstraint
|
||||
constraintName="fk_nominee_client_id"
|
||||
baseTableName="m_client_nominee"
|
||||
baseColumnNames="client_id"
|
||||
referencedTableName="m_client"
|
||||
referencedColumnNames="id"/>
|
||||
<addForeignKeyConstraint
|
||||
constraintName="fk_nominee_nominee_client_id"
|
||||
baseTableName="m_client_nominee"
|
||||
baseColumnNames="nominee_client_id"
|
||||
referencedTableName="m_client"
|
||||
referencedColumnNames="id"/>
|
||||
<addForeignKeyConstraint
|
||||
constraintName="fk_nominee_guardian_client_id"
|
||||
baseTableName="m_client_nominee"
|
||||
baseColumnNames="guardian_client_id"
|
||||
referencedTableName="m_client"
|
||||
referencedColumnNames="id"/>
|
||||
<addForeignKeyConstraint
|
||||
constraintName="fk_nominee_relationship_cv"
|
||||
baseTableName="m_client_nominee"
|
||||
baseColumnNames="relationship_cv_id"
|
||||
referencedTableName="m_code_value"
|
||||
referencedColumnNames="id"/>
|
||||
<addForeignKeyConstraint
|
||||
constraintName="fk_nominee_guardian_rel_cv"
|
||||
baseTableName="m_client_nominee"
|
||||
baseColumnNames="guardian_relationship_cv_id"
|
||||
referencedTableName="m_code_value"
|
||||
referencedColumnNames="id"/>
|
||||
</changeSet>
|
||||
|
||||
<!-- m_address.address_type_id: column missing from fineract_saga (m_address.client_id covered in 0361) -->
|
||||
<changeSet id="0367-address-address-type-id" author="CBS">
|
||||
<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="INTEGER"/>
|
||||
</addColumn>
|
||||
<addForeignKeyConstraint
|
||||
constraintName="fk_address_address_type_id"
|
||||
baseTableName="m_address"
|
||||
baseColumnNames="address_type_id"
|
||||
referencedTableName="m_code_value"
|
||||
referencedColumnNames="id"/>
|
||||
</changeSet>
|
||||
|
||||
</databaseChangeLog>
|
||||
Reference in New Issue
Block a user