- All Superinterfaces:
Scope
An executable migration between two
Commit instances.
This type is a Scope with independent lifecycle and its own
Scope.data() map.
This is EXPERIMENTAL functionality and subject to change in future jOOQ versions.
- Author:
- Lukas Eder
-
Method Summary
Modifier and TypeMethodDescriptionvoidbaseline()Create a baseline from the current schema using the pending changes, if they match.voidexecute()Apply the migration.@NotNull Commitfrom()The version that is being migrated from.@Nullable CommitThe lastContentType.SNAPSHOTcommit that is being migrated from, ornullif there's no snapshot.voidLog the most recent versions from the migration history to the configured logger.voidLog the pending migration to the configured logger.voidLog the untracked database changes of the migration schemas.@NotNull Queriesqueries()The queries that are executed by the migration.@NotNull Committo()The version that is being migrated to.@NotNull QueriesThe queries that describe the untracked schema objects.voidverify()Verify the correctness of a migration.Methods inherited from interface org.jooq.Scope
configuration, creationTime, data, data, data, dialect, dsl, family, settings
-
Method Details
-
from
The version that is being migrated from. -
fromSnapshot
The lastContentType.SNAPSHOTcommit that is being migrated from, ornullif there's no snapshot.This API is part of a commercial only feature. To use this feature, please use the jOOQ Professional Edition or the jOOQ Enterprise Edition.
-
to
The version that is being migrated to. -
queries
The queries that are executed by the migration. -
untracked
The queries that describe the untracked schema objects. -
logHistory
Log the most recent versions from the migration history to the configured logger. -
logPending
Log the pending migration to the configured logger. -
logUntracked
Log the untracked database changes of the migration schemas. -
verify
Verify the correctness of a migration.- Throws:
DataMigrationVerificationException- When something went wrong during the verification of the migration.
-
baseline
Create a baseline from the current schema using the pending changes, if they match.- Throws:
DataMigrationVerificationException- When something went wrong during the creation of the baseline.
-
execute
Apply the migration.- Throws:
DataMigrationException- When something went wrong during the application of the migration.
-