Skip to content

Commit

Permalink
Merge pull request #19242 from DanielFran/skip-ci_liquibase-4.14.0
Browse files Browse the repository at this point in the history
Update liquibase version to 4.15.0
  • Loading branch information
DanielFran committed Aug 27, 2022
2 parents b9dc3a3 + c27bf47 commit da2e1c1
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 42 deletions.
8 changes: 1 addition & 7 deletions generators/generator-constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,13 @@ const OPENAPI_GENERATOR_CLI_VERSION = '2.5.1';
const JHIPSTER_DEPENDENCIES_VERSION = '7.9.3-SNAPSHOT';
// The spring-boot version should match the one managed by https://mvnrepository.com/artifact/tech.jhipster/jhipster-dependencies/JHIPSTER_DEPENDENCIES_VERSION
const SPRING_BOOT_VERSION = '2.7.3';
const LIQUIBASE_VERSION = '4.12.0';
const LIQUIBASE_VERSION = '4.15.0';
// TODO v8: Remove this constant
const LIQUIBASE_DTD_VERSION = 'latest';
const HIBERNATE_VERSION = '5.6.10.Final';
const JACOCO_VERSION = '0.8.8';
const JACKSON_DATABIND_NULLABLE_VERSION = '0.2.3';
const JIB_VERSION = '3.2.1';
// TODO upgrade to h2 v2 once liquibase issues has been addressed
const H2_VERSION = '1.4.200';
// Version 0.9.x is not compatible with h2 v1
const H2_R2DBC_VERSION = '0.8.5.RELEASE';

// Version of docker images
const DOCKER_COMPOSE_FORMAT_VERSION = '3.8';
Expand Down Expand Up @@ -416,8 +412,6 @@ const constants = {
JIB_VERSION,
JACOCO_VERSION,
JACKSON_DATABIND_NULLABLE_VERSION,
H2_VERSION,
H2_R2DBC_VERSION,

// Docker
DOCKER_COMPOSE_FORMAT_VERSION,
Expand Down
2 changes: 0 additions & 2 deletions generators/server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,6 @@ module.exports = class JHipsterServerGenerator extends BaseBlueprintGenerator {
this.JACKSON_DATABIND_NULLABLE_VERSION = constants.JACKSON_DATABIND_NULLABLE_VERSION;
this.JACOCO_VERSION = constants.JACOCO_VERSION;
this.JIB_VERSION = constants.JIB_VERSION;
this.H2_VERSION = constants.H2_VERSION;
this.H2_R2DBC_VERSION = constants.H2_R2DBC_VERSION;

this.ANGULAR = constants.SUPPORTED_CLIENT_FRAMEWORKS.ANGULAR;
this.VUE = constants.SUPPORTED_CLIENT_FRAMEWORKS.VUE;
Expand Down
6 changes: 0 additions & 6 deletions generators/server/templates/build.gradle.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -250,12 +250,6 @@ configurations {
// Inherited version from Spring Boot can't be used because of regressions:
// To be removed as soon as spring-boot use the same version
force 'org.liquibase:liquibase-core:<%= LIQUIBASE_VERSION %>'
<%_ if (devDatabaseTypeH2Any && (prodDatabaseTypeMysql || reactive)) { _%>
force 'com.h2database:h2:<%= H2_VERSION %>'
<%_ if (reactive) { _%>
force 'io.r2dbc:r2dbc-h2:<%= H2_R2DBC_VERSION %>'
<%_ } _%>
<%_ } _%>
}
}
}
Expand Down
13 changes: 0 additions & 13 deletions generators/server/templates/pom.xml.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,6 @@
<liquibase.version><%= LIQUIBASE_VERSION %></liquibase.version>
<%_ if (!reactive) { _%>
<liquibase-hibernate5.version><%= LIQUIBASE_VERSION %></liquibase-hibernate5.version>
<%_ } _%>
<%_ if (devDatabaseTypeH2Any && (prodDatabaseTypeMysql || reactive)) { _%>
<h2.version><%= H2_VERSION %></h2.version>
<%_ if (reactive) { _%>
<h2-r2dbc.version><%= H2_R2DBC_VERSION %></h2-r2dbc.version>
<%_ } _%>
<%_ } _%>
<validation-api.version>2.0.1.Final</validation-api.version>
<%_ if (reactive) { _%>
Expand Down Expand Up @@ -1585,15 +1579,11 @@
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<%_ if (prodDatabaseTypeMysql || reactive) { _%>
<version>${h2.version}</version>
<%_ } _%>
</dependency>
<%_ if (reactive) { _%>
<dependency>
<groupId>io.r2dbc</groupId>
<artifactId>r2dbc-h2</artifactId>
<version>${h2-r2dbc.version}</version>
</dependency>
<%_ } _%>
<%_ } _%>
Expand Down Expand Up @@ -1782,9 +1772,6 @@
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<%_ if (prodDatabaseTypeMysql || reactive) { _%>
<version>${h2.version}</version>
<%_ } _%>
</dependency>
<%_ } _%>
</dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,12 @@
<property name="uuidType" value="uuid" dbms="h2"/>
<%_ } _%>
<property name="datetimeType" value="datetime" dbms="h2"/>
<%_ if (reactive) { _%>
<property name="clobType" value="varchar(1000000)" dbms="h2"/>
<property name="blobType" value="varchar(1000000)" dbms="h2"/>
<%_ } else { _%>
<%_ if (prodDatabaseTypePostgres) { _%>
<%_ if (prodDatabaseTypePostgres) { _%>
<property name="clobType" value="longvarchar" dbms="h2"/>
<%_ } else { _%>
<%_ } else { _%>
<property name="clobType" value="clob" dbms="h2"/>
<%_ } _%>
<property name="blobType" value="blob" dbms="h2"/>
<%_ } _%>
<property name="blobType" value="blob" dbms="h2"/>
<%_ } _%>
<%_ if (devDatabaseTypeMysql || prodDatabaseTypeMysql) { _%>
<property name="now" value="now()" dbms="mysql"/>
Expand Down
4 changes: 2 additions & 2 deletions generators/sql-constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,14 @@ const databaseData = {
[H2_DISK]: {
protocolSuffix: 'h2:file:',
useDirectory: true,
extraOptions: ';DB_CLOSE_DELAY=-1',
extraOptions: ';DB_CLOSE_DELAY=-1;MODE=LEGACY',
r2dbc: {
protocolSuffix: 'h2:file://',
},
},
[H2_MEMORY]: {
protocolSuffix: 'h2:mem:',
extraOptions: ';DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE',
extraOptions: ';DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE;MODE=LEGACY',
r2dbc: {
protocolSuffix: 'h2:mem:///',
},
Expand Down
8 changes: 4 additions & 4 deletions test/generator-base.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,7 @@ describe('Generator Base', () => {
describe('when called for h2Disk', () => {
it('return jdbc:h2:file:./build/h2db/db/test;DB_CLOSE_DELAY=-1', () => {
expect(BaseGenerator.getJDBCUrl(H2_DISK, { databaseName: 'test', localDirectory: './build/h2db/db' })).to.equal(
'jdbc:h2:file:./build/h2db/db/test;DB_CLOSE_DELAY=-1'
'jdbc:h2:file:./build/h2db/db/test;DB_CLOSE_DELAY=-1;MODE=LEGACY'
);
});
});
Expand All @@ -622,7 +622,7 @@ describe('Generator Base', () => {
describe('when called for h2Memory', () => {
it('return jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE', () => {
expect(BaseGenerator.getJDBCUrl(H2_MEMORY, { databaseName: 'test' })).to.equal(
'jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE'
'jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE;MODE=LEGACY'
);
});
});
Expand Down Expand Up @@ -696,7 +696,7 @@ describe('Generator Base', () => {
describe('when called for h2Disk', () => {
it('return r2dbc:h2:file:./build/h2db/db/test;DB_CLOSE_DELAY=-1', () => {
expect(BaseGenerator.getR2DBCUrl(H2_DISK, { databaseName: 'test', localDirectory: './build/h2db/db' })).to.equal(
'r2dbc:h2:file://./build/h2db/db/test;DB_CLOSE_DELAY=-1'
'r2dbc:h2:file://./build/h2db/db/test;DB_CLOSE_DELAY=-1;MODE=LEGACY'
);
});
});
Expand All @@ -717,7 +717,7 @@ describe('Generator Base', () => {
describe('when called for h2Memory', () => {
it('return r2dbc:h2:mem:///test;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE', () => {
expect(BaseGenerator.getR2DBCUrl(H2_MEMORY, { databaseName: 'test' })).to.equal(
'r2dbc:h2:mem:///test;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE'
'r2dbc:h2:mem:///test;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE;MODE=LEGACY'
);
});
});
Expand Down

0 comments on commit da2e1c1

Please sign in to comment.