Interface MigrationsProperties
@ConfigMapping(prefix="org.neo4j.migrations")
@ConfigRoot(phase=RUN_TIME)
public interface MigrationsProperties
Shim between
MigrationsConfig and the Smallrye configuration.- Since:
- 1.2.2
- Author:
- Michael J. Simons
-
Method Summary
Modifier and TypeMethodDescriptionbooleanautocrlf()If you're programming on Windows and working with people who are not (or vice-versa), you'll probably run into line-ending issues at some point.ac.simons.neo4j.migrations.core.MigrationsConfig.CypherVersionUse this property to configure a Cypher version that will be prepended to every statement in every migration found.database()Returns the database that should be migrated (Neo4j EE 4.0+ only), leave empty for using the default database.Returns a configurable delay that will be applied in between applying two migrations.booleanenabled()Set to false to disable migrations at start.An optional list of external locations that don't become part of the image.An alternative user to impersonate during migration.Returns username recorded as property by on the MIGRATED_TO relationship.booleanWhen this flag is set to true, new migrations discovered that are "out of order", such as a version 15 is to be found between 10 and 20, it will be accepted, integrated into the chain and then move on instead of throwing an error.Returns the database that should be used for storing informations about migrations (Neo4j EE 4.0+ only), leave empty for using the default database.target()Configures the target version up to which migrations should be considered.ac.simons.neo4j.migrations.core.MigrationsConfig.TransactionModeReturns the transaction mode in use (Defaults to "per migration", meaning one script is run in one transaction).Configures the transaction timeout that should be applied for each migration or each statement (the latter depends ontransactionMode()).booleanWhen this flag is set to true, checksums will be computed with the same algorithm Flyway uses.booleanValidating helps you verify that the migrations applied to the database match the ones available locally and is on by default.ac.simons.neo4j.migrations.core.MigrationsConfig.VersionSortOrderReturns the sort order for migrations which Defaults toMigrationsConfig.VersionSortOrder.LEXICOGRAPHICuntil 3.x..
-
Method Details
-
externalLocations
An optional list of external locations that don't become part of the image. Those locations can be changed during runtime in contrast toMigrationsBuildTimeProperties.locationsToScan()but can only be used for locations inside the filesystem. Onlyfilesystem locationsare supported- Returns:
- the external locations to scan
-
enabled
@WithDefault("true") boolean enabled()Set to false to disable migrations at start. An instance ofMigrationswill still be provided to interested parties.- Returns:
- whether migrations are enabled or not
-
transactionMode
@WithDefault("PER_MIGRATION") ac.simons.neo4j.migrations.core.MigrationsConfig.TransactionMode transactionMode()Returns the transaction mode in use (Defaults to "per migration", meaning one script is run in one transaction).- Returns:
- the transaction mode in use (Defaults to "per migration", meaning one script is run in one transaction)
-
database
-
schemaDatabase
Returns the database that should be used for storing informations about migrations (Neo4j EE 4.0+ only), leave empty for using the default database.- Returns:
- the database that should be used for storing informations about migrations (Neo4j EE 4.0+ only), leave empty for using the default database
-
impersonatedUser
-
installedBy
-
validateOnMigrate
@WithDefault("true") boolean validateOnMigrate()Validating helps you verify that the migrations applied to the database match the ones available locally and is on by default.- Returns:
- a flag whether to validate the migration chaon during startup
-
autocrlf
@WithDefault("false") boolean autocrlf()If you're programming on Windows and working with people who are not (or vice-versa), you'll probably run into line-ending issues at some point. This is because Windows uses both a carriage-return character and a linefeed character for newlines in its files, whereas macOS and Linux systems use only the linefeed character. This is a subtle but incredibly annoying fact of cross-platform work; many editors on Windows silently replace existing LF-style line endings with CRLF, or insert both line-ending characters when the user hits the enter key. Neo4j migrations can handle this by auto-converting CRLF line endings into LF before computing checksums of a Cypher-based migration or applying it.- Returns:
- a flag whether to use automatic CRLF detection
-
delayBetweenMigrations
-
versionSortOrder
@WithDefault("SEMANTIC") ac.simons.neo4j.migrations.core.MigrationsConfig.VersionSortOrder versionSortOrder()Returns the sort order for migrations which Defaults toMigrationsConfig.VersionSortOrder.LEXICOGRAPHICuntil 3.x..- Returns:
- the sort order for migrations which Defaults to
MigrationsConfig.VersionSortOrder.LEXICOGRAPHICuntil 3.x.
-
transactionTimeout
Configures the transaction timeout that should be applied for each migration or each statement (the latter depends ontransactionMode()). null is a valid value and make the driver apply the default timeout for the database.- Returns:
- an optional transaction timeout
- Since:
- 2.13.0
-
outOfOrder
@WithDefault("false") boolean outOfOrder()When this flag is set to true, new migrations discovered that are "out of order", such as a version 15 is to be found between 10 and 20, it will be accepted, integrated into the chain and then move on instead of throwing an error.- Returns:
- whether to allow out-of-order migrations or not
- Since:
- 2.14.0
-
useFlywayCompatibleChecksums
@WithDefault("false") boolean useFlywayCompatibleChecksums()When this flag is set to true, checksums will be computed with the same algorithm Flyway uses.- Returns:
- whether to use Flyway compatible checksums or not
- Since:
- 2.17.0
-
target
-
cypherVersion
@WithDefault("DATABASE_DEFAULT") ac.simons.neo4j.migrations.core.MigrationsConfig.CypherVersion cypherVersion()Use this property to configure a Cypher version that will be prepended to every statement in every migration found. Leave it null or useMigrationsConfig.CypherVersion.DATABASE_DEFAULT(the default), the keep the existing behaviour of letting the database decide.- Returns:
- the Cypher version to use for statements in Cypher based migrations
- Since:
- 2.19.0
-