sandbox-web-ide/backend/database/drizzle.config.ts
2024-10-26 06:44:10 -06:00

20 lines
424 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)