feat: db init
This commit is contained in:
parent
0b1cbef59e
commit
a6fc74e851
23 changed files with 1536 additions and 5553 deletions
13
packages/db/src/schema/users.ts
Normal file
13
packages/db/src/schema/users.ts
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
import { pgTable, text } from "drizzle-orm/pg-core";
|
||||
import { timestamps } from "./column.helpers";
|
||||
|
||||
export const user = pgTable("users", {
|
||||
id: text("id").primaryKey(), // Clerk user ID
|
||||
email: text("email").notNull(),
|
||||
name: text("name"),
|
||||
role: text("role").default("user").notNull(),
|
||||
...timestamps,
|
||||
});
|
||||
|
||||
export type InsertUser = typeof user.$inferInsert;
|
||||
export type SelectUser = typeof user.$inferSelect;
|
||||
Loading…
Add table
Add a link
Reference in a new issue