Summary
- Assembly
- Cake
.Flyway .dll - Namespace
- Cake
.Flyway - Base Types
-
- Object
Syntax
public class FlywayConfiguration
Constructors
Name | Summary |
---|---|
FlywayConfiguration |
Properties
Name | Value | Summary |
---|---|---|
BaselineDescription | string |
The description to tag an existing schema with when executing baseline.
(default: << Flyway Baseline >>)
|
BaselineOnMigrate | Nullable |
Whether to automatically call baseline when migrate is executed against a non-empty schema with no metadata table. (default: false) This schema will then be initialized with the baselineVersion before executing the migrations. Only migrations above baselineVersion will then be applied. This is useful for initial Flyway production deployments on projects with an existing DB. Be careful when enabling this as it removes the safety net that ensures Flyway does not migrate the wrong database in case of a configuration mistake! |
BaselineVersion | string |
The version to tag an existing schema with when executing baseline. (default: 1)
|
Callbacks | IList |
This allows you to tie in custom code and logic to the Flyway lifecycle notifications (default: empty). Set this to a list of fully qualified FlywayCallback class name implementations |
CleanDisabled | Nullable |
Whether to disabled clean. (default: false) This is especially useful for production environments where running clean can be quite a career limiting move. |
Clean |
Nullable |
Whether to automatically call clean or not when a validation error occurs. (default: false) This is exclusively intended as a convenience for development. Even tough we strongly recommend not to change migration scripts once they have been checked into SCM and run, this provides a way of dealing with this case in a smooth manner. The database will be wiped clean automatically, ensuring that the next migration will bring you back to the state checked into SCM. Warning ! Do not enable in production ! |
ConfigurationFile | string |
Path to the Flyway configuration file to be used
(default: <<INSTALL-DIR>>/conf/flyway.conf)
|
ConfigurationFiles | ISet |
Path to the Flyway configuration files to be used.
|
Driver | string |
Fully qualified classname of the jdbc driver
(autodetected by default based on
Url )
|
Encoding | string |
Encoding of Sql migrations (default: UTF8)
|
Group | Nullable |
Whether to group all pending migrations together in the same transaction when applying
them (only recommended for databases with support for DDL transactions). true if migrations
should be grouped. false if they should be applied individually instead. (default: false)
|
Ignore |
Nullable |
Ignore future migrations when reading the metadata table. (default: true) These are migrations that were performed by a newer deployment of the application that are not yet available in this version. For example: we have migrations available on the classpath up to version 3.0. The metadata table indicates that a migration to version 4.0 (unknown to us) has already been applied. Instead of bombing out (fail fast) with an exception, a warning is logged and Flyway continues normally. This is useful for situations where one must be able to redeploy an older version of the application after the database has been migrated by a newer one. true to continue normally and log a warning, false to fail fast with an exception. |
Ignore |
Nullable |
Ignore missing migrations when reading the metadata table. (default: false) These are migrations that were performed by an older deployment of the application that are no longer available in this version. For example: we have migrations available on the classpath with versions 1.0 and 3.0. The metadata table indicates that a migration with version 2.0 (unknown to us) has also been applied. Instead of bombing out (fail fast) with an exception, a warning is logged and Flyway continues normally. This is useful for situations where one must be able to deploy a newer version of the application even though it doesn't contain migrations included with an older one anymore. true to continue normally and log a warning, false to fail fast with an exception. |
InstalledBy | string |
The username that will be recorded in the metadata table as having applied the migration.
<<blank>> for the current database user of the connection.
(default: <<blank>>).
|
JarDirs | IList |
List of directories containing JDBC drivers and Java-based migrations.
(default: <<INSTALL-DIR>>/jars)
|
Locations | IList |
List of locations to scan recursively for migrations. (default: filesystem:<<INSTALL-DIR>>/sql) The location type is determined by its prefix. Unprefixed locations or locations starting with classpath: point to a package on the classpath and may contain both sql and java-based migrations. Locations starting with filesystem: point to a directory on the filesystem and may only contain sql migrations. |
Mixed | Nullable |
Whether to allow mixing transactional and non-transactional statements within the same
migration. true if mixed migrations should be allowed. false if an error should be thrown
instead. (default: false)
|
OutOfOrder | Nullable |
Allows migrations to be run "out of order". (default: false) If you already have versions 1 and 3 applied, and now a version 2 is found, it will be applied too instead of being ignored. |
Password | string |
Password to use to connect to the database
|
PlaceholderPrefix | string |
Prefix of every placeholder (default: ${ )
|
Placeholder |
Nullable |
Whether placeholders should be replaced. (default: true)
|
Placeholders | IDictionary |
Placeholders to replace in Sql migrations
|
PlaceholderSuffix | string |
Suffix of every placeholder (default: } )
|
Repeatable |
string |
File name prefix for repeatable sql migrations (default: R ) Repeatable sql migrations have the following file name structure: prefixSeparatorDESCRIPTIONsuffix, which using the defaults translates to R__My_description.sql |
Resolvers | IList |
List of fully qualified class names of custom MigrationResolver
to use for resolving migrations.
|
Schemas | IList |
List of schemas managed by Flyway. These schema names are case-sensitive. (default: The default schema for the datasource connection) Consequences:
|
SkipDefaultCallbacks | Nullable |
If set to true, default built-in callbacks (sql) are skipped and only custom callback as
defined by 'flyway.callbacks' are used. (default: false)
|
SkipDefaultResolvers | Nullable |
If set to true, default built-in resolvers (jdbc, spring-jdbc and sql) are
skipped and only custom resolvers as defined by 'flyway.resolvers' are used.
(default: false)
|
SqlMigrationPrefix | string |
File name prefix for sql migrations (default: V ) Sql migrations have the following file name structure: prefixVERSIONseparatorDESCRIPTIONsuffix, which using the defaults translates to V1_1__My_description.sql |
Sql |
string |
File name separator for Sql migrations (default: __) Sql migrations have the following file name structure: prefixVERSIONseparatorDESCRIPTIONsuffix, which using the defaults translates to V1_1__My_description.sql |
SqlMigrationSuffix | string |
File name suffix for Sql migrations (default: .sql) Sql migrations have the following file name structure: prefixVERSIONseparatorDESCRIPTIONsuffix, which using the defaults translates to V1_1__My_description.sql |
Table | string |
Name of Flyway's metadata table (default: schema_version) By default (single-schema mode) the metadata table is placed in the default schema for the connection provided by the datasource. When the flyway.schemas property is set (multi-schema mode), the metadata table is placed in the first schema of the list. |
Target | string |
Target version up to which Flyway should consider migrations. The special value 'current' designates the current version of the schema. (default: latest version) |
Url | string |
Jdbc url to use to connect to the database
|
User | string |
User to use to connect to the database
|
ValidateOnMigrate | Nullable |
Whether to automatically call validate or not when running migrate. (default: true)
|
Methods
Name | Value | Summary |
---|---|---|
AddClasspathLocation |
FlywayConfiguration |
Adds location as a classpath location to
Locations .
The method automatically adds the required "classpath:" in front of
location
|
Add |
FlywayConfiguration |
Adds location as a filesystem location to
Locations .
The method automatically adds the required "filesystem:" in front of
location
|
Extension Methods
Name | Value | Summary |
---|---|---|
Dump |
string |
Get a basic string representation of specified object.
From LoggingExtensions
Requires the Cake.Incubator addin
|
IsIn |
bool |
Checks if the source is contained in a list
From EnumerableExtensions
Requires the Cake.Incubator addin
|
NotNull |
void |
Throws an exception if the specified parameter's value is null.
From Extensions
Requires the Cake.Ftp addin
|
NotNull |
void |
Throws an exception if the specified parameter's value is null.
From IssuesArgumentChecks
Requires the Cake.Issues addin
|
ThrowIfNull |
T |
Throws a
System.ArgumentNullException with a specific message if the value is null, otherwise returns the value
From AssertExtensions
Requires the Cake.Incubator addin
|
ThrowIfNull |
T |
Throws a
System.ArgumentNullException if the value is null, otherwise returns the value
From AssertExtensions
Requires the Cake.Incubator addin
|
ToDictionary |
IDictionary |
From ObjectHelpers
Requires the Cake.DeployParams addin
|
To |
string |
Returns the string value or a
Not set > markup suitable for Spectre.Console.
From StringExtensions
Requires the Cake.Issues addin
|