Skip to content

Clean up unused schema fields and indexes - #103

Merged
mrubens merged 1 commit into
developfrom
codex/clean-unused-schema
Jul 10, 2026
Merged

Clean up unused schema fields and indexes#103
mrubens merged 1 commit into
developfrom
codex/clean-unused-schema

Conversation

@mrubens

@mrubens mrubens commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Summary

  • drop unused task_runs.base_shas, deprecated task_messages.content_schema, and unwritten webhooks.ignored_at
  • simplify the webhook status exclusivity constraint to the supported ok / error states
  • remove nine non-unique indexes that exactly duplicate retained unique indexes or constraints
  • update fixtures and assertions that referenced the removed columns

Migration verification

Applied the full migration chain to a disposable Postgres database and verified:

  • all three unused columns are absent
  • all nine duplicate indexes are absent
  • all nine unique backing indexes remain
  • no exact duplicate indexes remain in the generated schema snapshot

Validation

  • DB tests: 218 passed
  • webhook tests: 8 passed
  • task-title refresh tests: 5 passed
  • affected package typechecks and lints
  • pnpm lint:fast
  • pnpm check-types:fast
  • pnpm knip

@roomote-roomote

roomote-roomote Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

No code issues found. See task

Reviewed the schema cleanup against the codebase: the three dropped columns (task_runs.base_shas, task_messages.content_schema, webhooks.ignored_at) have no remaining references in application code, and the migration ordering (drop constraint → drop columns → re-add webhooks_status_exclusive) is correct. Eight of the nine dropped indexes are exact duplicates of retained unique constraints/inline .unique() columns; the ninth (repositories_provider_full_name_idx on (source_control_provider, full_name)) is not an exact unique duplicate, but its query workload (findRepository) is already covered by the more-selective repositories_full_name_idx, so its removal is safe.

@mrubens
mrubens merged commit e8a1f87 into develop Jul 10, 2026
1 check passed
@mrubens
mrubens deleted the codex/clean-unused-schema branch July 10, 2026 17:11
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.

2 participants