Elliott-Chong/chatpdf-yt

drizzle.config.ts issue

Reshma-24799 opened this issue · 1 comments

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; }'.

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