sandbox-web-ide/backend/worker/drizzle.config.ts
2024-04-21 23:09:37 -04:00

20 lines
426 B
TypeScript

import type { Config } from "drizzle-kit";
export default process.env.LOCAL_DB_PATH
? ({
schema: "./src/schema.ts",
driver: "better-sqlite",
dbCredentials: {
url: process.env.LOCAL_DB_PATH!,
},
} satisfies Config)
: ({
schema: "./src/schema.ts",
out: "./drizzle",
driver: "d1",
dbCredentials: {
wranglerConfigPath: "wrangler.toml",
dbName: "d1-sandbox",
},
} satisfies Config);