Migration fixes & RED-10660
This commit is contained in:
parent
18c7875844
commit
770a489f7f
@ -39,6 +39,11 @@ public class AppVersionTracker {
|
||||
return;
|
||||
}
|
||||
|
||||
if (appVersion.isBlank() || layoutParserVersion.isBlank()) {
|
||||
log.info("No app version or layout parser version was provided. Version tracking skipped. ");
|
||||
return;
|
||||
}
|
||||
|
||||
TenantContext.setTenantId(tenant.getTenantId());
|
||||
|
||||
try {
|
||||
|
||||
@ -0,0 +1,35 @@
|
||||
package com.iqser.red.service.persistence.management.v1.processor.migration.migrations;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.iqser.red.service.persistence.management.v1.processor.migration.Migration;
|
||||
import com.iqser.red.service.persistence.management.v1.processor.migration.RankDeDuplicationService;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
@Slf4j
|
||||
@Service
|
||||
public class V32RankDeduplicationMigration extends Migration {
|
||||
|
||||
private static final String NAME = "Adding to the migration the rank de-duplication";
|
||||
private static final long VERSION = 32;
|
||||
|
||||
private final RankDeDuplicationService rankDeDuplicationService;
|
||||
|
||||
|
||||
public V32RankDeduplicationMigration(RankDeDuplicationService rankDeDuplicationService) {
|
||||
|
||||
super(NAME, VERSION);
|
||||
this.rankDeDuplicationService = rankDeDuplicationService;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void migrate() {
|
||||
|
||||
log.info("Migration: Checking for duplicate ranks");
|
||||
rankDeDuplicationService.deduplicate();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user