-
Notifications
You must be signed in to change notification settings - Fork 10
Flyway Configuration
assafkamil edited this page Jan 15, 2021
·
1 revision
Flyway Lambda supports loading Flyway configuration from environment variables, function parameters, and configuration file located on either Git or S3.
Function parameters take precedence over environment variables and configuration files.
Option | Description | Parameter | Environment variable | Value type | Required | Default |
---|---|---|---|---|---|---|
Flyway method | Flyway method to run | flywayMethod | FLYWAY_METHOD | MIGRATE | INFO | BASELINE | CLEAN | REPAIR | VALIDATE | Yes | |
Flyway configuration file | File in S3: s3://[Bucket]/[Key] File in Git file://[Path from repo root]
|
configFile | FLYWAY_CONFIG_FILE | string | No | |
connectRetries | The maximum number of retries when attempting to connect to the database | connectRetries | FLYWAY_CONNECT_RETRIES | integer | No | 0 |
initSql | The SQL statements to run to initialize a new database connection immediately after opening it. | initSql | FLYWAY_INIT_SQL | string | No | |
schemas | Comma-separated case-sensitive list of schemas managed by Flyway. | schemas | FLYWAY_SCHEMAS | string | No | |
table | The name of Flyway’s schema history table. | table | FLYWAY_TABLE | string | No | |
tablespace | The tablespace where to create the schema history table that will be used by Flyway. | tablespace | FLYWAY_TABLESPACE | string | No | |
sqlMigrationPrefix | The file name prefix for versioned SQL migrations. | sqlMigrationPrefix | FLYWAY_SQL_MIGRATION_PREFIX | string | No | V |
repeatableSqlMigrationPrefix | The file name prefix for repeatable SQL migrations. | repeatableSqlMigrationPrefix | FLYWAY_REPEATABLE_SQL_MIGRATION_PREFIX | string | No | R |
sqlMigrationSeparator | The file name separator for Sql migrations. | sqlMigrationSeparator | FLYWAY_SQL_MIGRATION_SEPARATOR | string | No | _ |
sqlMigrationSuffixes | Comma-separated list of file name suffixes for SQL migrations. | sqlMigrationSuffixes | FLYWAY_SQL_MIGRATION_SUFFIXES | string | No | .sql |
encoding | The encoding of Sql migrations | encoding | FLYWAY_ENCODING | string | No | UTF-8 |
placeholderReplacement | Whether placeholders should be replaced | placeholderReplacement | FLYWAY_PLACEHOLDER_REPLACEMENT | boolean | No | true |
placeholders | Placeholders to replace in SQL migrations. | placeholders | FLYWAY_PLACEHOLDERS_KEY1, FLYWAY_PLACEHOLDERS_KEY2, ... | string | No | |
placeholderPrefix | The prefix of every placeholder | placeholderPrefix | FLYWAY_PLACEHOLDER_PREFIX | string | No | ${ |
placeholderSuffix | The suffix of every placeholder | placeholderSuffix | FLYWAY_PLACEHOLDER_SUFFIX | string | No | } |
skipDefaultCallResolvers | ?? | skipDefaultCallResolvers | ?? | boolean | No | } |
skipDefaultCallbacks | Whether default built-in callbacks (sql) should be skipped. If true, only custom callbacks are used. | skipDefaultCallbacks | FLYWAY_SKIP_DEFAULT_CALLBACKS | boolean | No | false |
target | The target version up to which Flyway should consider migrations. | target | FLYWAY_TARGET | string | No | latest |
outOfOrder | Allows migrations to be run “out of order”. | outOfOrder | FLYWAY_OUT_OF_ORDER | boolean | No | false |
validateOnMigrate | Whether to automatically call validate or not when running migrate. | validateOnMigrate | FLYWAY_VALIDATE_ON_MIGRATE | boolean | No | true |
cleanOnValidationError | Whether to automatically call clean or not when a validation error occurs. | cleanOnValidationError | FLYWAY_CLEAN_ON_VALIDATION_ERROR | boolean | No | false |
mixed | Whether to allow mixing transactional and non-transactional statements within the same migration. | mixed | FLYWAY_MIXED | boolean | No | false |
group | Whether to group all pending migrations together in the same transaction when applying them | group | FLYWAY_GROUP | boolean | No | false |
ignoreMissingMigrations | Ignore missing migrations when reading the schema history table. | ignoreMissingMigrations | FLYWAY_IGNORE_MISSING_MIGRATIONS | boolean | No | false |
ignoreIgnoredMigrations | Ignore ignored migrations when reading the schema history table. | ignoreIgnoredMigrations | FLYWAY_IGNORE_IGNORED_MIGRATIONS | boolean | No | false |
ignoreFutureMigrations | Ignore future migrations when reading the schema history table. | ignoreFutureMigrations | FLYWAY_IGNORE_FUTURE_MIGRATIONS | boolean | No | true |
cleanDisabled | Whether to disable clean. | cleanDisabled | FLYWAY_CLEAN_DISABLED | boolean | No | false |
baselineOnMigrate | Whether to automatically call baseline when migrate is executed against a non-empty schema with no metadata table. | baselineOnMigrate | FLYWAY_BASELINE_ON_MIGRATE | boolean | No | false |
baselineVersion | The version to tag an existing schema with when executing baseline. | baselineVersion | FLYWAY_BASELINE_VERSION | string | No | 1 |
baselineDescription | The Description to tag an existing schema with when executing baseline. | baselineDescription | FLYWAY_BASELINE_DESCRIPTION | string | No | << Flyway Baseline >> |
installedBy | The username that will be recorded in the schema history table as having applied the migration. | installedBy | FLYWAY_INSTALLED_BY | string | No | Current database user |