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 TypeMethodDescriptionboolean
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.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.boolean
enabled()
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.Returns the database that should be used for storing informations about migrations (Neo4j EE 4.0+ only), leave empty for using the default database.ac.simons.neo4j.migrations.core.MigrationsConfig.TransactionMode
Returns 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()
).boolean
Validating 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.VersionSortOrder
Returns the sort order for migrations which Defaults toMigrationsConfig.VersionSortOrder.LEXICOGRAPHIC
until 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.- Returns:
- the external locations to scan
-
enabled
@WithDefault("true") boolean enabled()Set to false to disable migrations at start. An instance ofMigrations
will 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
Returns the database that should be migrated (Neo4j EE 4.0+ only), leave empty for using the default database.- Returns:
- the database that should be migrated (Neo4j EE 4.0+ only), leave empty for using the default 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
An alternative user to impersonate during migration. Might have higher privileges than the user connected, which will be dropped again after migration. Requires Neo4j EE 4.4+. Leave empty for using the connected user.- Returns:
- the name of the user to impersonate
-
installedBy
Returns username recorded as property by on the MIGRATED_TO relationship.- Returns:
- username recorded as property by on the MIGRATED_TO relationship
-
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
Returns a configurable delay that will be applied in between applying two migrations.- Returns:
- a configurable delay that will be applied in between applying two migrations
-
versionSortOrder
@WithDefault("LEXICOGRAPHIC") ac.simons.neo4j.migrations.core.MigrationsConfig.VersionSortOrder versionSortOrder()Returns the sort order for migrations which Defaults toMigrationsConfig.VersionSortOrder.LEXICOGRAPHIC
until 3.x..- Returns:
- the sort order for migrations which Defaults to
MigrationsConfig.VersionSortOrder.LEXICOGRAPHIC
until 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.- Since:
- 2.13.0
-