Skip to content

Commit 132ceec

Browse files
clean up logging
1 parent b589db0 commit 132ceec

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

Generic-POC-Flyway-Commands/fullFlywayPOCSetupAndRun.ps1

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -155,17 +155,17 @@ Read-Host "Press Enter when ready to capture your changes in the schema model an
155155
$scriptName = "Jira123_YourDescription"
156156

157157
#Syncs the Schema Model folder with the provided Source URL
158-
flyway diff model "-workingDirectory=$workingDir" "-diff.source=dev" "-diff.target=schemaModel" "-environments.dev.url=$devDBConnectionString" 2>&1 | Where-Object { $_ -notmatch 'Database: jdbc:' -and $_ -notmatch 'ERROR: Skipping filesystem location:' }
158+
flyway diff model "-diff.source=dev" "-diff.target=schemaModel" "-environments.dev.url=$devDBConnectionString" 2>&1 | Where-Object { $_ -notmatch 'Database: jdbc:' -and $_ -notmatch 'ERROR: Skipping filesystem location:' }
159159
#Generated a new migration script by comparing the Schema Model folder to Build Url after it's been brought to current version.
160-
flyway diff generate "-workingDirectory=$workingDir" "-diff.source=schemaModel" "-diff.target=migrations" "-generate.types=versioned,undo" "-generate.description=$scriptName" "-diff.buildEnvironment=shadow" "-environments.shadow.url=$shadowUrl" 2>&1 | Where-Object { $_ -notmatch 'Database: jdbc:' -and $_ -notmatch 'ERROR: Skipping filesystem location:' }
160+
flyway diff generate "-diff.source=schemaModel" "-diff.target=migrations" "-generate.types=versioned,undo" "-generate.description=$scriptName" "-diff.buildEnvironment=shadow" "-environments.shadow.url=$shadowUrl" 2>&1 | Where-Object { $_ -notmatch 'Database: jdbc:' -and $_ -notmatch 'ERROR: Skipping filesystem location:' }
161161

162162
Write-Host "`n========================================" -ForegroundColor Cyan
163163
Write-Host "DEPLOYMENT: Deploy to Test Database ($testUrl)" -ForegroundColor Yellow -BackgroundColor DarkBlue
164164
Write-Host "========================================" -ForegroundColor Cyan
165165
Write-Host "You are about to deploy changes to the test DB." -ForegroundColor White
166-
Read-Host "Press Enter to run flyway migrate -workingDirectory=$workingDir -environment=test -saveSnapshot=true"
166+
Read-Host "Press Enter to run flyway migrate -environment=test -saveSnapshot=true"
167167

168-
flyway migrate -workingDirectory="$workingDir" -environment=test -saveSnapshot=true 2>&1 | Where-Object { $_ -notmatch 'Database: jdbc:' -and $_ -notmatch 'ERROR: Skipping filesystem location:' }
168+
flyway migrate -environment=test -saveSnapshot=true 2>&1 | Where-Object { $_ -notmatch 'Database: jdbc:' -and $_ -notmatch 'ERROR: Skipping filesystem location:' }
169169

170170
Write-Host "`n========================================" -ForegroundColor Cyan
171171
Write-Host "REVIEW: Check Deployment Results" -ForegroundColor Yellow -BackgroundColor DarkBlue
@@ -180,9 +180,9 @@ Write-Host "`n========================================" -ForegroundColor Cyan
180180
Write-Host "INFO: View Deployment History" -ForegroundColor Yellow -BackgroundColor DarkBlue
181181
Write-Host "========================================" -ForegroundColor Cyan
182182
Write-Host "You can run 'flyway info' from the command line to see the deployment history." -ForegroundColor White
183-
Read-Host "Press Enter to run flyway info -workingDirectory=$workingDir -environment=test"
183+
Read-Host "Press Enter to run flyway info -environment=test"
184184

185-
flyway info -workingDirectory="$workingDir" -environment=test 2>&1 | Where-Object { $_ -notmatch 'Database: jdbc:' -and $_ -notmatch 'ERROR: Skipping filesystem location:' }
185+
flyway info -environment=test 2>&1 | Where-Object { $_ -notmatch 'Database: jdbc:' -and $_ -notmatch 'ERROR: Skipping filesystem location:' }
186186

187187
Write-Host "`n========================================" -ForegroundColor Cyan
188188
Write-Host "DRIFT DETECTION: Learn More" -ForegroundColor Yellow -BackgroundColor DarkBlue
@@ -192,10 +192,10 @@ Write-Host "Learn more at: " -ForegroundColor White -NoNewline
192192
Write-Host "Drift Detection Tutorial" -ForegroundColor Cyan
193193
Write-Host "https://documentation.red-gate.com/fd/tutorial-drift-report-for-deployments-using-embedded-snapshot-317493682.html" -ForegroundColor Blue
194194
Read-Host "For drift to show up, you need to manually make a change to a target database outside of using Flyway. Make a schema change manually to $testUrl."
195-
Read-Host "Press Enter to execute flyway check -drift -code -dryrun -environment=$test -check.code.failOnError=false -check.failOnDrift=false -check.deployedSnapshot=snapshothistory:current -workingDirectory=$workingDir"
195+
Read-Host "Press Enter to execute flyway check -drift -code -dryrun -environment=$test -check.code.failOnError=false -check.failOnDrift=false -check.deployedSnapshot=snapshothistory:current"
196196

197197

198-
flyway check -drift -code -dryrun -environment=$test -check.code.failOnError=false -check.failOnDrift=false -check.deployedSnapshot=snapshothistory:current -workingDirectory="$workingDir"
198+
flyway check -drift -code -dryrun -environment=$test "-check.code.failOnError=false" "-check.failOnDrift=false" "-check.deployedSnapshot=snapshothistory:current"
199199

200200

201201
# # Variables to be changed by user

0 commit comments

Comments
 (0)