feat: setup better-auth
This commit is contained in:
@@ -1,5 +1,11 @@
|
||||
import { relations } from "drizzle-orm";
|
||||
import { pgTable, timestamp, uuid, varchar } from "drizzle-orm/pg-core";
|
||||
import { relations, sql } from "drizzle-orm";
|
||||
import {
|
||||
boolean,
|
||||
pgTable,
|
||||
timestamp,
|
||||
uuid,
|
||||
varchar,
|
||||
} from "drizzle-orm/pg-core";
|
||||
|
||||
import { boards } from "./boards";
|
||||
import { cards } from "./cards";
|
||||
@@ -8,11 +14,16 @@ import { lists } from "./lists";
|
||||
import { workspaceMembers, workspaces } from "./workspaces";
|
||||
|
||||
export const users = pgTable("user", {
|
||||
id: uuid("id").notNull().primaryKey(),
|
||||
id: uuid("id")
|
||||
.notNull()
|
||||
.primaryKey()
|
||||
.default(sql`uuid_generate_v4()`),
|
||||
name: varchar("name", { length: 255 }),
|
||||
email: varchar("email", { length: 255 }).notNull().unique(),
|
||||
emailVerified: timestamp("emailVerified", { mode: "date" }),
|
||||
emailVerified: boolean("emailVerified").notNull(),
|
||||
image: varchar("image", { length: 255 }),
|
||||
createdAt: timestamp("createdAt").notNull().defaultNow(),
|
||||
updatedAt: timestamp("updatedAt").notNull().defaultNow(),
|
||||
stripeCustomerId: varchar("stripeCustomerId", { length: 255 }),
|
||||
}).enableRLS();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user