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

Add check to make sure DB Schema migrations have completed #2977

Merged
merged 4 commits into from
Sep 12, 2018

Conversation

nwmac
Copy link
Contributor

@nwmac nwmac commented Sep 12, 2018

Fixes #2965

@cfdreddbot
Copy link

Hey nwmac!

Thanks for submitting this pull request! I'm here to inform the recipients of the pull request that you and the commit authors have already signed the CLA.

@nwmac nwmac self-assigned this Sep 12, 2018
@codecov
Copy link

codecov bot commented Sep 12, 2018

Codecov Report

Merging #2977 into v2-master will decrease coverage by 0.04%.
The diff coverage is 66.66%.

@@              Coverage Diff              @@
##           v2-master    #2977      +/-   ##
=============================================
- Coverage      71.08%   71.03%   -0.05%     
=============================================
  Files            607      607              
  Lines          26197    26243      +46     
  Branches        5931     5935       +4     
=============================================
+ Hits           18621    18641      +20     
- Misses          7576     7602      +26

for {
dbVersionRepo, _ := goosedbversion.NewPostgresGooseDBVersionRepository(db)
databaseVersionRec, err := dbVersionRepo.GetCurrentVersion()
if err == nil && databaseVersionRec.VersionID == targetVersion.Version {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If there is an err we'll get stuck in a never ending loop, which given the function isn't so bad... but we should log the err to help debugging.

@richard-cox richard-cox merged commit db7469e into v2-master Sep 12, 2018
@richard-cox richard-cox deleted the wait-for-schema branch September 12, 2018 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants