mirror of
https://github.com/michivonah/themepark-assistant.git
synced 2025-12-22 22:16:29 +01:00
setup drizzle for d1 & create db schema
This commit is contained in:
parent
3c197d8ebe
commit
fc3b1d1af5
8 changed files with 824 additions and 12 deletions
15
api/drizzle.config.ts
Normal file
15
api/drizzle.config.ts
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
import 'dotenv/config';
|
||||
import { defineConfig } from 'drizzle-kit';
|
||||
|
||||
export default defineConfig({
|
||||
out: './drizzle',
|
||||
schema: './src/db/schema.ts',
|
||||
dialect: 'sqlite',
|
||||
driver: 'd1-http',
|
||||
dbCredentials: {
|
||||
accountId: process.env.CLOUDFLARE_ACCOUNT_ID!,
|
||||
databaseId: process.env.CLOUDFLARE_DATABASE_ID!,
|
||||
token: process.env.CLOUDFLARE_D1_TOKEN!,
|
||||
},
|
||||
casing: "snake_case",
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue