Upgrade liquibase to version 4.25.1
Closes #26570 Signed-off-by: Stefan Guilhen <sguilhen@redhat.com>
This commit is contained in:
parent
ac6f16df70
commit
fbeba83b87
3 changed files with 7 additions and 4 deletions
|
@ -19,6 +19,8 @@ package org.keycloak.connections.jpa.updater.liquibase.conn;
|
|||
|
||||
import liquibase.Liquibase;
|
||||
import liquibase.Scope;
|
||||
import liquibase.ScopeManager;
|
||||
import liquibase.ThreadLocalScopeManager;
|
||||
import liquibase.database.AbstractJdbcDatabase;
|
||||
import liquibase.database.Database;
|
||||
import liquibase.database.DatabaseFactory;
|
||||
|
@ -72,6 +74,7 @@ public class DefaultLiquibaseConnectionProvider implements LiquibaseConnectionPr
|
|||
ClassLoader currentClassLoader = Thread.currentThread().getContextClassLoader();
|
||||
try {
|
||||
Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader());
|
||||
Scope.setScopeManager(new ThreadLocalScopeManager());
|
||||
Scope.getCurrentScope();
|
||||
} finally {
|
||||
Thread.currentThread().setContextClassLoader(currentClassLoader);
|
||||
|
|
|
@ -60,8 +60,8 @@ public class CustomLockService extends StandardLockService {
|
|||
private static final Logger log = Logger.getLogger(CustomLockService.class);
|
||||
|
||||
@Override
|
||||
protected boolean hasDatabaseChangeLogLockTable() throws DatabaseException {
|
||||
boolean originalReturnValue = super.hasDatabaseChangeLogLockTable();
|
||||
protected boolean isDatabaseChangeLogLockTableCreated() throws DatabaseException {
|
||||
boolean originalReturnValue = super.isDatabaseChangeLogLockTableCreated();
|
||||
if (originalReturnValue && database.getConnection().getDatabaseProductName().equals("H2")) {
|
||||
/* Liquibase only checks that the table exists. On the H2 database, creation of a table with a primary key is not atomic,
|
||||
and the primary key might not be visible yet. The primary key would be needed to prevent inserting the data into the table
|
||||
|
@ -98,7 +98,7 @@ public class CustomLockService extends StandardLockService {
|
|||
public void init() throws DatabaseException {
|
||||
Executor executor = Scope.getCurrentScope().getSingleton(ExecutorService.class).getExecutor(LiquibaseConstants.JDBC_EXECUTOR, database);
|
||||
|
||||
if (!hasDatabaseChangeLogLockTable()) {
|
||||
if (!isDatabaseChangeLogLockTableCreated()) {
|
||||
|
||||
try {
|
||||
if (log.isTraceEnabled()) {
|
||||
|
|
2
pom.xml
2
pom.xml
|
@ -147,7 +147,7 @@
|
|||
<freemarker.version>2.3.32</freemarker.version>
|
||||
|
||||
<jetty9.version>${jetty94.version}</jetty9.version>
|
||||
<liquibase.version>4.23.2</liquibase.version>
|
||||
<liquibase.version>4.25.1</liquibase.version>
|
||||
<osgi.version>4.2.0</osgi.version>
|
||||
<pax.web.version>7.1.0</pax.web.version>
|
||||
<servlet.api.30.version>1.0.2.Final</servlet.api.30.version>
|
||||
|
|
Loading…
Reference in a new issue