Elliott-Chong / chatpdf-yt

https://chatpdf-elliott.vercel.app
638 stars 263 forks source link

drizzle.config.ts issue #49

Open Reshma-24799 opened 1 month ago

Reshma-24799 commented 1 month ago

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 3 weeks ago

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