mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
remove usage of deprecated id generator that blocks migration to hibernate 6
This commit is contained in:
@@ -118,8 +118,7 @@ public class CommaFeedApplication extends Application<CommaFeedConfiguration> {
|
||||
public DataSourceFactory getDataSourceFactory(CommaFeedConfiguration configuration) {
|
||||
DataSourceFactory factory = configuration.getDataSourceFactory();
|
||||
|
||||
// keep using old id generator for backward compatibility
|
||||
factory.getProperties().put(AvailableSettings.USE_NEW_ID_GENERATOR_MAPPINGS, "false");
|
||||
factory.getProperties().put(AvailableSettings.PREFERRED_POOLED_OPTIMIZER, "pooled-lo");
|
||||
|
||||
factory.getProperties().put(AvailableSettings.STATEMENT_BATCH_SIZE, "50");
|
||||
factory.getProperties().put(AvailableSettings.BATCH_VERSIONED_DATA, "true");
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<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-3.1.xsd">
|
||||
|
||||
|
||||
<changeSet id="new-hibernate-id-generator" author="athou">
|
||||
<modifyDataType tableName="hibernate_sequences" columnName="sequence_next_hi_value" newDataType="BIGINT" />
|
||||
<sql>update hibernate_sequences
|
||||
set sequence_next_hi_value=
|
||||
(select coalesce(max(id), 0) + 1 from FEEDCATEGORIES)
|
||||
where sequence_name = 'FEEDCATEGORIES'</sql>
|
||||
<sql>update hibernate_sequences
|
||||
set sequence_next_hi_value=
|
||||
(select coalesce(max(id), 0) + 1 from FEEDENTRIES)
|
||||
where sequence_name = 'FEEDENTRIES'</sql>
|
||||
<sql>update hibernate_sequences
|
||||
set sequence_next_hi_value=
|
||||
(select coalesce(max(id), 0) + 1 from FEEDENTRYCONTENTS)
|
||||
where sequence_name = 'FEEDENTRYCONTENTS'</sql>
|
||||
<sql>update hibernate_sequences
|
||||
set sequence_next_hi_value=
|
||||
(select coalesce(max(id), 0) + 1 from FEEDENTRYSTATUSES)
|
||||
where sequence_name = 'FEEDENTRYSTATUSES'</sql>
|
||||
<sql>update hibernate_sequences
|
||||
set sequence_next_hi_value=
|
||||
(select coalesce(max(id), 0) + 1 from FEEDS)
|
||||
where sequence_name = 'FEEDS'</sql>
|
||||
<sql>update hibernate_sequences
|
||||
set sequence_next_hi_value=
|
||||
(select coalesce(max(id), 0) + 1 from FEEDSUBSCRIPTIONS)
|
||||
where sequence_name = 'FEEDSUBSCRIPTIONS'</sql>
|
||||
<sql>update hibernate_sequences
|
||||
set sequence_next_hi_value=
|
||||
(select coalesce(max(id), 0) + 1 from USERROLES)
|
||||
where sequence_name = 'USERROLES'</sql>
|
||||
<sql>update hibernate_sequences
|
||||
set sequence_next_hi_value=
|
||||
(select coalesce(max(id), 0) + 1 from USERS)
|
||||
where sequence_name = 'USERS'</sql>
|
||||
<sql>update hibernate_sequences
|
||||
set sequence_next_hi_value=
|
||||
(select coalesce(max(id), 0) + 1 from USERSETTINGS)
|
||||
where sequence_name = 'USERSETTINGS'</sql>
|
||||
</changeSet>
|
||||
|
||||
</databaseChangeLog>
|
||||
@@ -3,20 +3,21 @@
|
||||
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-3.1.xsd">
|
||||
|
||||
<property name="blob_type" value="bytea" dbms="postgresql"/>
|
||||
<property name="blob_type" value="blob" dbms="h2"/>
|
||||
<property name="blob_type" value="blob" dbms="mysql,mariadb"/>
|
||||
<property name="blob_type" value="blob" dbms="mssql"/>
|
||||
<property name="blob_type" value="bytea" dbms="postgresql" />
|
||||
<property name="blob_type" value="blob" dbms="h2" />
|
||||
<property name="blob_type" value="blob" dbms="mysql,mariadb" />
|
||||
<property name="blob_type" value="blob" dbms="mssql" />
|
||||
|
||||
<include file="changelogs/db.changelog-1.0.xml"/>
|
||||
<include file="changelogs/db.changelog-1.1.xml"/>
|
||||
<include file="changelogs/db.changelog-1.2.xml"/>
|
||||
<include file="changelogs/db.changelog-1.3.xml"/>
|
||||
<include file="changelogs/db.changelog-1.4.xml"/>
|
||||
<include file="changelogs/db.changelog-1.5.xml"/>
|
||||
<include file="changelogs/db.changelog-2.1.xml"/>
|
||||
<include file="changelogs/db.changelog-2.2.xml"/>
|
||||
<include file="changelogs/db.changelog-2.6.xml"/>
|
||||
<include file="changelogs/db.changelog-3.2.xml"/>
|
||||
<include file="changelogs/db.changelog-1.0.xml" />
|
||||
<include file="changelogs/db.changelog-1.1.xml" />
|
||||
<include file="changelogs/db.changelog-1.2.xml" />
|
||||
<include file="changelogs/db.changelog-1.3.xml" />
|
||||
<include file="changelogs/db.changelog-1.4.xml" />
|
||||
<include file="changelogs/db.changelog-1.5.xml" />
|
||||
<include file="changelogs/db.changelog-2.1.xml" />
|
||||
<include file="changelogs/db.changelog-2.2.xml" />
|
||||
<include file="changelogs/db.changelog-2.6.xml" />
|
||||
<include file="changelogs/db.changelog-3.2.xml" />
|
||||
<include file="changelogs/db.changelog-3.5.xml" />
|
||||
|
||||
</databaseChangeLog>
|
||||
Reference in New Issue
Block a user