[PR #5903] feat(prisma): Enhance JSON default value handling for arrays and objects in schema generation #14556

Closed
opened 2026-04-13 09:31:40 -05:00 by GiteaMirror · 0 comments
Owner

Original Pull Request: https://github.com/better-auth/better-auth/pull/5903

State: closed
Merged: No


solves #5900

Added objects and arrays compatibility for default JSON values with test cases

The default string value is not sorted for mysql ,but will be soon be done with the #5866 PR


Summary by cubic

Adds support for default JSON objects and arrays in Prisma schema generation, with proper escaping, plus defaults for string[] and number[]. Improves reliability of generated defaults and adds tests.

  • New Features
    • Support default values for JSON objects and arrays (escaped and quoted).
    • Generate defaults for string[] and number[], including empty arrays.
    • Skip string defaults on MySQL for now.
    • Add tests for JSON defaults and expand DBPrimitive to include Object.

Written for commit 73465b7220. Summary will update automatically on new commits.

**Original Pull Request:** https://github.com/better-auth/better-auth/pull/5903 **State:** closed **Merged:** No --- **solves #5900** ### Added objects and arrays compatibility for default JSON values with test cases The default string value is not sorted for mysql ,but will be soon be done with the #5866 PR <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Adds support for default JSON objects and arrays in Prisma schema generation, with proper escaping, plus defaults for string[] and number[]. Improves reliability of generated defaults and adds tests. - **New Features** - Support default values for JSON objects and arrays (escaped and quoted). - Generate defaults for string[] and number[], including empty arrays. - Skip string defaults on MySQL for now. - Add tests for JSON defaults and expand DBPrimitive to include Object. <sup>Written for commit 73465b72206c6a738984db16a14711acfa1a1af2. Summary will update automatically on new commits.</sup> <!-- End of auto-generated description by cubic. -->
GiteaMirror added the pull-request label 2026-04-13 09:31:40 -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#14556