Skip to content

Commit

Permalink
FINERACT-1992-Installment-level-delinquency-calculation-db
Browse files Browse the repository at this point in the history
  • Loading branch information
ruchiD committed Oct 11, 2023
1 parent 4d3c40d commit ea04469
Show file tree
Hide file tree
Showing 2 changed files with 95 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,5 @@
<include relativeToChangelogFile="true" file="parts/1005_add_loan_product_repayment_start_date_configuration.xml"/>
<include relativeToChangelogFile="true" file="parts/1006_add_downpayment_transaction_enum_permissions.xml"/>
<include relativeToChangelogFile="true" file="parts/1007_add_loan_product_schedule_extension_for_down_payment_configuration.xml"/>
<include relativeToChangelogFile="true" file="parts/1008_add_loan_installment_delinquency_tag.xml"/>
</databaseChangeLog>
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
<?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 author="fineract" id="1">
<createTable tableName="m_loan_installment_delinquency_tag_history">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="delinquency_range_id" type="BIGINT">
<constraints nullable="false" />
</column>
<column name="loan_id" type="BIGINT">
<constraints nullable="false" />
</column>
<column name="installment_id" type="BIGINT">
<constraints nullable="false" />
</column>
<column name="addedon_date" type="DATE">
<constraints nullable="false" />
</column>
<column name="first_overdue_date" type="DATE">
<constraints nullable="false" />
</column>
<column name="outstanding_amount" type="DECIMAL(19, 6)">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="NULL" name="liftedon_date" type="DATE" />
<column name="created_by" type="BIGINT">
<constraints nullable="false" />
</column>
<column name="version" type="BIGINT">
<constraints nullable="false"/>
</column>
<column name="last_modified_by" type="BIGINT">
<constraints nullable="false" />
</column>
</createTable>
</changeSet>
<changeSet author="fineract" id="2" context="mysql">
<addColumn tableName="m_loan_installment_delinquency_tag_history">
<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 author="fineract" id="3" context="postgresql">
<addColumn tableName="m_loan_installment_delinquency_tag_history">
<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 author="fineract" id="4">
<addForeignKeyConstraint baseColumnNames="delinquency_range_id" baseTableName="m_loan_installment_delinquency_tag_history"
constraintName="FK_m_delinquency_installment_tags_range" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_delinquency_range" validate="true"/>
<addForeignKeyConstraint baseColumnNames="loan_id" baseTableName="m_loan_installment_delinquency_tag_history"
constraintName="FK_m_delinquency_installment_tags_loan" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_loan" validate="true"/>
<addForeignKeyConstraint baseColumnNames="installment_id" baseTableName="m_loan_installment_delinquency_tag_history"
constraintName="FK_m_delinquency_installment_tags_installment" deferrable="false"
initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT"
referencedColumnNames="id" referencedTableName="m_loan_repayment_schedule" validate="true"/>
</changeSet>
</databaseChangeLog>

0 comments on commit ea04469

Please sign in to comment.