Class RetireLegacyJobExecutionModelMigration
java.lang.Object
db.migration.RetireLegacyJobExecutionModelMigration
- All Implemented Interfaces:
org.flywaydb.core.api.migration.JavaMigration
public class RetireLegacyJobExecutionModelMigration
extends Object
implements org.flywaydb.core.api.migration.JavaMigration
Completes the cutover that
V57 began: moves every attempt onto the durable lifecycle
statuses and removes the tables and columns the synchronous job engine left behind.
This cannot be plain SQL. The initial schema declared the jobs.status and
actions.status checks, the actions(job_id, priority) unique and the
jobs.job_result_id unique without naming any of them, and the generated names differ per
database. The old status checks have to come off before the values can be rewritten, and
PostgreSQL drops a constraint along with its column while H2 refuses, so every one of them has to
be resolved from the catalog at runtime.
- Version:
- 3.0.6
- Author:
- Stephen Prizio
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanAllows the migration to execute transactionally where the database supports it.Returns the checksum for this migration.Returns the Flyway description for this migration.org.flywaydb.core.api.MigrationVersionReturns the Flyway version for this migration.voidmigrate(org.flywaydb.core.api.migration.Context context) Rewrites lifecycle statuses and drops the legacy result model.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.flywaydb.core.api.migration.JavaMigration
getResolvedMigration, getType
-
Constructor Details
-
RetireLegacyJobExecutionModelMigration
public RetireLegacyJobExecutionModelMigration()
-
-
Method Details
-
getVersion
public org.flywaydb.core.api.MigrationVersion getVersion()Returns the Flyway version for this migration.- Specified by:
getVersionin interfaceorg.flywaydb.core.api.migration.JavaMigration
-
getDescription
Returns the Flyway description for this migration.- Specified by:
getDescriptionin interfaceorg.flywaydb.core.api.migration.JavaMigration
-
getChecksum
Returns the checksum for this migration.- Specified by:
getChecksumin interfaceorg.flywaydb.core.api.migration.JavaMigration
-
canExecuteInTransaction
public boolean canExecuteInTransaction()Allows the migration to execute transactionally where the database supports it.- Specified by:
canExecuteInTransactionin interfaceorg.flywaydb.core.api.migration.JavaMigration
-
migrate
-