Package ac.simons.neo4j.migrations.core
Class MigrationsConfig
java.lang.Object
ac.simons.neo4j.migrations.core.MigrationsConfig
Configuration for Migrations.
- Since:
- 0.0.1
- Author:
- Michael J. Simons
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
A builder to create new instances ofconfigurations
.static enum
Used for configuring the transaction mode in Cypher-based transactions.static enum
This class has been introduced in 2.8.3 to configure the way version numbers are sorted. -
Method Summary
Modifier and TypeMethodDescriptionstatic MigrationsConfig.Builder
builder()
Start building a new configuration.static MigrationsConfig
List
<? extends RenderConfig.AdditionalRenderingOptions> Returns the list of additional options to use when rendering constraints.String[]
String[]
Returns the configured version sort order.boolean
boolean
void
Helper method to pretty print this configuration into a logger (on level INFO respectively WARNING.
-
Method Details
-
builder
Start building a new configuration.- Returns:
- The entry point for creating a new configuration.
- Since:
- 0.0.1
-
defaultConfig
- Returns:
- The default config
- Since:
- 0.0.6
-
getPackagesToScan
- Returns:
- the list of packages to scan
-
getLocationsToScan
- Returns:
- the list of locations to scan
-
getTransactionMode
- Returns:
- the transaction mode (whether to use one transaction for per migration or per statement)
-
getOptionalDatabase
- Returns:
- An optional target database
- Since:
- 1.1.0
-
getOptionalSchemaDatabase
- Returns:
- An optional schema database
- Since:
- 1.1.0
-
getOptionalImpersonatedUser
- Returns:
- An optional user to impersonate
- Since:
- 1.1.0
-
getOptionalInstalledBy
- Returns:
- Optional user information about the user executing the migration
- Since:
- 1.1.0
-
isValidateOnMigrate
public boolean isValidateOnMigrate()- Returns:
- true if resolved migrations and database state should be validated before a migration attempt is applied
-
isAutocrlf
public boolean isAutocrlf()- Returns:
- whether CRLF line endings should be automatically converted into LF
-
getMigrationClassesDiscoverer
- Returns:
- The discoverer for class based migrations, never null
- Since:
- 1.3.0
-
getResourceScanner
- Returns:
- The resource scanner, never null
- Since:
- 1.3.0
-
getOptionalDelayBetweenMigrations
- Returns:
- The delay to apply between migrations
- Since:
- 2.3.2
-
getConstraintRenderingOptions
Returns the list of additional options to use when rendering constraints.- Returns:
- the list of additional options to use when rendering constraints
- Since:
- 2.8.2
-
logTo
Helper method to pretty print this configuration into a logger (on level INFO respectively WARNING.- Parameters:
logger
- the logger to print toverbose
- set to true if you want to print all details
-
getVersionSortOrder
Returns the configured version sort order.- Returns:
- the configured version sort order
-