[GH-ISSUE #2691] Support for Decimal in additional fields #9304

Closed
opened 2026-04-13 04:43:59 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @Rafter97 on GitHub (May 18, 2025).
Original GitHub issue: https://github.com/better-auth/better-auth/issues/2691

Is this suited for github?

  • Yes, this is suited for github

Is your feature request related to a problem? Please describe.

Currently I am creating a users balance on but I can't generate a field "balance" which is how much a user has.

Describe the solution you'd like

Should add a decimal type, then you can add a precision and scale which could become required
The precision and scale will determine how much a user

        balance: {
          type: "decimal",
          defaultValue: 0.0,
          required: false,
          input: false,
          precision: 18,
          scale: 2
        },

Describe alternatives you've considered

I could used a BigInt and divide by 100 with a balance column, but this has limitations.

If using crypto decimal is the only option to go with (which is for my case 😅 )

Additional context

No response

Originally created by @Rafter97 on GitHub (May 18, 2025). Original GitHub issue: https://github.com/better-auth/better-auth/issues/2691 ### Is this suited for github? - [x] Yes, this is suited for github ### Is your feature request related to a problem? Please describe. Currently I am creating a users balance on but I can't generate a field "balance" which is how much a user has. ### Describe the solution you'd like Should add a decimal type, then you can add a precision and scale which could become required The precision and scale will determine how much a user ``` balance: { type: "decimal", defaultValue: 0.0, required: false, input: false, precision: 18, scale: 2 }, ``` ### Describe alternatives you've considered I could used a BigInt and divide by 100 with a balance column, but this has limitations. If using crypto decimal is the only option to go with (which is for my case 😅 ) ### Additional context _No response_
GiteaMirror added the locked label 2026-04-13 04:43:59 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Sep 13, 2025):

Hi, @Rafter97. I'm Dosu (https://dosu.dev), and I'm helping the better-auth team manage their backlog and am marking this issue as stale.

Issue Summary:

  • You requested adding a decimal data type with precision and scale options to better represent monetary values.
  • The goal is to improve accuracy over the current BigInt scaling approach, especially for cryptocurrency balances.
  • There has been no further discussion or activity on this issue since it was opened.
  • The issue remains unresolved and no proposed solutions have been implemented yet.

Next Steps:

  • Please let me know if this feature request is still relevant to the latest version of better-auth by commenting on this issue.
  • If I do not hear back within 7 days, this issue will be automatically closed.

Thank you for your understanding and contribution!

<!-- gh-comment-id:3288576121 --> @dosubot[bot] commented on GitHub (Sep 13, 2025): Hi, @Rafter97. I'm Dosu (https://dosu.dev), and I'm helping the better-auth team manage their backlog and am marking this issue as stale. **Issue Summary:** - You requested adding a decimal data type with precision and scale options to better represent monetary values. - The goal is to improve accuracy over the current BigInt scaling approach, especially for cryptocurrency balances. - There has been no further discussion or activity on this issue since it was opened. - The issue remains unresolved and no proposed solutions have been implemented yet. **Next Steps:** - Please let me know if this feature request is still relevant to the latest version of better-auth by commenting on this issue. - If I do not hear back within 7 days, this issue will be automatically closed. Thank you for your understanding and contribution!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#9304