mig: drop the toolset MCP hosting columns

DA
1d ago
+10-42

AIM-671

Summary

  • Drop toolsets.mcp_slug, mcp_is_public, mcp_enabled, custom_domain_id and user_session_issuer_id. Dropping them also removes the mcp_slug check, the custom domain and session issuer foreign keys, the two mcp_slug unique indexes, the issuer index and the column comments.
  • Remove the five toolset statements from server/database/sqlc_retired_columns.sql. The okta entry stays, so the file and its sqlc.yaml references stay too. Regenerated sqlc output does not change, because every package already compiled against the retired columns.
  • .mise-tasks/project/reset.sh: delete the NOT EXISTS check on toolsets.user_session_issuer_id. A toolset's issuer now lives on its hosted mcp_servers row, which the existing mcp_servers check already covers. #8011 set the precedent for this kind of edit.

Do not merge until #8248 (AIM-670) is deployed to prod and past its rollback window. Merged commits are promoted to prod together, so this must not ship in the same promotion as #8248: pods older than #8248 still read these columns. The column values are discarded; every live row is already mirrored on mcp_servers.

Motivation

The hosted MCP server and its endpoints now own hosting state. AIM-670 removed the last code that read these columns and moved them into sqlc_retired_columns.sql. This PR is the contract step.

Atlas lint gives warnings only: BC104, CD102, and PG103 for the indexes that go away with the columns. Destructive statements carry -- atlas:nolint DS103, as in #8011 and #8020.

🤖 Generated with Claude Code


Summary by cubic

Drops the retired toolset MCP hosting columns from toolsets; hosted MCP servers now own this state.

  • Drops mcp_slug, mcp_is_public, mcp_enabled, custom_domain_id, and user_session_issuer_id, along with the mcp_slug check, the foreign keys to custom_domains and user_session_issuers, the two mcp_slug unique indexes, the issuer index, and their column comments.
  • Removes the five toolset statements from sqlc_retired_columns.sql; the okta statement stays.
  • Removes the NOT EXISTS check on toolsets.user_session_issuer_id from reset.sh; the existing mcp_servers check already covers issuers.
  • Reworks the migration to land after main's latest migrations.

Migration
Do not merge until #8248 (AIM-670) is deployed to prod and past its rollback window; older pods still read these columns. The values are already mirrored on mcp_servers, so no data is lost.