-
Notifications
You must be signed in to change notification settings - Fork 841
Flyway upgrade #3698
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
Merged
Merged
Flyway upgrade #3698
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
606e270
Upgrade Flyway from 7.15.0 to 11.7.2 and MariaDB drivers from 2.7.12 …
duanemay c5bfea2
Add permitMysqlScheme to JDBC URL for mariadb driver
duanemay 88ffc77
Enable Flyway `cleanDisabled` configuration during tests
duanemay 6b3c8f0
Handle Flyway change in transaction use
duanemay 146e7a8
Handle exception for mariadb
duanemay 21a50cc
Add diagnostics for lowercase database tests
duanemay e9b25b7
Use the lower_case_table_names flag on MySQL
duanemay cafd7f0
Ignore columnNamesAreLowercase on MySQL
duanemay 19eb378
Update server/src/test/java/org/cloudfoundry/identity/uaa/db/TableAnd…
strehle a8027a5
Extract connectorCharacter to method
duanemay File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 4 additions & 1 deletion
5
...rg/cloudfoundry/identity/uaa/db/postgresql/V4_101_1631562784__Add_LowerIndex_To_Users.sql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,4 @@ | ||
| CREATE UNIQUE INDEX concurrently IF NOT EXISTS users_unique_key_lower ON users (LOWER(origin),LOWER(username),LOWER(identity_zone_id)); | ||
| -- Create index without CONCURRENTLY to allow execution within a transaction | ||
strehle marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| -- CONCURRENTLY cannot be used inside a transaction, which causes hangs with newer Flyway versions | ||
| -- The IF NOT EXISTS clause prevents errors if the index already exists | ||
| CREATE UNIQUE INDEX IF NOT EXISTS users_unique_key_lower ON users (LOWER(origin),LOWER(username),LOWER(identity_zone_id)); | ||
5 changes: 4 additions & 1 deletion
5
...undry/identity/uaa/db/postgresql/V4_101_1639764160__Add_LowerIndex_To_Users_Wo_Origin.sql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,4 @@ | ||
| CREATE INDEX CONCURRENTLY IF NOT EXISTS users_key_lower_wo_origin ON users (LOWER(username),LOWER(identity_zone_id)); | ||
| -- Create index without CONCURRENTLY to allow execution within a transaction | ||
| -- CONCURRENTLY cannot be used inside a transaction, which causes hangs with newer Flyway versions | ||
| -- The IF NOT EXISTS clause prevents errors if the index already exists | ||
| CREATE INDEX IF NOT EXISTS users_key_lower_wo_origin ON users (LOWER(username),LOWER(identity_zone_id)); |
5 changes: 4 additions & 1 deletion
5
...esources/org/cloudfoundry/identity/uaa/db/postgresql/V4_109__IdP_AliasZid_IdzId_Index.sql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,4 @@ | ||
| CREATE INDEX CONCURRENTLY IF NOT EXISTS alias_in_zone on identity_provider (identity_zone_id, alias_zid) WHERE alias_zid IS NOT NULL; | ||
| -- Create index without CONCURRENTLY to allow execution within a transaction | ||
| -- CONCURRENTLY cannot be used inside a transaction, which causes hangs with newer Flyway versions | ||
| -- The IF NOT EXISTS clause prevents errors if the index already exists | ||
| CREATE INDEX IF NOT EXISTS alias_in_zone on identity_provider (identity_zone_id, alias_zid) WHERE alias_zid IS NOT NULL; |
5 changes: 4 additions & 1 deletion
5
...org/cloudfoundry/identity/uaa/db/postgresql/V4_111__IdP_active_and_type_in_zone_Index.sql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,4 @@ | ||
| CREATE INDEX CONCURRENTLY IF NOT EXISTS active_and_type_in_zone on identity_provider (identity_zone_id, active, type); | ||
| -- Create index without CONCURRENTLY to allow execution within a transaction | ||
| -- CONCURRENTLY cannot be used inside a transaction, which causes hangs with newer Flyway versions | ||
| -- The IF NOT EXISTS clause prevents errors if the index already exists | ||
| CREATE INDEX IF NOT EXISTS active_and_type_in_zone on identity_provider (identity_zone_id, active, type); |
5 changes: 4 additions & 1 deletion
5
...g/cloudfoundry/identity/uaa/db/postgresql/V4_113__Add_group_membership_idz_origin_idx.sql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,4 @@ | ||
| CREATE INDEX CONCURRENTLY IF NOT EXISTS group_membership_idz_origin_idx ON group_membership(identity_zone_id, origin); | ||
| -- Create index without CONCURRENTLY to allow execution within a transaction | ||
| -- CONCURRENTLY cannot be used inside a transaction, which causes hangs with newer Flyway versions | ||
| -- The IF NOT EXISTS clause prevents errors if the index already exists | ||
| CREATE INDEX IF NOT EXISTS group_membership_idz_origin_idx ON group_membership(identity_zone_id, origin); |
6 changes: 5 additions & 1 deletion
6
...s/org/cloudfoundry/identity/uaa/db/postgresql/V4_99_1575367461__revocable_token_index.sql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,5 @@ | ||
| CREATE INDEX CONCURRENTLY IF NOT EXISTS revocable_tokens_user_id_client_id_response_type_identity__idx on revocable_tokens(user_id, client_id, response_type, identity_zone_id); | ||
| -- Create index without CONCURRENTLY to allow execution within a transaction | ||
| -- CONCURRENTLY cannot be used inside a transaction, which causes hangs with newer Flyway versions | ||
| -- The IF NOT EXISTS clause prevents errors if the index already exists | ||
| CREATE INDEX IF NOT EXISTS revocable_tokens_user_id_client_id_response_type_identity__idx | ||
| ON revocable_tokens(user_id, client_id, response_type, identity_zone_id); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The string-based checks for URL parameters using
url.contains()could produce false positives. For example, if a parameter value contains the substring "permitMysqlScheme=" or "lower_case_table_names", the check would incorrectly identify it as already present. Consider using a more robust parameter parsing approach or checking for the parameter name followed by an equals sign at a parameter boundary (after '?' or '&').