Skip to content

Drop solver_competitions table - #4687

Merged
jmg-duarte merged 2 commits into
mainfrom
jmgd/drop-solver-competitions
Jul 31, 2026
Merged

Drop solver_competitions table#4687
jmg-duarte merged 2 commits into
mainfrom
jmgd/drop-solver-competitions

Conversation

@jmg-duarte

Copy link
Copy Markdown
Contributor

Description

Drop the solver_competitions table, which was kept only to provide frontend with solver-ids since cowprotocol/cowswap#7871 this is no longer the case and since #4657 this has been made effective turning this table obsolete

Changes

  • Drop the solver_competitions table

@jmg-duarte
jmg-duarte requested a review from a team as a code owner July 30, 2026 15:44
@github-actions

Copy link
Copy Markdown

Reminder: Please update the DB Readme and comment whether migrations are reversible (include rollback scripts if applicable).

  • If creating new tables, update the tables list.
  • When adding a new index, consider using CREATE INDEX CONCURRENTLY for tables involved in the critical execution path.
  • For breaking changes, remember that during rollout k8s starts the new autopilot, runs the Flyway migration, and only then shuts down the old pod. That overlap means the previous version can still be processing requests on the migrated schema, so make it compatible first and ship the breaking DB change in the following release.

Caused by:

@claude

claude Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Claude finished @jmg-duarte's task in 1m 28s —— View job


PR Review: Drop solver_competitions table

  • Read changed migration file
  • Checked for remaining code references to solver_competitions
  • Verified migration reversibility / rollout safety
  • Posted review

The migration itself is correct and the change is safe:

  • No live code references — grepped the whole workspace; only solver_competition_v2 (a different table) is used in Rust. The old solver_competitions module was already removed (per Remove dependency on the solver_competitions table #4657), so no deployed pod reads/writes this table during the rollout overlap.
  • Not in the truncate lists in crates/database/src/lib.rs, so no update needed there.
  • V115 is the latest migration — no numbering conflict.

One follow-up (posted inline): database/README.md still documents the ### solver_competitions section (lines 460–470). It should be removed so the schema docs stay in sync.

Note on reversibility: DROP TABLE is not reversible — dropped data is unrecoverable. That's clearly intentional here given the table is obsolete, but worth stating explicitly in the PR for the rollback checklist.

Comment thread database/sql/V115__drop_solver_competitions.sql

@MartinquaXD MartinquaXD left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

should also be dropped from the db readme as flagged by claude

@jmg-duarte
jmg-duarte enabled auto-merge July 31, 2026 09:28
@jmg-duarte
jmg-duarte added this pull request to the merge queue Jul 31, 2026
Merged via the queue into main with commit d9fc46f Jul 31, 2026
21 of 22 checks passed
@jmg-duarte
jmg-duarte deleted the jmgd/drop-solver-competitions branch July 31, 2026 09:51
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 31, 2026
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.

2 participants