Package dev.getelements.elements.dao.mongo.migration
package dev.getelements.elements.dao.mongo.migration
-
ClassDescriptionA single operator-run database migration.Applies pending
Migrations, in ascendingMigration.getId()order, tracking completion in theschema_migrationscollection (SchemaMigrationRecord) so each migration runs at most once.A migration that must run before the MorphiaDatastoreis constructed — e.g. raw index cleanup needed to avoid a conflict that would otherwise crashMorphia.createDatastore(...)itself (seedev.getelements.elements.dao.mongo.migration.migrations.DropLegacyAuthSchemeIndexesMigrationfor a concrete example).Applies pendingPreDatastoreMigrations, in ascendingPreDatastoreMigration.getId()order, before the MorphiaDatastoreis constructed.Tracks that aMigrationwith a given id has been applied.