Class NormalizeJobTypeConstraintMigration

java.lang.Object
db.migration.NormalizeJobTypeConstraintMigration
All Implemented Interfaces:
org.flywaydb.core.api.migration.JavaMigration

public class NormalizeJobTypeConstraintMigration extends Object implements org.flywaydb.core.api.migration.JavaMigration
Replaces every legacy jobs.type check with one canonical constraint.
Version:
3.0.1
Author:
Stephen Prizio
  • Constructor Details

    • NormalizeJobTypeConstraintMigration

      public NormalizeJobTypeConstraintMigration()
  • Method Details

    • getVersion

      public org.flywaydb.core.api.MigrationVersion getVersion()
      Returns the Flyway version for this migration.
      Specified by:
      getVersion in interface org.flywaydb.core.api.migration.JavaMigration
    • getDescription

      public String getDescription()
      Returns the Flyway description for this migration.
      Specified by:
      getDescription in interface org.flywaydb.core.api.migration.JavaMigration
    • getChecksum

      public Integer getChecksum()
      Returns the checksum for this migration.
      Specified by:
      getChecksum in interface org.flywaydb.core.api.migration.JavaMigration
    • canExecuteInTransaction

      public boolean canExecuteInTransaction()
      Allows the migration to execute transactionally where the database supports it.
      Specified by:
      canExecuteInTransaction in interface org.flywaydb.core.api.migration.JavaMigration
    • migrate

      public void migrate(org.flywaydb.core.api.migration.Context context) throws Exception
      Normalizes the jobs.type check constraint.
      Specified by:
      migrate in interface org.flywaydb.core.api.migration.JavaMigration
      Throws:
      Exception