Package ac.simons.neo4j.migrations.core
Interface MigrationChain
- All Superinterfaces:
ConnectionDetails
Public information about an applied migration. All migrations (applied and pending) form a chain of transformations
to a database. 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
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic enum
Used for selecting how theMigrationChain
should be computed.static interface
A chain element describing a pending or applied migration. -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.default Optional<MigrationVersion>
boolean
default String
Pretty prints this chain as an ASCII table.Methods inherited from interface ac.simons.neo4j.migrations.core.ConnectionDetails
getOptionalDatabaseName, getOptionalSchemaDatabaseName, getServerAddress, getServerEdition, getServerVersion, getUsername
-
Method Details
-
prettyPrint
Pretty prints this chain as an ASCII table.- Returns:
- A formatted string (an ASCII table representing the chain)
- Since:
- 0.0.11
-
getDatabaseName
Deprecated.since 1.1.0, seeConnectionDetails.getOptionalDatabaseName()
- Returns:
- The database if applicable (Neo4j 4.0 and up), maybe null
-
isApplied
- Parameters:
version
- An arbitrary version string- Returns:
- True, if the version string maps to a migration that has been applied.
-
getElements
Collection<MigrationChain.Element> getElements()- Returns:
- The elements of this migration
-
getLastAppliedVersion
- Returns:
- the last applied version
- Since:
- 1.11.0
-
ConnectionDetails.getOptionalDatabaseName()