sandbox-web-ide/backend/database/drizzle.config.ts

20 lines
424 B
TypeScript
Raw Permalink Normal View History

2024-10-24 12:44:38 -06:00
import type { Config } from "drizzle-kit"
2024-04-16 19:06:23 -04:00
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",
},
2024-10-24 12:44:38 -06:00
} satisfies Config)