19 lines
341 B
TypeScript
19 lines
341 B
TypeScript
// lib/schema/users.ts
|
|
import {
|
|
pgTable,
|
|
uuid,
|
|
text,
|
|
timestamp,
|
|
} from "drizzle-orm/pg-core";
|
|
|
|
export const users = pgTable("users", {
|
|
id: uuid("id").primaryKey().defaultRandom(),
|
|
|
|
email: text("email").notNull().unique(),
|
|
|
|
createdAt: timestamp("created_at", {
|
|
withTimezone: true,
|
|
})
|
|
.notNull()
|
|
.defaultNow(),
|
|
});
|