Drizzle Studio Error: Invalid input Please specify 'dialect' param in config, either of 'pg', 'mysql' or 'sqlite'
w3cj opened this issue · 0 comments
w3cj commented
Originally posted by @kaman1 in #2 (comment)
Thanks for the video tutorial. FYI, there is an update for drizzle-kit that caused an error when I ran the Drizzle Studio. I was able to fix it by changing the drizzle.config.ts. I'm not sure if this solution is relevant, but I figured I’d share it in case it might be helpful.
OLD CODE:
import { defineConfig } from "drizzle-kit";
import env from '@/env';
export default defineConfig({
schema: "./src/db/schema/index.ts",
out: "./src/db/migrations",
driver: "pg",
dbCredentials: {
connectionString: env.DATABASE_URL,
},
verbose: true,
strict: true,
});
UPDATED CODE:
import { defineConfig } from "drizzle-kit";
import env from "@/env";
export default defineConfig({
schema: "./src/db/schema/index.ts",
out: "./src/db/migrations",
dialect: "postgresql",
dbCredentials: {
url: env.DATABASE_URL,
},
verbose: true,
strict: true,
});