[PR #3988] [CLOSED] feat(cli): support forced schema file generation and migration #5121

Closed
opened 2026-03-13 12:11:23 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/3988
Author: @Kinfe123
Created: 8/13/2025
Status: Closed

Base: canaryHead: feat/add-force-flag-for-kysely-generation


📝 Commits (5)

📊 Changes

6 files changed (+354 additions, -10 deletions)

View changed files

📝 docs/content/docs/concepts/cli.mdx (+2 -0)
📝 packages/better-auth/src/db/get-migration.ts (+32 -5)
📝 packages/cli/src/commands/generate.ts (+8 -2)
📝 packages/cli/src/commands/migrate.ts (+13 -2)
📝 packages/cli/test/generate.test.ts (+104 -1)
📝 packages/cli/test/migrate.test.ts (+195 -0)

📄 Description

closes #3980


Summary by cubic

Added a --force flag to the CLI generate and migrate commands, letting users force schema output and migrations by treating the target database as empty.

  • New Features
    • Added --force flag to CLI for both generate and migrate commands.
    • When --force is used, all relevant tables are dropped and recreated during migration.
    • Force flag is also supported when generating schema files.

Written for commit 30ea9d6a57. Summary will update 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/3988 **Author:** [@Kinfe123](https://github.com/Kinfe123) **Created:** 8/13/2025 **Status:** ❌ Closed **Base:** `canary` ← **Head:** `feat/add-force-flag-for-kysely-generation` --- ### 📝 Commits (5) - [`c78ff98`](https://github.com/better-auth/better-auth/commit/c78ff98ffe3ff83910c3e2e80c17003b6e8f3c82) feat(cli): support forced schema file output - [`80b6dbc`](https://github.com/better-auth/better-auth/commit/80b6dbc57ab6d75237f4e70d5d8b6634c44f4ccf) docs - [`7cf2e0d`](https://github.com/better-auth/better-auth/commit/7cf2e0d795d5c2f87d8e1dac101a4fc7f4303611) test - [`3821495`](https://github.com/better-auth/better-auth/commit/38214954e08f5af67e359cd299f945512798c6b7) lint - [`30ea9d6`](https://github.com/better-auth/better-auth/commit/30ea9d6a57d59e3d13583da3b55e21f816c786e2) lint ### 📊 Changes **6 files changed** (+354 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `docs/content/docs/concepts/cli.mdx` (+2 -0) 📝 `packages/better-auth/src/db/get-migration.ts` (+32 -5) 📝 `packages/cli/src/commands/generate.ts` (+8 -2) 📝 `packages/cli/src/commands/migrate.ts` (+13 -2) 📝 `packages/cli/test/generate.test.ts` (+104 -1) 📝 `packages/cli/test/migrate.test.ts` (+195 -0) </details> ### 📄 Description closes #3980 <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Added a --force flag to the CLI generate and migrate commands, letting users force schema output and migrations by treating the target database as empty. - **New Features** - Added --force flag to CLI for both generate and migrate commands. - When --force is used, all relevant tables are dropped and recreated during migration. - Force flag is also supported when generating schema files. <sup>Written for commit 30ea9d6a57d59e3d13583da3b55e21f816c786e2. Summary will update 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 12:11:23 -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#5121