Skip to content

Commit

Permalink
EA-112 Make amount to 8 decimal points from default 2 decimal places
Browse files Browse the repository at this point in the history
  • Loading branch information
hero78 committed Dec 23, 2024
1 parent fa6fe9c commit 2607f85
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public class Charge extends AbstractPersistableCustom {
@Column(name = "name", length = 100)
private String name;

@Column(name = "amount", scale = 6, precision = 19, nullable = false)
@Column(name = "amount", scale = 8, precision = 19, nullable = false)
private BigDecimal amount;

@Column(name = "currency_code", length = 3)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ public class InterestRate extends AbstractAuditableWithUTCDateTimeCustom {

@Column(name = "name")
private String name;

@Column(name = "current_rate")
@Column(name = "current_rate", scale = 8, precision = 10, nullable = false)
private BigDecimal currentRate;

@Column(name = "appliedon_date")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,4 +118,18 @@
</sql>
</changeSet>

<changeSet id="upgrade_scale_from_2_to_8" author="[email protected]">
<preConditions onFail="MARK_RAN">
<columnExists tableName="m_charge" columnName="amount"/>
</preConditions>
<modifyDataType tableName="m_charge" columnName="amount" newDataType="DECIMAL(19,8)"/>
</changeSet>

<changeSet id="upgrade-m_interest_rate_scale_from_4_to_8" author="[email protected]">
<preConditions onFail="MARK_RAN">
<columnExists tableName="m_interest_rate" columnName="current_rate"/>
</preConditions>
<modifyDataType tableName="m_interest_rate" columnName="current_rate" newDataType="DECIMAL(10,8)"/>
</changeSet>

</databaseChangeLog>

0 comments on commit 2607f85

Please sign in to comment.