RED-10660: Re-Add deduplication Migration

This commit is contained in:
maverickstuder 2025-01-09 13:42:43 +01:00
parent 2e3833f55d
commit 373167e568

View File

@ -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();
}
}