[GH-ISSUE #9061] Schema of database tables show incorrect SQL #28585

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

Originally created by @demhadais on GitHub (Apr 9, 2026).
Original GitHub issue: https://github.com/better-auth/better-auth/issues/9061

Originally assigned to: @ping-maxwell on GitHub.

Is this suited for github?

  • Yes, this is suited for github

It seems that most (if not all) of the documentation showing SQL to run to migrate the database says create table if not exists "table", rather than the actual table name. For example, the core schema section of database documentation:

CREATE TABLE IF NOT EXISTS "table" (
	"id" text NOT NULL PRIMARY KEY,
	"name" text NOT NULL,
	"email" text NOT NULL UNIQUE,
	"emailVerified" boolean NOT NULL,
	"image" text,
	"createdAt" timestamptz NOT NULL,
	"updatedAt" timestamptz NOT NULL
);

obviously this should say create table if not exists "user".

I'll try to submit a PR correcting this!

Originally created by @demhadais on GitHub (Apr 9, 2026). Original GitHub issue: https://github.com/better-auth/better-auth/issues/9061 Originally assigned to: @ping-maxwell on GitHub. ### Is this suited for github? - [x] Yes, this is suited for github It seems that most (if not all) of the documentation showing SQL to run to migrate the database says `create table if not exists "table"`, rather than the actual table name. For example, the [core schema section of database documentation](https://better-auth.com/docs/concepts/database#core-schema): ```sql CREATE TABLE IF NOT EXISTS "table" ( "id" text NOT NULL PRIMARY KEY, "name" text NOT NULL, "email" text NOT NULL UNIQUE, "emailVerified" boolean NOT NULL, "image" text, "createdAt" timestamptz NOT NULL, "updatedAt" timestamptz NOT NULL ); ``` obviously this should say `create table if not exists "user"`. I'll try to submit a PR correcting this!
GiteaMirror added the docs label 2026-04-17 20:01:43 -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#28585