Skip to content

chore: bump com.h2database:h2 from 1.4.200 to 2.2.224 #1652

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@
<groovy-old.version>2.0.8</groovy-old.version>

<!-- Redefine default value from spring-boot-dependencies -->
<h2.version>1.4.200</h2.version>
<h2.version>2.2.224</h2.version>

<!-- Redefine default value from spring-boot-dependencies -->
<hibernate-validator.version>6.1.7.Final</hibernate-validator.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
public class JdbcSiteParserDao implements SiteParserDao {

private static final ResultSetExtractor<Map<String, String>> PARAMS_EXTRACTOR =
new MapStringStringResultSetExtractor("name", "value");
new MapStringStringResultSetExtractor("name", "val");

private final NamedParameterJdbcTemplate jdbcTemplate;
private final String findParserIdByMatchedUrlSql;
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/liquibase/version/0.4.8.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.3.xsd">


<include file="0.4.8/2024-01-25--rename_site_parser_params_value_column.xml" relativeToChangelogFile="true" />

</databaseChangeLog>
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<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.3.xsd">

<!--
Rename column "value" as it's a reserved word in SQL.
Newer versions of H2 don't allow to use it as unquoted identifier.
See for details: https://github.com/h2database/h2database/issues/3954
-->
<changeSet id="rename-site_parser_params-value-field" author="php-coder" context="scheme">

<!--
NOTE: columnDataType is only required for MySQL.
We specify NOT NULL constraint, in order to keep it, otherwise it gets discarded.
This happens because on MySQL < 8.0, there was no a dedicated command for column
renaming and ALTER TABLE column CHANGE has been used instead. The latter is designed
for modifying column's data type and that's why it requires a full column's definition.
-->
<renameColumn
tableName="site_parser_params"
oldColumnName="value"
newColumnName="val"
columnDataType="VARCHAR(100) NOT NULL" />

</changeSet>

</databaseChangeLog>
8 changes: 4 additions & 4 deletions src/main/resources/sql/site_parser_dao_queries.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ site_parser.find_like_matched_url = \
SELECT parser_id AS id \
FROM site_parser_params \
WHERE name = 'matched_url' \
AND value = :url \
OR :url LIKE CONCAT(value, '%')
AND val = :url \
OR :url LIKE CONCAT(val, '%')

site_parser.find_names = \
SELECT name \
Expand All @@ -12,11 +12,11 @@ ORDER BY id

site_parser_param.find_all_with_parser_name = \
SELECT name \
, value \
, val \
FROM site_parser_params \
WHERE parser_id = :parser_id \
UNION ALL \
SELECT 'name' AS name \
, name AS value \
, name AS val \
FROM site_parsers \
WHERE id = :parser_id