Class MigrationInfoServiceImpl

    • Constructor Detail

      • MigrationInfoServiceImpl

        public MigrationInfoServiceImpl​(MigrationResolver migrationResolver,
                                        SchemaHistory schemaHistory,
                                        Database<?> database,
                                        Configuration configuration,
                                        TargetVersion target,
                                        MigrationPattern[] cherryPick,
                                        ValidationContext validationContext)
        Parameters:
        migrationResolver - The migration resolver for available migrations.
        schemaHistory - The schema history table for applied migrations.
        configuration - The current configuration.
        target - The target version up to which to retrieve the info.
        cherryPick - The migrations to consider when migration.
    • Method Detail

      • refresh

        public void refresh()
        Refreshes the info about migration state using the resolved migrations and schema history information.
      • all

        public MigrationInfo[] all()
        Specified by:
        all in interface MigrationInfoService
        Returns:
        The full set of info about applied, current and future migrations. An empty array if none.
      • current

        public MigrationInfo current()
        Specified by:
        current in interface MigrationInfoService
        Returns:
        Information about the current applied migration or null if no migrations have been applied yet.
      • next

        public MigrationInfo next()
        Specified by:
        next in interface MigrationInfoService
        Returns:
        The next pending migration or null if no migration is pending. This will be the first outdated repeatable migration if no pending versioned migration exists.
      • pending

        public MigrationInfo[] pending()
        Specified by:
        pending in interface MigrationInfoService
        Returns:
        All pending migrations, available locally, but not yet applied to the DB, ordered by version. An empty array if none.
      • validate

        public List<ValidateOutput> validate()
        Returns:
        The list of migrations that failed validation, which is empty if everything is fine.
      • setAllSchemasEmpty

        public void setAllSchemasEmpty​(Schema<?,​?>[] schemas)
      • getInfoResult

        public InfoResult getInfoResult()