Skip to content

chore(db): drop retired usage columns and compatibility scaffolding - #7868

Merged
icecrasher321 merged 2 commits into
stagingfrom
codex/drop-retired-stats-columns
Sep 16, 2026
Merged

icecrasher321 merged 2 commits into
stagingfrom
codex/drop-retired-stats-columns

Conversation

@icecrasher321

@icecrasher321 icecrasher321 commented Sep 15, 2026

Copy link
Copy Markdown
Collaborator

Summary

Type of Change

  • Maintenance / database cleanup

Testing

  • App and database type checks, lint, all 46 repository audits (including API validation), migration safety, and schema-generation consistency passed.
  • 1,519 automated tests passed across affected application suites, database suites, script suites, and the new contract-migration tests.
  • PostgreSQL 17: full migration history and no-op replay; skipped-backfill rejection; canonical value preservation; released prep code's inserts and RETURNING after the actual drop; fresh and populated forced schema pushes.

Checklist

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

@icecrasher321
icecrasher321 requested a review from a team as a code owner September 15, 2026 23:36
@vercel

vercel Bot commented Sep 15, 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 Sep 16, 2026 12:15am UTC

Request Review

@greptile-apps

greptile-apps Bot commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

The PR appears safe to merge with no outstanding blocking findings.

Summary

This PR completes the retired database-column cleanup and removes the compatibility code that supported the transition.

  • Drops retired usage, execution-cost, and workspace-file-size columns through a guarded, replay-safe migration.
  • Updates application reads and writes to use the final Drizzle schema directly.
  • Removes completed backfills, projections, wrappers, triggers, and development cutover scaffolding.
  • Preserves direct development schema reconciliation while keeping staging and production on versioned migrations.
  • Adds PostgreSQL migration coverage and updates attachment-provenance behavior introduced since the previous review.
Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Database deployment] --> B{Environment}
    B -->|Development| C[db:push --force]
    C --> D[Drizzle direct schema reconciliation]
    D --> E[Post-push reconciliation scripts]
    B -->|Staging or production| F[db:migrate]
    F --> G[Migration 0348 receipt and backfill checks]
    G --> H[Drop retired columns]
    H --> I[Final application schema]
    E --> I
Loading

Reviews (3) · Last reviewed commit: "fix(db): forward force flags for local a..."

Comment thread .github/workflows/migrations.yml

@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.

All reported issues were addressed across 58 files

Reply with feedback, questions, or to request a fix.

Fix all with cubic | Re-trigger cubic

Comment thread .github/workflows/migrations.yml
@icecrasher321
icecrasher321 force-pushed the codex/drop-retired-stats-columns branch from 4e68075 to c394c17 Compare September 16, 2026 00:05
@icecrasher321

Copy link
Copy Markdown
Collaborator Author

@greptile

@icecrasher321

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@icecrasher321 I have started the AI code review. It will take a few minutes to complete.

@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 61 files

Confidence score: 5/5

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

Re-trigger cubic

@icecrasher321
icecrasher321 force-pushed the codex/drop-retired-stats-columns branch from c394c17 to 5a255fe Compare September 16, 2026 00:13
@icecrasher321

Copy link
Copy Markdown
Collaborator Author

@greptile

@icecrasher321

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@icecrasher321 I have started the AI code review. It will take a few minutes to complete.

@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 61 files

Confidence score: 5/5

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

Re-trigger cubic

@icecrasher321
icecrasher321 merged commit 783cf17 into staging Sep 16, 2026
34 checks passed
@icecrasher321
icecrasher321 deleted the codex/drop-retired-stats-columns branch September 16, 2026 00:25
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