Skip to content
This repository was archived by the owner on Nov 24, 2025. It is now read-only.

Run goose~schema_migrations trigger after UPDATE, not INSERT#6134

Merged
rawlinp merged 1 commit intoapache:masterfrom
zrhoffman:update-trigger
Aug 23, 2021
Merged

Run goose~schema_migrations trigger after UPDATE, not INSERT#6134
rawlinp merged 1 commit intoapache:masterfrom
zrhoffman:update-trigger

Conversation

@zrhoffman
Copy link
Copy Markdown
Member

Closes: #6127 by keeping the schema_migrations table's version column in-sync by running the fast_forward_schema_migrations_trigger trigger in 00000000000000_init.up migration after a row of the schema_migrations table is updated, not after a row is inserted.


Which Traffic Control components are affected by this PR?

  • Traffic Ops

What is the best way to verify this PR?

Run the Traffic Ops DB tests using a database dump from the ATC 5.1.2 release (and using a traffic Ops RPM built at 8b05a7b).

If this is a bugfix, which Traffic Control versions contained the bug?

  • 6.0.x release branch

PR submission checklist

@zrhoffman zrhoffman added bug something isn't working as intended Traffic Ops related to Traffic Ops database relating to setup/installation/structure of the Traffic Ops database labels Aug 23, 2021
@zrhoffman zrhoffman added this to the 6.0.0 milestone Aug 23, 2021
@zrhoffman
Copy link
Copy Markdown
Member Author

DB tests failed because

ERROR: latest added/modified file: 00000000000000_init.up.sql is not in the right order

IMO the "right order" check should only be for added files, not for modified files.

@rawlinp rawlinp merged commit 2b7c52e into apache:master Aug 23, 2021
@zrhoffman zrhoffman deleted the update-trigger branch August 23, 2021 22:14
zrhoffman added a commit that referenced this pull request Aug 30, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bug something isn't working as intended database relating to setup/installation/structure of the Traffic Ops database Traffic Ops related to Traffic Ops

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rolling back 2021080408053529_fix_indices in TO DB tests: pys_location_last_updated_idx" already exists

2 participants