Skip to content

chore(db): drop the job log schedule index the occurrence unique index covers - #9398

Merged
waleedlatif1 merged 1 commit into
stagingfrom
chore/drop-redundant-job-log-index
Oct 28, 2026
Merged

waleedlatif1 merged 1 commit into
stagingfrom
chore/drop-redundant-job-log-index

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • Drop job_execution_logs_schedule_id_idx: the (schedule_id, occurrence_at) unique index added for scheduled-job occurrences leads with schedule_id, so it serves every lookup and the workflow_schedule FK check the single-column index did
  • One fewer index to maintain on every job log write
  • Migration 0438 commits out of the batch transaction and runs DROP INDEX CONCURRENTLY IF EXISTS, so it takes no table lock and replays safely

Type of Change

  • Other: schema cleanup

Testing

  • bun run check:migrations (backward-compatible), drizzle-kit generate reports no schema changes
  • bun run lint, bun run check:audits (61 audits)
  • CI applies and replays the migrations on a fresh database

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing (new tests pass the test-audit authoring gate)
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
docs Ready Ready Preview Oct 27, 2026 7:32am UTC

Request Review

@greptile-apps

greptile-apps Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] This PR appears safe to merge.

Summary

Removes the redundant job_execution_logs_schedule_id_idx from the database schema.

  • Job logs keep schedule lookups with one fewer index to maintain.

Reviews (1) · Last reviewed commit: "chore(db): drop the job log schedule ind..." · Reviewed by Greptile

@cubic-dev-ai cubic-dev-ai Bot 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.

No issues found across 4 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Tip: cubic can generate docs of your entire codebase and keep them up to date. Try it here.

Turn on auto-fix | Re-trigger cubic

@waleedlatif1
waleedlatif1 merged commit 40df163 into staging Oct 28, 2026
68 checks passed
@waleedlatif1
waleedlatif1 deleted the chore/drop-redundant-job-log-index branch October 28, 2026 05:14

This branch was successfully deployed

1 active deployment
Preview — 3be8c49a Deployed Oct 27, 2026 by vercel[bot]
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.

1 participant