Skip to content

Commit cc35690

Browse files
committed
task: increase length of michel_catalog.code field to 5 characters.
Part of #1277
1 parent f64786a commit cc35690

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

src/main/resources/liquibase/version/0.4.3.xml

+1
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@
99
<include file="0.4.3/2020-03-08--add_alt_price_to_series_sales_import_parsed_data.xml" relativeToChangelogFile="true" />
1010
<include file="0.4.3/2020-03-11--cleanup_togglz_features.xml" relativeToChangelogFile="true" />
1111
<include file="0.4.3/2020-03-11--fix-nullable-series_import_requests-url.xml" relativeToChangelogFile="true" />
12+
<include file="0.4.3/2020-03-12--michel_catalog_code_length.xml" relativeToChangelogFile="true" />
1213

1314
</databaseChangeLog>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
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.1.xsd">
7+
8+
<changeSet id="increase-length-of-michel_catalog-code-field" author="php-coder" context="scheme">
9+
10+
<modifyDataType tableName="michel_catalog"
11+
columnName="code"
12+
newDataType="VARCHAR(5)" />
13+
14+
<!--
15+
modifyDataType loses NOT NULL property on MySQL:
16+
http://forum.liquibase.org/topic/warning-of-losing-primary-key-autoincrement-for-mysql
17+
In order to fix that, we patch the SQL query to specify NOT NULL again.
18+
-->
19+
<modifySql dbms="mysql">
20+
<append value=" NOT NULL" />
21+
</modifySql>
22+
23+
</changeSet>
24+
25+
</databaseChangeLog>

0 commit comments

Comments
 (0)