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

Update used DB tables list #3277

Merged
merged 5 commits into from
Feb 14, 2025
Merged

Update used DB tables list #3277

merged 5 commits into from
Feb 14, 2025

Conversation

squadgazzz
Copy link
Contributor

Previous PRs(#3266 and #3276) showed that collecting the DB table names automatically is fragile and might expose unnecessary data. There is still a new role can be added with more tables that will break the initial query again. This PR continues using the static table names approach with the updated DB changes reminder.

@squadgazzz squadgazzz requested a review from a team as a code owner February 11, 2025 12:13
@@ -1,5 +1,6 @@
- markdown: |
Reminder: Please update the DB Readme and comment whether migrations are reversible (include rollback scripts if applicable).
If new tables were added, update the [tables list](https://github.com/cowprotocol/services/blob/main/crates/database/src/lib.rs#L51-L87).
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure if specifying line numbers is sensible, as they can change in the future.

Copy link
Contributor

@MartinquaXD MartinquaXD left a comment

Choose a reason for hiding this comment

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

showed that collecting the DB table names automatically is fragile

Bummer - I didn't expect this. Agree that in this case it makes more sense to manually maintain the list of tables. :(

@squadgazzz squadgazzz enabled auto-merge (squash) February 14, 2025 09:31
@squadgazzz squadgazzz merged commit 47f4258 into main Feb 14, 2025
11 checks passed
@squadgazzz squadgazzz deleted the update-tables-list-2 branch February 14, 2025 09:39
@github-actions github-actions bot locked and limited conversation to collaborators Feb 14, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants