- Rewrite schema.ts from sqlite-core to pg-core (pgTable, serial, timestamp, doublePrecision) - Add users table with id, logtoSub (unique), createdAt - Add userId FK column to items, categories, threads, setups, apiKeys, oauthTokens - Add composite unique constraint on categories(userId, name) - Change settings PK to composite (userId, key) - Remove global Uncategorized seed from seed.ts (now per-user lazy) - Generate Drizzle pg migration
8 lines
156 B
TypeScript
8 lines
156 B
TypeScript
import { defineConfig } from "drizzle-kit";
|
|
|
|
export default defineConfig({
|
|
out: "./drizzle-pg",
|
|
schema: "./src/db/schema.ts",
|
|
dialect: "postgresql",
|
|
});
|