drizzle.config.ts issue
Reshma-24799 opened this issue · 1 comments
Reshma-24799 commented
export default { driver: "pg", schema: "./src/lib/db/schema.ts", dbCredentials: { connectionString: process.env.DATABASE_URL!, }, } satisfies Config;
error in driver and connectionString
Error: Type '"pg"' is not assignable to type '"d1"'.
Object literal may only specify known properties, and 'connectionString' does not exist in type '{ wranglerConfigPath: string; dbName: string; }'.
Divya2163 commented
it didn't work because of the new version changes, try this code
export default {
dialect: 'postgresql',
schema: "./lib/db/schema.ts",
dbCredentials: {
url: process.env.DATABASE_URL!,
}
} satisfies Config;
If you want more details refer this documentation by drizzle
https://orm.drizzle.team/kit-docs/commands#prototype--push