Skip to content

Commit 33dd902

Browse files
committed
series_import_requests: increase url length.
If url consists only from non-ascii symbols, we effectively will be able to save a URL up to 255 characters. Fix #772
1 parent 06522e9 commit 33dd902

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

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

+1
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,6 @@
4343
<include file="0.4/2017-12-18--unique_series_id_in_import_requests.xml" relativeToChangelogFile="true" />
4444
<include file="0.4/2017-12-21--solovyov_catalog.xml" relativeToChangelogFile="true" />
4545
<include file="0.4/2017-12-21--zagorski_catalog.xml" relativeToChangelogFile="true" />
46+
<include file="0.4/2017-12-30--series_import_requests_url_length2.xml" relativeToChangelogFile="true" />
4647

4748
</databaseChangeLog>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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-series_import_requests-url-field" author="php-coder" context="scheme">
9+
<!--
10+
767 bytes is the maximum length for the index key prefix in MySQL 5.6 and prior versions.
11+
This limit was increased up to 3072 bytes in 5.7 version because innodb_large_prefix option
12+
was enabled by default and innodb_file_format was changed to use Barracuda by default.
13+
14+
In other words, we can specify a value greater than 767 in production environment but
15+
I decided to use this value for now because we have a different MySQL 5.6.33 on TravisCI
16+
where migration fails to apply. I hope that this value will fulfill our requirements,
17+
because it's enough to hold about 255 non-ascii characters.
18+
-->
19+
<modifyDataType tableName="series_import_requests" columnName="url" newDataType="VARCHAR(767)" />
20+
</changeSet>
21+
22+
</databaseChangeLog>

0 commit comments

Comments
 (0)