public class MongoTrekState extends Object
This class provides the collection of migrations and an ability to query the overall state of the process.
This includes what the current version is, what the pending state is as well as a list of failed and applied migrations.
| Modifier and Type | Class and Description |
|---|---|
static class |
MongoTrekState.Pending
Migrations State - Pending State
|
| Constructor and Description |
|---|
MongoTrekState(Collection<net.ozwolf.mongo.migrations.internal.domain.Migration> migrations) |
| Modifier and Type | Method and Description |
|---|---|
List<net.ozwolf.mongo.migrations.internal.domain.Migration> |
getApplied()
Get the list of successfully applied migrations
|
String |
getCurrentVersion()
Get the currently applied migration version.
|
List<net.ozwolf.mongo.migrations.internal.domain.Migration> |
getFailed()
Get the list of migrations that have failed.
|
List<net.ozwolf.mongo.migrations.internal.domain.Migration> |
getMigrations()
Get the full list of migrations.
|
MongoTrekState.Pending |
getPending()
Return the pending migrations state.
|
public MongoTrekState(Collection<net.ozwolf.mongo.migrations.internal.domain.Migration> migrations)
public String getCurrentVersion()
Get the currently applied migration version.
public List<net.ozwolf.mongo.migrations.internal.domain.Migration> getMigrations()
Get the full list of migrations. This includes the entire history of applied migrations, even if the command source has since been removed from the project.
public MongoTrekState.Pending getPending()
Return the pending migrations state.
public List<net.ozwolf.mongo.migrations.internal.domain.Migration> getFailed()
Get the list of migrations that have failed.
public List<net.ozwolf.mongo.migrations.internal.domain.Migration> getApplied()
Get the list of successfully applied migrations
Copyright © 2016. All Rights Reserved.