|
4 | 4 | # Each command below can be copied and pasted independently |
5 | 5 | # Update the inline values as needed for your environment |
6 | 6 |
|
7 | | -# generic deployment |
8 | | -flyway migrate -configFiles="C:\WorkingFolders\FWD\NewWorldDB\flyway.toml,C:\WorkingFolders\FWD\NewWorldDB\flyway.user.toml" -workingDirectory="C:\WorkingFolders\FWD\NewWorldDB" -schemaModelLocation="./schema-model" -schemaModelSchemas= -environment=test |
| 7 | +# ================================================================================ |
| 8 | + |
| 9 | +# run code analysis only |
| 10 | +flyway check -code -environment=test -check.code.failOnError=false |
9 | 11 |
|
10 | 12 | # ================================================================================ |
11 | 13 |
|
| 14 | +# generic deployment |
| 15 | +flyway migrate -environment=test |
| 16 | + |
| 17 | + |
12 | 18 | # create snapshot after changes |
13 | | -flyway snapshot -environment=test -filename=snapshothistory:current -configFiles="C:\WorkingFolders\FWD\NewWorldDB\flyway.toml,C:\WorkingFolders\FWD\NewWorldDB\flyway.user.toml" -workingDirectory="C:\WorkingFolders\FWD\NewWorldDB" -schemaModelLocation="./schema-model" |
| 19 | +flyway snapshot -environment=test -filename=snapshothistory:current |
14 | 20 |
|
15 | 21 | # ================================================================================ |
16 | 22 |
|
17 | 23 | # undo back to a specific target number |
18 | | -flyway undo -configFiles="C:\WorkingFolders\FWD\NewWorldDB\flyway.toml,C:\WorkingFolders\FWD\NewWorldDB\flyway.user.toml" -workingDirectory="C:\WorkingFolders\FWD\NewWorldDB" -schemaModelLocation="./schema-model" -schemaModelSchemas= -environment=test -target=043.20250716213211 |
| 24 | +flyway undo -schemaModelSchemas= -environment=test -target=043.20250716213211 |
19 | 25 |
|
20 | 26 | # ================================================================================ |
21 | 27 |
|
22 | 28 | # cherryPick forward |
23 | | -flyway migrate -configFiles="C:\WorkingFolders\FWD\NewWorldDB\flyway.toml,C:\WorkingFolders\FWD\NewWorldDB\flyway.user.toml" -workingDirectory="C:\WorkingFolders\FWD\NewWorldDB" -schemaModelLocation="./schema-model" -schemaModelSchemas= -environment=test -cherryPick=045.20251106201536 |
| 29 | +flyway migrate -schemaModelSchemas= -environment=test -cherryPick=045.20251106201536 |
24 | 30 |
|
25 | 31 | # ================================================================================ |
26 | 32 |
|
27 | 33 | # drift and code analysis report with snapshots |
28 | 34 |
|
29 | 35 | # run drift and code analysis (TO SEE DRIFT ALTER TARGET DB OUTSIDE OF FLYWAY) |
30 | 36 | # check can be configured to fail on drift or code analysis triggering |
31 | | -# it's possible to capture changes as well, but it is a duplication of what's stored in schema model and requires an extra database to deploy to in a CI fashion |
32 | | -flyway check -drift -code -dryrun -environment=test -check.code.failOnError=false -check.failOnDrift=false -check.deployedSnapshot=snapshothistory:current -configFiles="C:\WorkingFolders\FWD\NewWorldDB\flyway.toml,C:\WorkingFolders\FWD\NewWorldDB\flyway.user.toml" -workingDirectory="C:\WorkingFolders\FWD\NewWorldDB" -schemaModelLocation="./schema-model" |
| 37 | +flyway check -drift -code -dryrun -environment=test -check.code.failOnError=false -check.failOnDrift=false -check.deployedSnapshot=snapshothistory:current |
33 | 38 |
|
34 | 39 | # ================================================================================ |
35 | 40 |
|
36 | 41 | # generic deployment |
37 | | -flyway migrate -configFiles="C:\WorkingFolders\FWD\NewWorldDB\flyway.toml,C:\WorkingFolders\FWD\NewWorldDB\flyway.user.toml" -workingDirectory="C:\WorkingFolders\FWD\NewWorldDB" -schemaModelLocation="./schema-model" -schemaModelSchemas= -environment=test |
| 42 | +flyway migrate -schemaModelSchemas= -environment=test |
38 | 43 |
|
39 | 44 | # ================================================================================ |
40 | 45 |
|
41 | 46 | # create snapshot after changes |
42 | | -flyway snapshot -environment=test -filename=snapshothistory:current -configFiles="C:\WorkingFolders\FWD\NewWorldDB\flyway.toml,C:\WorkingFolders\FWD\NewWorldDB\flyway.user.toml" -workingDirectory="C:\WorkingFolders\FWD\NewWorldDB" -schemaModelLocation="./schema-model" |
| 47 | +flyway snapshot -environment=test -filename=snapshothistory:current |
0 commit comments