FINERACT-1992: Paused delinquency actions persistence

This commit is contained in:
Ruchi Dhamankar
2023-10-31 13:48:14 +01:00
committed by Arnold Gálovics
parent 5ebeca0f2d
commit 3bb90a8987
5 changed files with 204 additions and 0 deletions
@@ -33,4 +33,5 @@
<include relativeToChangelogFile="true" file="parts/1008_add_loan_installment_delinquency_tag.xml"/>
<include relativeToChangelogFile="true" file="parts/1009_refactor_loan_Installment_delinquency_tag.xml"/>
<include relativeToChangelogFile="true" file="parts/1010_introduce_loan_schedule_type_configuration.xml"/>
<include relativeToChangelogFile="true" file="parts/1011_add_delinquency_actions_table.xml"/>
</databaseChangeLog>
@@ -0,0 +1,80 @@
<?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.1.xsd">
<changeSet id="1" author="fineract">
<createTable tableName="m_loan_delinquency_action">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="loan_id" type="BIGINT">
<constraints nullable="false" />
</column>
<column name="action" type="VARCHAR(128)">
<constraints nullable="false"/>
</column>
<column name="start_date" type="date">
<constraints nullable="false"/>
</column>
<column name="end_date" type="date"/>
<column name="created_by" type="BIGINT">
<constraints nullable="false" />
</column>
<column name="last_modified_by" type="BIGINT">
<constraints nullable="false" />
</column>
</createTable>
</changeSet>
<changeSet id="2" author="fineract" context="mysql">
<addColumn tableName="m_loan_delinquency_action">
<column name="created_on_utc" type="DATETIME(6)">
<constraints nullable="false"/>
</column>
<column name="last_modified_on_utc" type="DATETIME(6)">
<constraints nullable="false"/>
</column>
</addColumn>
</changeSet>
<changeSet id="3" author="fineract" context="postgresql">
<addColumn tableName="m_loan_delinquency_action">
<column name="created_on_utc" type="TIMESTAMP WITH TIME ZONE">
<constraints nullable="false"/>
</column>
<column name="last_modified_on_utc" type="TIMESTAMP WITH TIME ZONE">
<constraints nullable="false"/>
</column>
</addColumn>
</changeSet>
<changeSet id="4" author="fineract">
<addForeignKeyConstraint baseColumnNames="loan_id" baseTableName="m_loan_delinquency_action"
constraintName="FK_m_loan_delinquency_action_loan" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_loan" validate="true"/>
</changeSet>
<changeSet id="5" author="fineract">
<createIndex tableName="m_loan_delinquency_action" indexName="m_loan_delinquency_action_loan_id_index">
<column name="loan_id"/>
</createIndex>
</changeSet>
</databaseChangeLog>