[PR #6214] [MERGED] fix(cli): kysely migration fails #6524

Closed
opened 2026-03-13 13:02:08 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/6214
Author: @ping-maxwell
Created: 11/22/2025
Status: Merged
Merged: 11/22/2025
Merged by: @Bekacru

Base: canaryHead: fix/cli/kysely-migration-fails


📝 Commits (2)

  • 99df253 fix(cli): kysely migration fails
  • 423879c Merge branch 'canary' into fix/cli/kysely-migration-fails

📊 Changes

1 file changed (+6 additions, -2 deletions)

View changed files

📝 packages/better-auth/src/db/get-migration.ts (+6 -2)

📄 Description

It breaks because builder can't add index then use addColumn


Summary by cubic

Fixes a CLI Kysely migration failure caused by chaining addIndex and addColumn on the same alterTable builder. Index creation is now done with a separate builder pushed to migrations, and the migrations type includes addIndex results.

Written for commit 99df25318f. Summary will update automatically on new commits.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/better-auth/better-auth/pull/6214 **Author:** [@ping-maxwell](https://github.com/ping-maxwell) **Created:** 11/22/2025 **Status:** ✅ Merged **Merged:** 11/22/2025 **Merged by:** [@Bekacru](https://github.com/Bekacru) **Base:** `canary` ← **Head:** `fix/cli/kysely-migration-fails` --- ### 📝 Commits (2) - [`99df253`](https://github.com/better-auth/better-auth/commit/99df25318f2be8dfc4478fa0e087401c22f0b827) fix(cli): kysely migration fails - [`423879c`](https://github.com/better-auth/better-auth/commit/423879ccd710465d2110b098b7edde803d8f2310) Merge branch 'canary' into fix/cli/kysely-migration-fails ### 📊 Changes **1 file changed** (+6 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/db/get-migration.ts` (+6 -2) </details> ### 📄 Description It breaks because builder can't add index then use `addColumn` <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Fixes a CLI Kysely migration failure caused by chaining addIndex and addColumn on the same alterTable builder. Index creation is now done with a separate builder pushed to migrations, and the migrations type includes addIndex results. <sup>Written for commit 99df25318f2be8dfc4478fa0e087401c22f0b827. Summary will update automatically on new commits.</sup> <!-- End of auto-generated description by cubic. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-03-13 13:02:08 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#6524