Skip to content

Commit

Permalink
Merge pull request #419 from liquibase/DAT-15624
Browse files Browse the repository at this point in the history
[DAT-15624] Fix conflict between core and extension dropAll fixes
  • Loading branch information
vitaliimak authored Aug 14, 2023
2 parents 61fa7cc + 7f80f4d commit 5f2ba2e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 14 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
<dependency>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-core</artifactId>
<version>4.23.0</version>
<version>4.23.1</version>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,12 @@
import com.mongodb.client.MongoDatabase;
import liquibase.CatalogAndSchema;
import liquibase.Scope;
import liquibase.changelog.ChangeLogHistoryService;
import liquibase.changelog.ChangeLogHistoryServiceFactory;
import liquibase.exception.LiquibaseException;
import liquibase.executor.Executor;
import liquibase.executor.ExecutorService;
import liquibase.ext.mongodb.configuration.MongoConfiguration;
import liquibase.ext.mongodb.statement.DropAllCollectionsStatement;
import liquibase.lockservice.LockService;
import liquibase.lockservice.LockServiceFactory;
import liquibase.nosql.database.AbstractNoSqlDatabase;
import lombok.NoArgsConstructor;
import lombok.Setter;
Expand All @@ -56,16 +53,6 @@ public void dropDatabaseObjects(final CatalogAndSchema schemaToDrop) throws Liqu
final Executor executor = Scope.getCurrentScope().getSingleton(ExecutorService.class).getExecutor(EXECUTOR_NAME, this);
DropAllCollectionsStatement dropAllCollectionsStatement = new DropAllCollectionsStatement();
executor.execute(dropAllCollectionsStatement);

// TODO Revert this changes in the scope of DAT-15327
LockService lockService = LockServiceFactory.getInstance().getLockService(this);
lockService.releaseLock();
lockService.destroy();
LockServiceFactory.getInstance().resetAll();
ChangeLogHistoryService changeLogService = Scope.getCurrentScope().getSingleton(ChangeLogHistoryServiceFactory.class).getChangeLogService(this);
Scope.getCurrentScope().getSingleton(ChangeLogHistoryServiceFactory.class).unregister(changeLogService);
Scope.getCurrentScope().getSingleton(ChangeLogHistoryServiceFactory.class).resetAll();
Scope.getCurrentScope().getSingleton(ExecutorService.class).reset();
Scope.getCurrentScope().getSingleton(ChangeLogHistoryServiceFactory.class).getChangeLogService(this).destroy();
}

Expand Down

0 comments on commit 5f2ba2e

Please sign in to comment.