Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgrade flyway v9.17.0 #5436

Merged
merged 1 commit into from
May 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ jobs:
command: |
sudo apt-get --allow-releaseinfo-change-suite update && sudo apt-get install -y default-jdk
mkdir flyway
curl -s https://repo.maven.apache.org/maven2/org/flywaydb/flyway-commandline/9.16.3/flyway-commandline-9.16.3-linux-x64.tar.gz | tar zxv -C flyway
echo 'export PATH=./flyway/flyway-9.16.3:$PATH' >> $BASH_ENV
curl -s https://repo.maven.apache.org/maven2/org/flywaydb/flyway-commandline/9.17.0/flyway-commandline-9.17.0-linux-x64.tar.gz | tar zxv -C flyway
echo 'export PATH=./flyway/flyway-9.17.0:$PATH' >> $BASH_ENV

- restore_cache:
keys:
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ We are always trying to improve our documentation. If you have suggestions or ru
* Read a [Windows tutorial](https://www.postgresqltutorial.com/install-postgresql/)
* Read a [Linux tutorial](https://www.postgresql.org/docs/13/installation.html) (or follow your OS package manager)
* Elastic Search 7.x (instructions [here](https://www.elastic.co/guide/en/elasticsearch/reference/7.x/_installation.html))
* Flyway 9.16.3 ([download](https://documentation.red-gate.com/fd/command-line-184127404.html?_ga=2.234928961.193109968.1681304355-253257385.1681304355))
* After downloading, open `flyway-9.16.3/conf/flyway.conf` and set
* Flyway 9.17.0 ([download](https://documentation.red-gate.com/fd/command-line-184127404.html?_ga=2.234928961.193109968.1681304355-253257385.1681304355))
* After downloading, open `flyway-9.17.0/conf/flyway.conf` and set
the flyway environment variables `flyway.url` and
`flyway.locations` as

Expand Down Expand Up @@ -708,9 +708,9 @@ You can optionally choose to restrict traffic that goes to the mirrors/replicas
#### Installing `flyway`
`flyway` is a Java application and requires a Java runtime environment (JRE) for execution.

It is recommended that you install the JRE separately using your package manager of choice, e.g., `Homebrew`, `apt`, etc, and download the version without the JRE e.g. `flyway-commandline-9.16.3.tar.gz` from [Flyway downloads](https://documentation.red-gate.com/fd/command-line-184127404.html?_ga=2.234928961.193109968.1681304355-253257385.1681304355). This way, you have complete control over your Java version and can use the JRE for other applications like `Elasticsearch`. If you have trouble with a separate JRE or if not comfortable with managing a separate JRE, you can download the `flyway` archive that bundles the JRE based on the platform, e.g., `flyway-commandline-9.16.3-macosx-x64.tar.gz`, `flyway-commandline-9.16.3-linux-x64.tar.gz`, etc.
It is recommended that you install the JRE separately using your package manager of choice, e.g., `Homebrew`, `apt`, etc, and download the version without the JRE e.g. `flyway-commandline-9.17.0.tar.gz` from [Flyway downloads](https://documentation.red-gate.com/fd/command-line-184127404.html?_ga=2.234928961.193109968.1681304355-253257385.1681304355). This way, you have complete control over your Java version and can use the JRE for other applications like `Elasticsearch`. If you have trouble with a separate JRE or if not comfortable with managing a separate JRE, you can download the `flyway` archive that bundles the JRE based on the platform, e.g., `flyway-commandline-9.17.0-macosx-x64.tar.gz`, `flyway-commandline-9.17.0-linux-x64.tar.gz`, etc.

Expand the downloaded archive. Add `<target_directory>/flyway/flyway-9.16.3` to your `PATH` where `target_directory` is the directory in which the archive has been expanded.
Expand the downloaded archive. Add `<target_directory>/flyway/flyway-9.17.0` to your `PATH` where `target_directory` is the directory in which the archive has been expanded.

#### How `flyway` works
All database schema modification code is checked into version control in the directory `data/migrations` in the form of SQL files that follow a strict naming convention - `V<version_number>__<descriptive_name>.sql`. `flyway` also maintains a table in the target database called `flyway_schema_history` which tracks the migration versions that have already been applied.
Expand Down
6 changes: 3 additions & 3 deletions data/flyway/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ repositories {
}

dependencies {
implementation group: "org.flywaydb", name: "flyway-gradle-plugin", version: "9.16.3"
implementation(group: "org.flywaydb", name: "flyway-commandline", version: "9.16.3") {
implementation group: "org.flywaydb", name: "flyway-gradle-plugin", version: "9.17.0"
implementation(group: "org.flywaydb", name: "flyway-commandline", version: "9.17.0") {
exclude group: "com.microsoft.sqlserver", module: "msql-jdbc"
exclude group: "com.h2database", module: "h2"
exclude group: "com.pivotal.jdbc", module: "greenplumdriver"
Expand All @@ -21,7 +21,7 @@ dependencies {
exclude group: "com.google.protobuf", module: "protobuf-java"
exclude group: "com.google.guava", module: "guava"
constraints {
implementation("org.postgresql:postgresql:42.4.3.jar")
implementation("org.postgresql:postgresql:42.6.0.jar")
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion data/flyway/manifest_headless_flyway.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ applications:
command: /home/vcap/app/flyway/bin/run.sh && echo SUCCESS && sleep infinity
path: build/distributions/flyway.zip
env:
CLASSPATH: app/gradle/lib/flyway-commandline-9.16.3.jar:app/gradle/lib/flyway-core-9.16.3.jar
CLASSPATH: app/gradle/lib/flyway-commandline-9.17.0.jar:app/gradle/lib/flyway-core-9.17.0.jar
JAVA_HOME: /home/vcap/app/.java-buildpack/open_jdk_jre
services:
- fec-flyway-creds