This repository was archived by the owner on Nov 24, 2025. It is now read-only.
Skip check for the past dbversion's migration existing if it is squashed#6128
Merged
rawlinp merged 6 commits intoapache:masterfrom Aug 23, 2021
Merged
Skip check for the past dbversion's migration existing if it is squashed#6128rawlinp merged 6 commits intoapache:masterfrom
rawlinp merged 6 commits intoapache:masterfrom
Conversation
cb5e99a to
d0e91a4
Compare
Member
Author
|
Rebased to get the fix for #6127. Removing the |
rawlinp
reviewed
Aug 23, 2021
Contributor
|
Uh oh, looks like the DB tests will fail perpetually until they're fixed to ignore the migration that was edited. |
…ation was changed in the PR or commit the TO DB tests GHA is running on
Member
Author
cf59b77: No longer failing if that migration is not changed in the PR |
rawlinp
approved these changes
Aug 23, 2021
zrhoffman
added a commit
that referenced
this pull request
Aug 30, 2021
…hed (#6128) * Make ConnectionString a global * Get the migration version after migrating from Goose * Skip check for the past dbversion's migration existing if it is squashed * Install TO dependencies before installing TO in db-admin dockerfile * TO DB tests bugfix: Specify the database name with `dropdb` * Only fail on a non-latest migration being modified/added if that migration was changed in the PR or commit the TO DB tests GHA is running on (cherry picked from commit 9fa6c29)
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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This PR
db/admin migrate: Migrate first migration explicitly if DB version's migration is squashed #6096 where, where when migrating from Goose,db/admin dbversionwould return0instead of Goose migration version (e080781)db/admin migrate: Migrate first migration explicitly if DB version's migration is squashed #6096 was supposed to fix: Running the first unsquashed migration without checking whether the past migration exists if migrating from the last squashed migration (f102c65).dropdbdid not specify the database to dropWhich Traffic Control components are affected by this PR?
What is the best way to verify this PR?
2021080408053529_fix_indicesmigrations (unnecessary once Rolling back2021080408053529_fix_indicesin TO DB tests:pys_location_last_updated_idx" already exists#6127 is fixed)traffic_ops_db/test/docker/initdb.d, and rebuild thedbservicetraffic_ops_db/test/docker/traffic_ops.rpmand rebuild thetrafficops-db-adminserviceIf this is a bugfix, which Traffic Control versions contained the bug?
PR submission checklist