The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 21, 06:00 UTC
| 1 | import { pgTable, serial, text, timestamp } from "drizzle-orm/pg-core"; |
| 2 | |
| 3 | export const Notes = pgTable("notes", { |
| 4 | id: serial("id").primaryKey(), |
| 5 | body: text("body").notNull(), |
| 6 | createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(), |
| 7 | }); |
| 8 | |
| 9 | export type Note = typeof Notes.$inferSelect; |
| 10 | |
| 11 | export const ENSURE_NOTES_SQL = ` |
| 12 | CREATE TABLE IF NOT EXISTS notes ( |
| 13 | id serial PRIMARY KEY, |
| 14 | body text NOT NULL, |
| 15 | created_at timestamptz NOT NULL DEFAULT now() |
| 16 | ) |
| 17 | `; |