@Test public void shouldFindMigrationEntryIfAvailable() throws Exception { addMigration(new InitialMigrationInfo("1")); addMigration(new MigrationInfo("1", "2")); assertThat( migrationHistoryService.findMigration("1", "2"), allOf(hasProperty("fromVersion", is("1")), hasProperty("toVersion", is("2")))); }
@Override public MigrationEntry findMigration(String fromVersion, String toVersion) { return mapMigrationEntry(findMigrationDoc(fromVersion, toVersion)); }
MongoMigrationHistoryService implements MigrationHistoryService { @Override public MigrationEntry findMigration(String fromVersion, String toVersion) { return mapMigrationEntry(findMigrationDoc(fromVersion, toVersion)); } }
MongoMigrationHistoryService implements MigrationHistoryService { @Override public MigrationEntry findMigration(String fromVersion, String toVersion) { return mapMigrationEntry(findMigrationDoc(fromVersion, toVersion)); } MongoMigrationHistoryService(MongoDatabase database); }
MongoMigrationHistoryService implements MigrationHistoryService { @Override public MigrationEntry findMigration(String fromVersion, String toVersion) { return mapMigrationEntry(findMigrationDoc(fromVersion, toVersion)); } MongoMigrationHistoryService(MongoDatabase database); @Override MigrationEntry insertMigrationStatusInProgress(MigrationInfo migrationInfo); @Override MigrationEntry insertMigrationStatusSkipped(MigrationInfo migrationInfo); @Override MigrationEntry setMigrationStatusToFailed(MigrationEntry migrationEntry, Exception e); @Override MigrationEntry setMigrationStatusToFinished(MigrationEntry migrationEntry); @Override MigrationEntry setMigrationStatusToManuallyRepaired(MigrationEntry migrationEntry); @Override MigrationEntry getLastMigrationApplied(); @Override Iterable<MigrationEntry> getAllMigrationsApplied(); @Override MigrationEntry findMigration(String fromVersion, String toVersion); @Override Iterable<MigrationEntry> findMigrations(String fromVersion); @Override MigrationEntry addRunToMigrationEntry(MigrationEntry migEntry, MigrationRun migRun); }
MongoMigrationHistoryService implements MigrationHistoryService { @Override public MigrationEntry findMigration(String fromVersion, String toVersion) { return mapMigrationEntry(findMigrationDoc(fromVersion, toVersion)); } MongoMigrationHistoryService(MongoDatabase database); @Override MigrationEntry insertMigrationStatusInProgress(MigrationInfo migrationInfo); @Override MigrationEntry insertMigrationStatusSkipped(MigrationInfo migrationInfo); @Override MigrationEntry setMigrationStatusToFailed(MigrationEntry migrationEntry, Exception e); @Override MigrationEntry setMigrationStatusToFinished(MigrationEntry migrationEntry); @Override MigrationEntry setMigrationStatusToManuallyRepaired(MigrationEntry migrationEntry); @Override MigrationEntry getLastMigrationApplied(); @Override Iterable<MigrationEntry> getAllMigrationsApplied(); @Override MigrationEntry findMigration(String fromVersion, String toVersion); @Override Iterable<MigrationEntry> findMigrations(String fromVersion); @Override MigrationEntry addRunToMigrationEntry(MigrationEntry migEntry, MigrationRun migRun); static final String MIGRAMONGO_COLLECTION; }