use of org.neo4j.kernel.impl.storemigration.participant.LegacyIndexMigrator in project neo4j by neo4j.
the class DatabaseMigrator method migrate.
/**
* Performs construction of {@link StoreUpgrader} and all of the necessary participants and performs store
* migration if that is required.
* @param storeDir store to migrate
*/
public void migrate(File storeDir) {
LogProvider logProvider = logService.getInternalLogProvider();
UpgradableDatabase upgradableDatabase = new UpgradableDatabase(fs, new StoreVersionCheck(pageCache), new LegacyStoreVersionCheck(fs), format);
StoreUpgrader storeUpgrader = new StoreUpgrader(upgradableDatabase, progressMonitor, config, fs, pageCache, logProvider);
StoreMigrationParticipant schemaMigrator = schemaIndexProvider.storeMigrationParticipant(fs, pageCache, labelScanStoreProvider);
LegacyIndexMigrator legacyIndexMigrator = new LegacyIndexMigrator(fs, indexProviders, logProvider);
StoreMigrator storeMigrator = new StoreMigrator(fs, pageCache, config, logService, schemaIndexProvider);
storeUpgrader.addParticipant(schemaMigrator);
storeUpgrader.addParticipant(legacyIndexMigrator);
storeUpgrader.addParticipant(storeMigrator);
storeUpgrader.migrateIfNeeded(storeDir);
}
Aggregations