Skip to content

fix(database): re-parent custom app credentials migration onto main head - #1618

Merged
sung17 merged 1 commit into
mainfrom
fix/custom-app-credentials-migration-order
Nov 2, 2026
Merged

sung17 merged 1 commit into
mainfrom
fix/custom-app-credentials-migration-order

Conversation

@sung17

@sung17 sung17 commented Nov 2, 2026

Copy link
Copy Markdown
Collaborator

Summary

Fixes the Lint job failing on main after #1556 (run https://github.com/ChatbotXIO/ChatbotX/actions/runs/41399146818).

20261029111811_add-custom-app-credentials (#1556) and 20261030052828_bind_oauth_consent_workspace (#1595) both point at the same parent snapshots (20261029043008 + 20261029080244), so the snapshot chain forked. drizzle-kit generate rejects that as "Non-commutative migrations detected", which fails db:check-drift.

Changes

  • Removed 20261029111811_add-custom-app-credentials.
  • Regenerated it as 20261102063250_add-custom-app-credentials, parented on the current head 20261102052103_keyword_conditions.
  • Changed the SQL to ADD COLUMN IF NOT EXISTS, so a database that already applied the old migration does not hit a duplicate-column error.

Verification

  • pnpm --filter @chatbotx.io/database lint: "Schema is in sync with the migration snapshot chain."
  • No code references the old migration name.
  • db:migrate was not run.

🤖 Generated with Claude Code

The add-custom-app-credentials migration shared its parent snapshots with
bind_oauth_consent_workspace, forking the snapshot chain and failing the
schema drift check on main. Regenerate it after keyword_conditions and make
the column add idempotent for databases that already applied the old one.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions github-actions Bot added the bug Something isn't working as expected label Nov 2, 2026
@sung17
sung17 merged commit 1ea8bac into main Nov 2, 2026
15 checks passed
hello-jackytruong referenced this pull request in hello-jackytruong/ChatWorkAI Nov 22, 2026
…ead (#1618)

The add-custom-app-credentials migration shared its parent snapshots with
bind_oauth_consent_workspace, forking the snapshot chain and failing the
schema drift check on main. Regenerate it after keyword_conditions and make
the column add idempotent for databases that already applied the old one.

Co-authored-by: Deathgiver <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working as expected

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant