Interface MigrationChain


public interface MigrationChain
Public information about an applied migration. All migrations (applied and pending) form a chain of transformations to a dabase. The chain starts implicit with a baseline version. The baseline version is not contained in this chain.
Since:
0.0.4
Author:
Michael J. Simons
Soundtrack
Paul van Dyk - From Then On
  • Method Details

    • prettyPrint

      default String prettyPrint()
      Pretty prints this chain as an ASCII table.
      Returns:
      A formatted string (an ASCII table representing the chain)
      Since:
      0.0.11
    • getServerAddress

      String getServerAddress()
      Returns:
      The address of the server used.
    • getServerVersion

      String getServerVersion()
      Returns:
      The Neo4j version the server is running
    • getUsername

      String getUsername()
      Returns:
      The Neo4j user that ran the migrations
    • getDatabaseName

      @Deprecated String getDatabaseName()
      Deprecated.
      since 1.1.0, please use getOptionalDatabaseName() ()}
      Returns:
      The database if applicable (Neo4j 4.0 and up), maybe null
    • getOptionalDatabaseName

      Optional<String> getOptionalDatabaseName()
      Returns:
      The database if applicable (Neo4j 4.0 and up)
      Since:
      1.1.0
    • getOptionalSchemaDatabaseName

      Optional<String> getOptionalSchemaDatabaseName()
      Returns:
      The database if applicable (Neo4j 4.0 and up)
      Since:
      1.1.0
    • isApplied

      boolean isApplied(String version)
      Parameters:
      version - An arbitrary version string
      Returns:
      True, if the version string maps to a migration that has been applied.
    • getElements

      Returns:
      The elements of this migration