Skip to content

Commit 7e16ecd

Browse files
committedAug 27, 2016
Fix wrong type of series_sales.{first,second}_price fields.
CURRENCY pseudo-type in Liquibase was translated into decimal(10,0) type in MySQL. Unfortunately it doesn't allow to provide fraction part. In other words, before wasn't possible to specify price 2.8 because it was rounded to 3. Fix #461
1 parent bbfe630 commit 7e16ecd

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed
 

‎src/main/resources/liquibase/version/0.4.xml

+1
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,6 @@
1717
<include file="0.4/2016-07-22--unique_slug_in_categories.xml" relativeToChangelogFile="true" />
1818
<include file="0.4/2016-08-18--unique_slug_in_collections.xml" relativeToChangelogFile="true" />
1919
<include file="0.4/2016-08-22--series_sales.xml" relativeToChangelogFile="true" />
20+
<include file="0.4/2016-08-27--fix_series_sales_price.xml" relativeToChangelogFile="true" />
2021

2122
</databaseChangeLog>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<databaseChangeLog
3+
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
4+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5+
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
6+
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.0.xsd">
7+
8+
<changeSet id="modify-first_price-type" author="php-coder" context="scheme">
9+
<modifyDataType tableName="series_sales" columnName="first_price" newDataType="DECIMAL(19,2)" />
10+
</changeSet>
11+
12+
<changeSet id="modify-second_price-type" author="php-coder" context="scheme">
13+
<modifyDataType tableName="series_sales" columnName="second_price" newDataType="DECIMAL(19,2)" />
14+
</changeSet>
15+
16+
</databaseChangeLog>

0 commit comments

Comments
 (0)
Please sign in to comment.