Class MongoTrekState


  • public class MongoTrekState
    extends Object

    Mongo Trek State

    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.
    • Method Detail

      • getCurrentVersion

        public String getCurrentVersion()
        Get the currently applied migration version.
        Returns:
        The currently applied version
      • getMigrations

        public List<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.
        Returns:
        The full list of migrations, both applied history and pending commands.
      • getPending

        public MongoTrekState.Pending getPending()
        Return the pending migrations state.
        Returns:
        The pending migration state
      • getFailed

        public List<Migration> getFailed()
        Get the list of migrations that have failed.
        Returns:
        The failed migrations
      • getApplied

        public List<Migration> getApplied()
        Get the list of successfully applied migrations
        Returns:
        The applied migrations