FINERACT-2423: Add preconditions to all changesets

This commit is contained in:
Monica
2026-01-15 15:17:41 +01:00
committed by Adam Saghy
parent cccb7d7726
commit ea1609120f
@@ -21,35 +21,49 @@
-->
<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">
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" context="postgresql">
<validCheckSum>9:b1a20656c2f9b4a5035e700453a80ab</validCheckSum>
<preConditions onFail="MARK_RAN">
<columnExists tableName="m_portfolio_command_source"
columnName="processing_result_enum"/>
</preConditions>
<renameColumn
<changeSet id="1" author="fineract" context="postgresql">
<preConditions onFail="MARK_RAN">
<columnExists
tableName="m_portfolio_command_source"
oldColumnName="processing_result_enum"
newColumnName="status"/>
</changeSet>
columnName="processing_result_enum"/>
</preConditions>
<changeSet id="2" author="fineract" context="mysql">
<validCheckSum>9:9c4456b507915a0ee7a16edca4cddb46</validCheckSum>
<renameColumn newColumnName="status"
oldColumnName="processing_result_enum"
tableName="m_portfolio_command_source"
columnDataType="smallint(6)" />
</changeSet>
<renameColumn
tableName="m_portfolio_command_source"
oldColumnName="processing_result_enum"
newColumnName="status"/>
</changeSet>
<changeSet id="3" author="fineract">
<validCheckSum>9:b5a7d85155d23aadde3403c2d0a8c75d</validCheckSum>
<addColumn tableName="m_portfolio_command_source">
<column name="result" type="TEXT"/>
</addColumn>
</changeSet>
<changeSet id="2" author="fineract" context="mysql">
<preConditions onFail="MARK_RAN">
<columnExists
tableName="m_portfolio_command_source"
columnName="processing_result_enum"/>
</preConditions>
<renameColumn
tableName="m_portfolio_command_source"
oldColumnName="processing_result_enum"
newColumnName="status"
columnDataType="smallint(6)"/>
</changeSet>
<changeSet id="3" author="fineract" context="postgresql,mysql">
<preConditions onFail="MARK_RAN">
<not>
<columnExists
tableName="m_portfolio_command_source"
columnName="result"/>
</not>
</preConditions>
<addColumn tableName="m_portfolio_command_source">
<column name="result" type="TEXT"/>
</addColumn>
</changeSet>
</databaseChangeLog>