[PR #5289] docs(feat): add copy schema dialog #5906

Open
opened 2026-03-13 12:40:55 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/5289
Author: @jslno
Created: 10/14/2025
Status: 🔄 Open

Base: canaryHead: docs/copy-schema-dialog


📝 Commits (10+)

📊 Changes

29 files changed (+2497 additions, -737 deletions)

View changed files

📝 docs/app/docs/[[...slug]]/page.tsx (+101 -100)
docs/components/copy-schema.tsx (+637 -0)
📝 docs/components/mdx/database-tables.tsx (+137 -85)
📝 docs/content/docs/concepts/database.mdx (+74 -71)
📝 docs/content/docs/concepts/rate-limit.mdx (+18 -17)
📝 docs/content/docs/plugins/2fa.mdx (+35 -9)
📝 docs/content/docs/plugins/admin.mdx (+29 -22)
📝 docs/content/docs/plugins/anonymous.mdx (+7 -1)
📝 docs/content/docs/plugins/api-key.mdx (+47 -44)
📝 docs/content/docs/plugins/device-authorization.mdx (+73 -71)
📝 docs/content/docs/plugins/jwt.mdx (+7 -9)
📝 docs/content/docs/plugins/last-login-method.mdx (+7 -3)
📝 docs/content/docs/plugins/oidc-provider.mdx (+72 -70)
📝 docs/content/docs/plugins/organization.mdx (+163 -101)
📝 docs/content/docs/plugins/passkey.mdx (+22 -21)
📝 docs/content/docs/plugins/phone-number.mdx (+7 -7)
📝 docs/content/docs/plugins/siwe.mdx (+39 -8)
📝 docs/content/docs/plugins/sso.mdx (+48 -8)
📝 docs/content/docs/plugins/stripe.mdx (+81 -85)
📝 docs/content/docs/plugins/username.mdx (+8 -5)

...and 9 more files

📄 Description

image

Summary by cubic

Adds a Copy Schema dialog and a copySchema utility that generate SQL and ORM schemas from typed table definitions in the docs. Implements full SQL dialects and Prisma/Drizzle resolvers, and integrates the dialog into DatabaseTable pages.

  • New Features
    • New copySchema(schema, { dialect | resolver, useNumberId, mode, conditions }) that returns SQL/Prisma/TypeScript.
    • SQL dialects implemented: MySQL, PostgreSQL, SQLite, MSSQL with NOT NULL defaults, primary keys, unique fields, foreign keys (ON DELETE), and AUTO_INCREMENT for numeric ids (MySQL).
    • ORM resolvers: Prisma (provider selection) and Drizzle (pg/mysql/sqlite) with dialog controls for options.
    • Docs/UI: new CopySchemaDialog (copy, syntax highlight, maximize/minimize) and DatabaseTable refactor (modelName, fieldName, required, unique, references).

Written for commit ac02f55c37. 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/5289 **Author:** [@jslno](https://github.com/jslno) **Created:** 10/14/2025 **Status:** 🔄 Open **Base:** `canary` ← **Head:** `docs/copy-schema-dialog` --- ### 📝 Commits (10+) - [`e058981`](https://github.com/better-auth/better-auth/commit/e0589811f3defc3e89cce902ed65df781cd2a181) chore: initial commit - [`f6ad9d2`](https://github.com/better-auth/better-auth/commit/f6ad9d2b13d0d88eb4afe9553d02005c14c1603f) chore: cleanup types - [`fe79d76`](https://github.com/better-auth/better-auth/commit/fe79d76760ada8875a675f32e85871eec434f633) fix: mysql resolver - [`5392792`](https://github.com/better-auth/better-auth/commit/5392792ee4e5ebd5fdb36afa62fbdbbbf647c9a8) feat: add basic dialog - [`123433c`](https://github.com/better-auth/better-auth/commit/123433ce637413c34c0b7d89de630f1a7fe92a02) chore: fix linting - [`5311f5b`](https://github.com/better-auth/better-auth/commit/5311f5bb0160b2ad9094c80f3babd6a5f5711d58) feat: add alter mode - [`8d02184`](https://github.com/better-auth/better-auth/commit/8d02184bd7aefb0eab5b8c48249e2810371f3c9f) chore: cleanup - [`49227f6`](https://github.com/better-auth/better-auth/commit/49227f64d5a88a9ac2d6a73609cf5274abed7cf5) feat: add postgres dialect - [`c5b5e48`](https://github.com/better-auth/better-auth/commit/c5b5e4833613ee809176f20635f53261e0a50cbb) feat: add sqlite dialect - [`93e7a7c`](https://github.com/better-auth/better-auth/commit/93e7a7cc72136339bf0cb118f4be2d87b80837c5) feat: add mssql dialect ### 📊 Changes **29 files changed** (+2497 additions, -737 deletions) <details> <summary>View changed files</summary> 📝 `docs/app/docs/[[...slug]]/page.tsx` (+101 -100) ➕ `docs/components/copy-schema.tsx` (+637 -0) 📝 `docs/components/mdx/database-tables.tsx` (+137 -85) 📝 `docs/content/docs/concepts/database.mdx` (+74 -71) 📝 `docs/content/docs/concepts/rate-limit.mdx` (+18 -17) 📝 `docs/content/docs/plugins/2fa.mdx` (+35 -9) 📝 `docs/content/docs/plugins/admin.mdx` (+29 -22) 📝 `docs/content/docs/plugins/anonymous.mdx` (+7 -1) 📝 `docs/content/docs/plugins/api-key.mdx` (+47 -44) 📝 `docs/content/docs/plugins/device-authorization.mdx` (+73 -71) 📝 `docs/content/docs/plugins/jwt.mdx` (+7 -9) 📝 `docs/content/docs/plugins/last-login-method.mdx` (+7 -3) 📝 `docs/content/docs/plugins/oidc-provider.mdx` (+72 -70) 📝 `docs/content/docs/plugins/organization.mdx` (+163 -101) 📝 `docs/content/docs/plugins/passkey.mdx` (+22 -21) 📝 `docs/content/docs/plugins/phone-number.mdx` (+7 -7) 📝 `docs/content/docs/plugins/siwe.mdx` (+39 -8) 📝 `docs/content/docs/plugins/sso.mdx` (+48 -8) 📝 `docs/content/docs/plugins/stripe.mdx` (+81 -85) 📝 `docs/content/docs/plugins/username.mdx` (+8 -5) _...and 9 more files_ </details> ### 📄 Description <img width="1273" height="920" alt="image" src="https://github.com/user-attachments/assets/482ccac7-2374-4270-b8bc-4233230d32bd" /> <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Adds a Copy Schema dialog and a copySchema utility that generate SQL and ORM schemas from typed table definitions in the docs. Implements full SQL dialects and Prisma/Drizzle resolvers, and integrates the dialog into DatabaseTable pages. - New Features - New copySchema(schema, { dialect | resolver, useNumberId, mode, conditions }) that returns SQL/Prisma/TypeScript. - SQL dialects implemented: MySQL, PostgreSQL, SQLite, MSSQL with NOT NULL defaults, primary keys, unique fields, foreign keys (ON DELETE), and AUTO_INCREMENT for numeric ids (MySQL). - ORM resolvers: Prisma (provider selection) and Drizzle (pg/mysql/sqlite) with dialog controls for options. - Docs/UI: new CopySchemaDialog (copy, syntax highlight, maximize/minimize) and DatabaseTable refactor (modelName, fieldName, required, unique, references). <sup>Written for commit ac02f55c372c3aead601e5084dddbdf2b674b5a7. 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 12:40:55 -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#5906