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

[Enhancement] Migration.Version.status column #374

Open
tkburbidge opened this issue Mar 12, 2019 · 1 comment
Open

[Enhancement] Migration.Version.status column #374

tkburbidge opened this issue Mar 12, 2019 · 1 comment

Comments

@tkburbidge
Copy link

I'm using RoundhousE to update 90+ databases. I've written a powershell script that kicks off a RoundhousE process for each database, consumes the RoundhousE output, and returns success or failure for each database. I've also written a powershell script to run a query against the Migration.Version table of each database to make sure the expected version exists. This script runs after the first script to just double check that nothing went wrong and that all databases are indeed up to date. I realize that RoundhousE provides the -isuptodate flag, but I wanted a very quick way to verify that RoundhousE succeeded rather than running RoundhousE again, since each RoundhousE run (including -isuptodate runs) takes about 2 minutes for this project.
I initially thought that the existence of a Version record meant that the database was fully migrated to that version, but quickly realized that the version record was added at the beginning of a run in order to tie all the ScriptsRun and ScriptsRunErrors to that version.
If the Version table included a status column with values such as 'Not Started', 'Running', 'Errors', and 'Complete' then I could solve my problem by checking that status.
I don't feel comfortable checking for no errors in the ScriptsRunErrors table as a way to validate a successful run of RoundhousE because sometimes network problems occur which cause RoundhousE to not be able to finish migrating the database, with no real evidence in the database that the migration was incomplete.

@erikbra
Copy link
Member

erikbra commented Apr 15, 2019

This is a good idea, in my opinion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants