Skip to content

Commit 1101848

Browse files
Bump version to flyway-10.17.0
Please see the GH release for the release notes Azure Identity is now a dependency of Flyway for SQL Server Active Directory MSI authentication Update driver details for the plugin and YBDB verified versions
1 parent 8a05ff5 commit 1101848

File tree

55 files changed

+2208
-1035
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+2208
-1035
lines changed
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
---
2+
subtitle: Environment Overrides
3+
redirect_from: /documentation/environmentoverrides/
4+
---
5+
# Environment Overrides
6+
7+
This concept page assumes you understand the following areas of Flyway:
8+
- [TOML Configuration File](<Configuration/TOML Configuration File>)
9+
- [Environments](Configuration/parameters/Environments)
10+
- [Flyway](Configuration/parameters/Flyway)
11+
12+
If you have not done so, please review these pages first.
13+
14+
## Why is this useful ?
15+
There are parameters that can be defined for all of Flyway however there are instances where you may want more fine-grained control to specify this for a specific [environment](Configuration/parameters/Environments).
16+
17+
For example, changing [`cleanDisabled`](<Configuration/parameters/flyway/clean disabled>) may be appropriate for your test environment but not for your production environment.
18+
19+
## How is this used ?
20+
Environments will support configuration overrides by adding a `flyway` table to your environment. For example:
21+
22+
```
23+
[flyway]
24+
environment = "test"
25+
locations = ["location1"]
26+
27+
[environments.test]
28+
url = "jdbc:\\..."
29+
30+
[environments.test.flyway]
31+
locations = ["location2","location3"]
32+
```
33+
34+
If the current environment has an override, its override will be used, in totality, over the root or default version.
35+
36+
To clarify, with a toml looking like the above example, Then locations will be `location1` unless using the `test` environment, in which case locations will be `location2` and `location3`.
37+
38+
# Configure via Command-line
39+
40+
The Environment Overrides feature can also be configured via the command-line. For example:
41+
42+
`-environments.test.flyway.locations=location4`
43+
44+
Note - this will take precedence over other configuration, resulting in the actual location being set to `location4`
45+
46+
This is due to the [CLI Configuration Order](<Configuration/CLI Configuration Order>)
47+
48+
# Environment Variable Support
49+
50+
Environment Overrides do not have dedicated environment variable support
51+
52+
## Exceptions
53+
54+
The following are not configurable via Environments:
55+
- [Environment](Configuration/parameters/Flyway/Environment)
56+
- [Check](Configuration/parameters/Flyway/Check)
57+
- [Cherry Pick](<Configuration/parameters/Flyway/Cherry Pick>)
58+
- [Dapr Secrets](<Configuration/parameters/Flyway/Dapr Secrets>)
59+
- [Dapr URL](<Configuration/parameters/Flyway/Dapr URL>)
60+
- [Email](Configuration/parameters/Flyway/Email)
61+
- [Token](Configuration/parameters/Flyway/Token)
62+
- [Google Cloud Secret Manager Project](<Configuration/parameters/Flyway/Google Cloud Secret Manager Project>)
63+
- [Google Cloud Secret Manager Secrets](<Configuration/parameters/Flyway/Google Cloud Secret Manager Secrets>)
64+
- [License Key](<Configuration/parameters/Flyway/License Key>)
65+
- [Oracle](Configuration/parameters/Flyway/Oracle)
66+
- [PostgreSQL](Configuration/parameters/Flyway/PostgreSQL)
67+
- [SQL Server](<Configuration/parameters/Flyway/SQL Server>)
68+
- [Undo SQL Migration Prefix](<Configuration/parameters/Flyway/Undo SQL Migration Prefix>)
69+
- [Vault Secrets](<Configuration/parameters/Flyway/Vault Secrets>)
70+
- [Vault Token](<Configuration/parameters/Flyway/Vault Token>)
71+
- [Vault URL](<Configuration/parameters/Flyway/Vault URL>)
72+
73+
Any Command-line only configuration parameters, including
74+
- [Working Directory](<Configuration/parameters/Flyway/Working Directory>)
75+
- [Config Files](<Configuration/parameters/Flyway/Config Files>)
76+
- [Config File Encoding](<Configuration/parameters/Flyway/Config File Encoding>)
77+
- [Output Type](Configuration/parameters/Flyway/OutputType)
78+
79+
## Note
80+
81+
Parameters that are already part of the [environment namespace](Configuration/parameters/Environments) cannot be overridden as they already exist exclusively in that environment (for example `url` or `schemas`).
82+

documentation/Flyway CLI and API/Configuration/Provisioners.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ Flyway comes with support for the following provisioners:
1010
- [Clean](Configuration/Provisioners/Clean Provisioner)
1111
- [Docker - Preview](Configuration/Provisioners/Docker Provisioner)
1212
- [Redgate Clone - Preview](Configuration/Provisioners/Redgate Clone Provisioner)
13+
- [Backup - Preview](Configuration/Provisioners/Backup Provisioner)
14+
- [Snapshot - Preview](Configuration/Provisioners/Snapshot Provisioner)
1315

1416
## Using Provisioners In TOML Configuration Files
1517
Provisioners are simply configured by setting the [provisioner](Configuration/Parameters/Environments/Provisioner) property on a configured environment
@@ -28,6 +30,28 @@ dataContainerLifetime = "1h"
2830
authenticationToken = "${localSecret.RedgateCloneToken}"
2931
```
3032

33+
## Specifying Provisioners on the command line
34+
35+
Provisioners can also be specified using command line arguments. Provisioner command line arguments have the form:
36+
37+
```bash
38+
-environments.<environment>.resolvers.<provisioner>.<property>=<value>
39+
```
40+
41+
For example, the toml configuration above can equivalently be specified as follows:
42+
43+
```bash
44+
./flyway info \
45+
-environment='development' \
46+
-environments.development.url='${clone.url}databaseName=my-database' \
47+
-environments.development.provisioner='clone' \
48+
-environments.development.resolvers.clone.url='https://clone.red-gate.com:1234/cloning-api' \
49+
-environments.development.resolvers.clone.dataImage='mssql-empty' \
50+
-environments.development.resolvers.clone.dataContainer='MyContainer' \
51+
-environments.development.resolvers.clone.dataContainerLifetime='1h' \
52+
-environments.development.resolvers.clone.authenticationToken='${localSecret.RedgateCloneToken}'
53+
```
54+
3155
## Provisioning
3256
Provisioning happens automatically before a connection to a database via any flyway verb.
3357
If the database already exists, then no provisioning is needed, though the technology used for provisioning may supply the JDBC URL needed to connect to the database.
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
subtitle: Backup Provisioner
3+
---
4+
# Backup Provisioner - Preview
5+
{% include enterprise.html %}
6+
7+
This [provisioner](Configuration/Provisioners) allows for the provisioning and re-provisioning of databases using a database backup file.
8+
9+
**Note: Currently only SQL Server `.bak` files are supported.**
10+
11+
Benefits of using the backup provisioner:
12+
* The database backup can contain static data and a `flyway_schema_history` table, allowing an environment to be provisioned with data to a desired version.
13+
* Restoring a database backup is not impacted by references to invalid objects. This makes the backup provisioner a good alternative to a baseline script.
14+
* Speeding up shadow provisioning - restoring a backup file that represents version 1000 is considerably quicker than running 1000 migrations scripts.
15+
16+
## Prerequisites
17+
* A database backup `.bak` file, which could be a backup of production database for example. This backup file needs to be in a location accessible to the database server that will be provisioned i.e. on the database server itself or on a network share.
18+
* The environment [URL](Configuration/Parameters/Environments/URL) must have the `databaseName` parameter set to the name of the database that the backup will be restored to.
19+
* The database `databaseName` must already exist on the database server that will be provisioned, but can be empty.
20+
21+
## To configure this provisioner:
22+
1. Set the value of the [provisioner parameter](Configuration/Parameters/Environments/Provisioner) to `backup`.
23+
2. Populate the following resolver properties in the TOML configuration on as command line arguments:
24+
- `backupFilePath` - (Required) The file path of the backup file. Note: this needs to be accessible/relative to the database server that is being provisioned.
25+
- `backupVersion` - (Optional) The migration version the backup file represents. This property is required when the backup file doesn't contain a `flyway_schema_history` table. In this scenario a `flyway_schema_history` table will be created once the backup has been restored and a baseline entry with version `backupVersion` will be inserted into the `flyway_schema_history` table. If the backup file does contain a `flyway_schema_history` table then this property is optional. If left unset then the `flyway_schema_history` table from the backup will be restored unaltered, otherwise the `flyway_schema_history` will be updated to baseline version `backupVersion`.
26+
27+
## Example
28+
The backup provisioner can be used in the TOML configuration as follows:
29+
```toml
30+
[environments.shadow]
31+
url = "jdbc:sqlserver://localhost:1433;databaseName=MyDatabase;trustServerCertificate=true"
32+
user = "MyUser"
33+
password = "${localSecret.MyPasswordKey}"
34+
provisioner = "backup"
35+
36+
[environments.shadow.resolvers.backup]
37+
backupFilePath = '\\DBOps1\Backups\backup.bak'
38+
backupVersion = "995"
39+
```
40+
41+
This example will restore the backup file located at `\\DBOps1\Backups\backup.bak` to the `MyDatabase` database in the shadow environment. The `MyDatabase` database will be at version 995. This example represents a common scenario where a user may wish to reset the shadow environment to the same state as production, so that new development migrations can then be applied to the shadow and verified.
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
subtitle: Snapshot Provisioner
3+
---
4+
# Snapshot Provisioner - Preview
5+
{% include enterprise.html %}
6+
7+
This [provisioner](Configuration/Provisioners) allows for the provisioning and re-provisioning of databases using a snapshot file.
8+
9+
A snapshot captures the schema of a database and can be generated by using the [snapshot](Commands/Snapshot) command. Note that a snapshot is schema only and doesn't contain any static data.
10+
The snapshot provisioner can be used to speed up provisioning a shadow environment, as applying a snapshot that represents version 1000 is considerably quicker than running 1000 migrations scripts.
11+
12+
## Prerequisites
13+
* A snapshot file generated using the [snapshot](Commands/Snapshot) command.
14+
* Set the environment variable `REDGATE_FLYWAY_DIFF_VERB=true`.
15+
16+
## To configure this provisioner
17+
1. Set the value of the [provisioner parameter](Configuration/Parameters/Environments/Provisioner) to `snapshot`.
18+
2. Populate the following resolver properties:
19+
- `filename ` - (Required) The file path of the snapshot file.
20+
- `snapshotVersion` - (Required) The migration version the snapshot represents. This version will be inserted as the baseline version into the `flyway_schema_history` table of the provisioned database.
21+
- `cleanOnReprovision` - (Optional) When set to true this option forces a clean of the provisioned database before the snapshot is applied. This option may be required when it's not possible to apply the snapshot to the database. For example, if applying the snapshot needs to re-add a non-null column to a table that has data in it.
22+
23+
## Example
24+
The snapshot provisioner can be used in the TOML configuration as follows:
25+
```toml
26+
[environments.development]
27+
url = "jdbc:sqlserver://localhost:1433;databaseName=MyDatabase;trustServerCertificate=true"
28+
user = "MyUser"
29+
password = "${localSecret.MyPasswordKey}"
30+
provisioner = "snapshot"
31+
32+
[environments.development.resolvers.snapshot]
33+
filename = 'C:\Project\snapshot.snp'
34+
snapshotVersion = "150"
35+
```
36+
37+
This example will restore the snapshot file located at `C:\Project\snapshot.snp` to the development environment. The development environment will be at version 150.

documentation/Flyway CLI and API/Supported Databases/Cassandra Database.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
---
22
subtitle: Cassandra
33
---
4-
# Cassandra Database - Preview
5-
{% include redgate.html %}
4+
# Cassandra Database
65

76
- **Verified Versions:** N/A
87
- **Maintainer:** Redgate

documentation/Flyway CLI and API/Supported Databases/SQL Server Database.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,11 +163,12 @@ Example:<br/> `jdbc:sqlserver://server01:1234;databaseName=AdventureWorks;integr
163163

164164
### Azure Active Directory
165165

166-
#### Installing MSAL4J
166+
#### Installing Dependencies
167167

168168
You must add Microsoft's [MSAL4J library](https://mvnrepository.com/artifact/com.microsoft.azure/msal4j) to your classpath. For instance, as a Maven or Gradle dependency.
169+
For Azure Active Directory MSI, Azure Identity is also required to be added to your classpath.
169170

170-
For command-line users, MSAL4J is already included, so no extra installation is required.
171+
For command-line users, MSAL4J and Azure Identity are already included, so no extra installation is required.
171172

172173
#### Connecting
173174

documentation/Flyway CLI and API/Supported Databases/YugabyteDB.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,27 @@
22
subtitle: YugabyteDB
33
---
44
# YugabyteDB
5-
- **Verified Versions:** 2.4, 2.7
5+
- **Verified Versions:** 2.20, 2024.1, 2.21
66
- **Maintainer:** Community
77

88
## Supported Versions and Support Levels
99

1010
{% include database-boilerplate.html %}
1111

1212
## Driver
13+
The preferred driver for this plugin is [YugabyteDB JDBC driver](https://github.com/yugabyte/pgjdbc).
14+
15+
| Item | Details |
16+
|------------------------------------|------------------------------------------------------------------------|
17+
| **URL format** | <code>jdbc:yugabytedb://<i>host</i>:<i>port</i>/<i>database</i></code> |
18+
| **SSL support** | Yes - add `?ssl=true` |
19+
| **Ships with Flyway Command-line** | No |
20+
| **Maven Central coordinates** | `com.yugabyte:jdbc-yugabytedb` |
21+
| **Supported versions** | `42.3.5-yb-1` and later |
22+
| **Default Java class** | `com.yugabyte.Driver` |
23+
24+
### PostgreSQL Driver
25+
Alternatively, one can also use the [PostgreSQL](Supported Databases/PostgreSQL Database) JDBC Driver with this plugin.
1326

1427
| Item | Details |
1528
|------------------------------------|------------------------------------------------------------------------|

documentation/Flyway CLI and API/Usage/Adding to the classpath.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ How you add to the classpath depends on how you are invoking Flyway.
1313

1414
### Command Line
1515

16-
When using the CLI, you can add to the classpath by dropping the `.jar` files for the libraries or drivers you want to include into a seperate directory and then including it via the [`jarDirs`](</Configuration/Parameters/Flyway/Jar Dirs>) configuration parameter.
16+
When using the CLI, you can add to the classpath by dropping the `.jar` files for the libraries or drivers you want to include into a separate directory and then including it via the [`jarDirs`](</Configuration/Parameters/Flyway/Jar Dirs>) configuration parameter.
1717

1818
<pre class="filetree"><i class="fa fa-folder-open"></i> flyway
1919
<i class="fa fa-folder-open"></i> conf

documentation/Release notes and older versions/Release Notes for Flyway Engine.html

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,28 @@
88
</div>
99
<div class="col-md-9">
1010

11+
<div class="release">
12+
<h2 id="10.17.0">Flyway 10.17.0 (2024-07-29)</h2>
13+
14+
<h3>Bug fixes</h3>
15+
<ul>
16+
<li>Fixed the bug that prevented powershell scripts from running when located in a folder with spaces in the folder name.</li>
17+
<li>Fixed the issue where schemas might get inadvertently cleaned when running check in MySQL</li>
18+
</ul>
19+
20+
<h3>Database compatibility</h3>
21+
<ul>
22+
<li>Cassandra taken out of preview and added to OSS edition</li>
23+
</ul>
24+
25+
<h3>New features</h3>
26+
<ul>
27+
<li>Azure Identity is now a dependency of Flyway for SQL Server Active Directory MSI authentication</li>
28+
<li>Flyway now supports Environment Overrides for parameters configuration</li>
29+
</ul>
30+
31+
</div>
32+
1133
<div class="release">
1234
<h2 id="10.16.0">Flyway 10.16.0 (2024-07-18)</h2>
1335

@@ -263,6 +285,7 @@ <h3>Changes</h3>
263285
<h3>Database compatibility</h3>
264286
<ul>
265287
<li>Reintroduce OceanBase</li>
288+
<li>Cassandra support added as a preview feature in Redgate edition.</li>
266289
</ul>
267290

268291
<h3>Java compatibility</h3>

documentation/_config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
flywayVersion: 10.16.0
1+
flywayVersion: 10.17.0
22
enterpriseUrl: https://download.red-gate.com/maven/release/com/redgate/flyway
33
kramdown:
44
smart_quotes: ["apos", "apos", "quot", "quot"]

0 commit comments

Comments
 (0)