FINERACT-1971: Conditional renaming: Credited Principal renamed back to credits amount

This commit is contained in:
Adam Saghy
2024-03-14 08:18:22 +01:00
committed by Arnold Gálovics
parent b2b950477c
commit 40970e830b
2 changed files with 7 additions and 2 deletions
@@ -32,11 +32,11 @@
</changeSet>
<changeSet author="fineract" id="2">
<validCheckSum>9:9e13876473fb1fc84046fb672fcf9309</validCheckSum>
<addColumn tableName="m_loan_repayment_schedule">
<column defaultValueComputed="NULL" name="credited_fee" type="DECIMAL(19, 6)"/>
<column defaultValueComputed="NULL" name="credited_penalty" type="DECIMAL(19, 6)"/>
</addColumn>
<renameColumn tableName="m_loan_repayment_schedule" oldColumnName="credits_amount" newColumnName="credited_principal" columnDataType="DECIMAL(19, 6)"/>
</changeSet>
@@ -20,7 +20,12 @@
-->
<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">
<changeSet author="fineract" id="1" failOnError="false">
<preConditions onFail="MARK_RAN" onError="MARK_RAN">
<sqlCheck expectedResult="1">SELECT 1
FROM information_schema.columns
WHERE table_name='m_loan_repayment_schedule' and column_name='credited_principal'</sqlCheck>
</preConditions>
<renameColumn tableName="m_loan_repayment_schedule" oldColumnName="credited_principal" newColumnName="credits_amount" columnDataType="DECIMAL(19, 6)"/>
</changeSet>
</databaseChangeLog>