- 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 TypeMethodDescriptionvoid
baseline()
Create a baseline from the current schema using the pending changes, if they match.void
execute()
Apply the migration.@NotNull Commit
from()
The version that is being migrated from.@Nullable Commit
The lastContentType.SNAPSHOT
commit that is being migrated from, ornull
if there's no snapshot.void
Log the most recent versions from the migration history to the configured logger.void
Log the pending migration to the configured logger.void
Log the untracked database changes of the migration schemas.@NotNull Queries
queries()
The queries that are executed by the migration.@NotNull Commit
to()
The version that is being migrated to.@NotNull Queries
The queries that describe the untracked schema objects.void
verify()
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.SNAPSHOT
commit that is being migrated from, ornull
if 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.
-