ManKid
ManKid
DTDrizzle Team
Created by astro on 5/30/2024 in #help
drizzle + turso config
I did also just create a PR to add a snippet for configuring named environment files. https://github.com/tursodatabase/turso-docs/pull/196
4 replies
DTDrizzle Team
Created by astro on 5/30/2024 in #help
drizzle + turso config
not sure if you found a fix, but I just got mine working. It comes from 'dotenv' not being able to read .env.local heres some updated code:
import type { Config } from "drizzle-kit";
import * as dotenv from "dotenv";
dotenv.config({path: `.env.local`, override: true});

export default {
schema: "./drizzle/schema.ts",
out: "./drizzle/migrations",
driver: "turso",
dbCredentials: {
url: process.env.TURSO_DATABASE_URL as string,
authToken: process.env.TURSO_AUTH_TOKEN as string,
},
dialect: 'sqlite'
} satisfies Config;
import type { Config } from "drizzle-kit";
import * as dotenv from "dotenv";
dotenv.config({path: `.env.local`, override: true});

export default {
schema: "./drizzle/schema.ts",
out: "./drizzle/migrations",
driver: "turso",
dbCredentials: {
url: process.env.TURSO_DATABASE_URL as string,
authToken: process.env.TURSO_AUTH_TOKEN as string,
},
dialect: 'sqlite'
} satisfies Config;
4 replies
DTDrizzle Team
Created by astro on 5/30/2024 in #help
drizzle + turso config
same issue here
4 replies