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 Type
    Method
    Description
    boolean
    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.
    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
    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 on transactionMode()).
    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 to MigrationsConfig.VersionSortOrder.LEXICOGRAPHIC until 3.x..
  • Method Details

    • externalLocations

      Optional<List<String>> externalLocations()
      An optional list of external locations that don't become part of the image. Those locations can be changed during runtime in contrast to MigrationsBuildTimeProperties.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 of Migrations 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

      Optional<String> 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

      Optional<String> 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

      Optional<String> 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

      Optional<String> 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

      Optional<Duration> 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 to MigrationsConfig.VersionSortOrder.LEXICOGRAPHIC until 3.x..
      Returns:
      the sort order for migrations which Defaults to MigrationsConfig.VersionSortOrder.LEXICOGRAPHIC until 3.x.
    • transactionTimeout

      Optional<Duration> transactionTimeout()
      Configures the transaction timeout that should be applied for each migration or each statement (the latter depends on transactionMode()). null is a valid value and make the driver apply the default timeout for the database.
      Since:
      2.13.0