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 migration to fix data_store ids #2452

Merged
merged 2 commits into from Apr 27, 2023
Merged

Conversation

danielbdias
Copy link
Contributor

This PR adds a server migration to guarantee that preexisting data_stores will continue working on Tracetest.

Changes

  • Add migration

Checklist

  • tested locally
  • added new dependencies
  • updated the docs
  • added a test


UPDATE data_stores
SET id = 'current'
WHERE id = (select id from data_stores order by created_at limit 1);
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't we get the one with is_default = true ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

🤦 sure! changing it!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

query updated to consider is_default

@danielbdias danielbdias merged commit 1485f41 into main Apr 27, 2023
28 checks passed
@danielbdias danielbdias deleted the add/data-store-migration branch April 27, 2023 16:08
schoren pushed a commit that referenced this pull request Jun 5, 2023
* Add migration to fix data_store ids

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

Successfully merging this pull request may close these issues.

None yet

3 participants