diff --git a/generators/generator-constants.js b/generators/generator-constants.js
index 361719d41d45..6363c4365ef4 100644
--- a/generators/generator-constants.js
+++ b/generators/generator-constants.js
@@ -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';
@@ -416,8 +412,6 @@ const constants = {
JIB_VERSION,
JACOCO_VERSION,
JACKSON_DATABIND_NULLABLE_VERSION,
- H2_VERSION,
- H2_R2DBC_VERSION,
// Docker
DOCKER_COMPOSE_FORMAT_VERSION,
diff --git a/generators/server/index.js b/generators/server/index.js
index 5852993e64f6..c695e8c9fd9b 100644
--- a/generators/server/index.js
+++ b/generators/server/index.js
@@ -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;
diff --git a/generators/server/templates/build.gradle.ejs b/generators/server/templates/build.gradle.ejs
index b034835a93a8..28102bbbf7c8 100644
--- a/generators/server/templates/build.gradle.ejs
+++ b/generators/server/templates/build.gradle.ejs
@@ -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 %>'
- <%_ } _%>
-<%_ } _%>
}
}
}
diff --git a/generators/server/templates/pom.xml.ejs b/generators/server/templates/pom.xml.ejs
index 796fb4df12b8..5cc8c1c206d8 100644
--- a/generators/server/templates/pom.xml.ejs
+++ b/generators/server/templates/pom.xml.ejs
@@ -102,12 +102,6 @@
<%= LIQUIBASE_VERSION %>
<%_ if (!reactive) { _%>
<%= LIQUIBASE_VERSION %>
- <%_ } _%>
- <%_ if (devDatabaseTypeH2Any && (prodDatabaseTypeMysql || reactive)) { _%>
-
<%= H2_VERSION %>
- <%_ if (reactive) { _%>
- <%= H2_R2DBC_VERSION %>
- <%_ } _%>
<%_ } _%>
2.0.1.Final
<%_ if (reactive) { _%>
@@ -1585,15 +1579,11 @@
com.h2database
h2
- <%_ if (prodDatabaseTypeMysql || reactive) { _%>
- ${h2.version}
- <%_ } _%>
<%_ if (reactive) { _%>
io.r2dbc
r2dbc-h2
- ${h2-r2dbc.version}
<%_ } _%>
<%_ } _%>
@@ -1782,9 +1772,6 @@
com.h2database
h2
- <%_ if (prodDatabaseTypeMysql || reactive) { _%>
- ${h2.version}
- <%_ } _%>
<%_ } _%>
diff --git a/generators/server/templates/src/main/resources/config/liquibase/master.xml.ejs b/generators/server/templates/src/main/resources/config/liquibase/master.xml.ejs
index fa4bb8529e37..7e27f70e2ca4 100644
--- a/generators/server/templates/src/main/resources/config/liquibase/master.xml.ejs
+++ b/generators/server/templates/src/main/resources/config/liquibase/master.xml.ejs
@@ -12,17 +12,12 @@
<%_ } _%>
- <%_ if (reactive) { _%>
-
-
- <%_ } else { _%>
- <%_ if (prodDatabaseTypePostgres) { _%>
+ <%_ if (prodDatabaseTypePostgres) { _%>
- <%_ } else { _%>
+ <%_ } else { _%>
- <%_ } _%>
-
<%_ } _%>
+
<%_ } _%>
<%_ if (devDatabaseTypeMysql || prodDatabaseTypeMysql) { _%>
diff --git a/generators/sql-constants.js b/generators/sql-constants.js
index 08053bc0c6c2..5ec9acf9a57c 100644
--- a/generators/sql-constants.js
+++ b/generators/sql-constants.js
@@ -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:///',
},
diff --git a/test/generator-base.spec.js b/test/generator-base.spec.js
index da9faa98afa5..3d36814f612f 100644
--- a/test/generator-base.spec.js
+++ b/test/generator-base.spec.js
@@ -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'
);
});
});
@@ -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'
);
});
});
@@ -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'
);
});
});
@@ -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'
);
});
});