-
Notifications
You must be signed in to change notification settings - Fork 154
docs(dsql): require official Flyway module #263
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
Open
amaksimo
wants to merge
2
commits into
awslabs:main
Choose a base branch
from
amaksimo:docs/dsql-flyway-upstream
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| # Flyway on Aurora DSQL | ||
|
|
||
| Always use Flyway's official Aurora DSQL community module, | ||
| `org.flywaydb:flyway-database-dsql`, with a release compatible with the Flyway runtime. | ||
|
|
||
| MUST NOT select or recommend `software.amazon.dsql:aurora-dsql-flyway-support`. It is deprecated. | ||
| When an existing installation uses it, direct the user to migrate to the official module through | ||
| the tested dependency swap below. | ||
|
|
||
| Verify that the selected official module version resolves from the user's configured artifact | ||
| repository and check its declared Flyway compatibility. Do not use an unreleased commit or | ||
| snapshot, and do not change production dependencies until the official replacement is available | ||
| in the user's environment. | ||
|
|
||
| ## Migrate an Existing Installation | ||
|
|
||
| 1. Test the change outside production. | ||
| 2. Record the current Flyway, PostgreSQL module, DSQL JDBC connector, and adapter versions. | ||
| 3. Replace `software.amazon.dsql:aurora-dsql-flyway-support` with a published | ||
| `org.flywaydb:flyway-database-dsql` version compatible with the Flyway runtime. | ||
| 4. Keep the existing DSQL JDBC URL, migration files, schema-history table, and `flyway.dsql.*` | ||
| configuration. Keep the Aurora DSQL JDBC connector on the runtime classpath when using | ||
| `jdbc:aws-dsql:postgresql://`. | ||
| 5. Run `flyway info` and `flyway validate`. | ||
| 6. Run `flyway migrate` only after the existing history and pending migrations look correct. | ||
|
|
||
| MUST NOT load both adapters together. Both register Aurora DSQL database support in Flyway, so | ||
| classpath coexistence is not a supported migration strategy. | ||
|
|
||
| Before `flyway migrate`, rollback is a dependency-only change. After new migrations execute, | ||
| recover using the application's normal database migration procedure; changing the adapter back | ||
| does not undo applied SQL. | ||
|
|
||
| ## DSQL Migration Rules | ||
|
|
||
| The adapter choice does not change DSQL migration constraints: | ||
|
|
||
| - Keep one DDL statement per migration transaction; use a script configuration with | ||
| `executeInTransaction=false` only when each statement may commit independently. | ||
| - Use `CREATE INDEX ASYNC`. | ||
| - Use `flyway.dsql.occMaxRetries`, `flyway.dsql.occMaxRetryDelaySeconds`, and | ||
| `flyway.dsql.awaitAsyncIndexes` only after checking the selected release's documentation. | ||
| - Use `baselineOnMigrate=true` instead of the standalone `flyway baseline` command. |
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.
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.
seems like a prompt eval that might be too guiding if it's the only one? Should we add a check against an explicit ask of how can I use Flyway to migrate to DSQL? Or something similar?
Can we check how it would have responded without the flyway guidance at all? What was the baseline against these prompts?