Module org.jooq
Package org.jooq

Interface Version


  • @Internal
    public interface Version
    A version ID attached to a Meta description of a database.

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

    Author:
    Lukas Eder
    • Method Detail

      • id

        @NotNull
        @NotNull String id()
        The version ID, which is unique in the version graph.
      • meta

        @NotNull
        @NotNull Meta meta()
        The version's Meta representation of the database.
      • migrateTo

        @NotNull
        @NotNull Queries migrateTo​(Version version)
        Produce a migration to a new version.

        In jOOQ's commercial distributions, this method allows for migrating between versions in any direction, regardless of which version was "first" in a version graph, or if the two versions are on different branches. The resulting queries are potentially destructive in such a case. Such destructive queries ("UNDO" migrations) are prevented by default, and can be turned on using Settings.isMigrationAllowsUndo().

        In jOOQ's Open Source Edition, this method only allows for migrating "forward".

      • root

        @NotNull
        @NotNull Version root()
        Get the root version of this graph.
      • parents

        @NotNull
        @NotNull List<Version> parents()
        Get the parent versions of this version.
      • apply

        @NotNull
        @NotNull Version apply​(String id,
                               Queries migration)
        Apply a migration to produce a new version.