Top Description Methods
org.jooq

public Interface MigrationContext

extends Scope
Known Direct Implementers
org.jooq.impl.DefaultMigrationContext
Annotations
@Experimental
Imports
java.util.Set, org.jooq.conf.Settings, org.jetbrains.annotations.NotNull, .ApiStatus.Experimental

The context in which a Migration is executed.

This type is a Scope with independent lifecycle and its own data() map.

This is EXPERIMENTAL functionality and subject to change in future jOOQ versions.

Author
Lukas Eder
See Also
MigrationListener

Method Summary

Modifier and TypeMethod and Description
public @NotNull Set<Schema>
migratedSchemas()

The set of schemas that are being migrated, as specified in Settings#getMigration().

public @NotNull Commit
migrationFrom()

The Commit from which a Migration has started.

public @NotNull Queries
migrationQueries()

The complete set of Queries that are executed between migrationFrom() and migrationTo().

public @NotNull Commit
migrationTo()

The Commit to which a Migration is headed.

public @NotNull Queries
queries()

The complete set of Queries that are executed between queriesFrom() and queriesTo().

public @NotNull Commit
queriesFrom()

The Version from which an individual set of Queries has started.

public @NotNull Commit
queriesTo()

The Version to which an individual set of Queries is headed.

public @NotNull Query
query()

The current Query that is being executed.

Inherited from org.jooq.Scope:
configurationcreationTimedatadatadatadialectdslfamilysettings

Method Detail

migratedSchemasback to summary
public @NotNull Set<Schema> migratedSchemas()

The set of schemas that are being migrated, as specified in Settings#getMigration().

This is available on all MigrationListener events.

Annotations
@NotNull
migrationFromback to summary
public @NotNull Commit migrationFrom()

The Commit from which a Migration has started.

migrationFrom() and migrationTo() versions need not be consecutive versions for any given migration. If a migration jumps a few versions, these two methods will only return the endpoints.

This is available on all MigrationListener events.

Annotations
@NotNull
migrationQueriesback to summary
public @NotNull Queries migrationQueries()

The complete set of Queries that are executed between migrationFrom() and migrationTo().

This is available on all MigrationListener events.

Annotations
@NotNull
migrationToback to summary
public @NotNull Commit migrationTo()

The Commit to which a Migration is headed.

migrationFrom() and migrationTo() versions need not be consecutive versions for any given migration. If a migration jumps a few versions, these two methods will only return the endpoints.

This is available on all MigrationListener events.

Annotations
@NotNull
queriesback to summary
public @NotNull Queries queries()

The complete set of Queries that are executed between queriesFrom() and queriesTo().

This is available on the same MigrationListener events as queriesFrom() and queriesTo().

Annotations
@NotNull
queriesFromback to summary
public @NotNull Commit queriesFrom()

The Version from which an individual set of Queries has started.

queriesFrom() and queriesTo() versions are consecutive versions in a migration. If a migration jumps a few versions, these two methods might return those intermediate versions on these events:

Annotations
@NotNull
queriesToback to summary
public @NotNull Commit queriesTo()

The Version to which an individual set of Queries is headed.

queriesFrom() and queriesTo() versions are consecutive versions in a migration. If a migration jumps a few versions, these two methods might return those intermediate versions on these events:

Annotations
@NotNull
queryback to summary
public @NotNull Query query()

The current Query that is being executed.

This is available on MigrationListener#queryStart(MigrationContext) and MigrationListener#queryEnd(MigrationContext).

Annotations
@NotNull