[PR #1217] [MERGED] fix(cli): add bigint type to generators #29294

Closed
opened 2026-04-17 20:39:49 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/1217
Author: @ammarmbe
Created: 1/15/2025
Status: Merged
Merged: 1/16/2025
Merged by: @Bekacru

Base: mainHead: bigint


📝 Commits (1)

  • 2471e40 fix(cli): add bigint type to generators

📊 Changes

2 files changed (+14 additions, -5 deletions)

View changed files

📝 packages/cli/src/generators/drizzle.ts (+9 -3)
📝 packages/cli/src/generators/prisma.ts (+5 -2)

📄 Description

This pull request adds logic to the schema generators for both Drizzle and Prisma to handle bigint fields appropriately.

Closes #1216

Updates to Drizzle schema generation:

Updates to Prisma schema generation:


🔄 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/1217 **Author:** [@ammarmbe](https://github.com/ammarmbe) **Created:** 1/15/2025 **Status:** ✅ Merged **Merged:** 1/16/2025 **Merged by:** [@Bekacru](https://github.com/Bekacru) **Base:** `main` ← **Head:** `bigint` --- ### 📝 Commits (1) - [`2471e40`](https://github.com/better-auth/better-auth/commit/2471e40cd4ac9dd852f7b4e58eba080113968511) fix(cli): add bigint type to generators ### 📊 Changes **2 files changed** (+14 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `packages/cli/src/generators/drizzle.ts` (+9 -3) 📝 `packages/cli/src/generators/prisma.ts` (+5 -2) </details> ### 📄 Description This pull request adds logic to the schema generators for both Drizzle and Prisma to handle `bigint` fields appropriately. Closes #1216 Updates to Drizzle schema generation: * [`packages/cli/src/generators/drizzle.ts`](diffhunk://#diff-08d92411458f1a542439c00e1269f9c43f2e69d6cdbaeb9d5d205c6c092bf9e6R21-R28): Added logic to check for `bigint` fields and update the import statements to include `bigint` if necessary. * [`packages/cli/src/generators/drizzle.ts`](diffhunk://#diff-08d92411458f1a542439c00e1269f9c43f2e69d6cdbaeb9d5d205c6c092bf9e6L52-R59): Modified the schema generation logic to use `bigint` for PostgreSQL and MySQL when a field is marked as `bigint`. Updates to Prisma schema generation: * [`packages/cli/src/generators/prisma.ts`](diffhunk://#diff-b32e8aeb98c8b8239920a352c8ca1f870e295b5b4ed323b4e823d8befbf0003fL54-R60): Updated the `getType` function to return `BigInt` for fields marked as `bigint`. * [`packages/cli/src/generators/prisma.ts`](diffhunk://#diff-b32e8aeb98c8b8239920a352c8ca1f870e295b5b4ed323b4e823d8befbf0003fL106-R109): Modified the schema generation logic to pass the `bigint` attribute to the `getType` function. --- <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-04-17 20:39:49 -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#29294