Skip to content

v0.6.82: fix duplicate migration (#4632)#4633

Merged
Sg312 merged 1 commit into
mainfrom
staging
May 16, 2026
Merged

v0.6.82: fix duplicate migration (#4632)#4633
Sg312 merged 1 commit into
mainfrom
staging

Conversation

@Sg312
Copy link
Copy Markdown
Collaborator

@Sg312 Sg312 commented May 16, 2026

@vercel
Copy link
Copy Markdown

vercel Bot commented May 16, 2026

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

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview, Comment May 16, 2026 5:49pm

Request Review

@Sg312 Sg312 changed the title fix(migrations): remove duplicate column add (#4632) v0.6.83: fix duplicate migration (#4632) May 16, 2026
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 16, 2026

Greptile Summary

This PR removes a duplicate ALTER TABLE "copilot_chats" ADD COLUMN "pinned" boolean DEFAULT false NOT NULL statement from migration 0208_modern_power_man.sql that was already present (and correctly belongs) in 0207_colorful_secret_warriors.sql. Without this fix, applying migration 0208 on a database that had already run 0207 would fail immediately with a "column already exists" error.

  • Root cause: The pinned column addition was generated/merged into both 0207 and 0208; 0207 is the authoritative migration for this change.
  • Impact: All other statements in 0208 (new workspace_file_folders table, indexes, FK constraints) are unaffected by this removal.

Confidence Score: 5/5

Safe to merge — removes a duplicate SQL statement that would have caused migration 0208 to fail on any database that had already run migration 0207.

The change is a single-line deletion of an exact duplicate DDL statement. The pinned column on copilot_chats is correctly and fully handled by migration 0207; its presence in 0208 was purely accidental. All other statements in 0208 are untouched and correct.

No files require special attention.

Important Files Changed

Filename Overview
packages/db/migrations/0208_modern_power_man.sql Removes duplicate ALTER TABLE copilot_chats ADD COLUMN pinned statement that was already applied in migration 0207; fix is correct and the remaining statements are unaffected.

Sequence Diagram

sequenceDiagram
    participant DB as Database
    participant M207 as Migration 0207
    participant M208 as Migration 0208 (fixed)

    M207->>DB: ADD COLUMN "pinned" boolean DEFAULT false NOT NULL to copilot_chats
    Note over DB: Column exists ✓
    M208->>DB: CREATE TABLE workspace_file_folders
    M208->>DB: DROP INDEX workspace_files_workspace_name_active_unique
    M208->>DB: ADD COLUMN folder_id to workspace_files
    M208->>DB: "ADD FK constraints & indexes"
    Note over DB: No duplicate column error ✓
Loading

Reviews (1): Last reviewed commit: "fix(migrations): remove duplicate column..." | Re-trigger Greptile

@Sg312 Sg312 changed the title v0.6.83: fix duplicate migration (#4632) v0.6.82: fix duplicate migration (#4632) May 16, 2026
@Sg312 Sg312 merged commit db7f1c1 into main May 16, 2026
30 checks passed
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