user (db/schema.ts)

nimbusdotstorage/Nimbus · packages/db/schema.ts · typescript · Apache-2.0
database, Database / ORM

Drizzle ORM schema definitions for user authentication, sessions, accounts, tags, and more.

// Source: https://github.com/nimbusdotstorage/Nimbus | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
import { boolean, foreignKey, index, pgTable, text, timestamp } from "drizzle-orm/pg-core";

const defaultTimestamp = (name: string) =>
	timestamp(name)
		.$defaultFn(() => /* @__PURE__ */ new Date())
		.notNull();

// Auth schema
export const user = pgTable("user", {
	id: text("id").primaryKey(),
	name: text("name").notNull(),
	email: text("email").notNull().unique(),
	emailVerified: boolean("email_verified")
		.$defaultFn(() => false)
		.notNull(),
	image: text("image"),
	// references account.accountId and account.providerId. Is set via better-auth database hook after account c

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key