diff --git a/packages/db-postgres/src/connect.ts b/packages/db-postgres/src/connect.ts index 37c077c0f3d..032ba7ba91b 100644 --- a/packages/db-postgres/src/connect.ts +++ b/packages/db-postgres/src/connect.ts @@ -66,7 +66,7 @@ export const connect: Connect = async function connect( } const logger = this.logger || false - this.drizzle = drizzle(this.pool, { logger, schema: this.schema }) + this.drizzle = drizzle({ client: this.pool, logger, schema: this.schema }) if (!hotReload) { if (process.env.PAYLOAD_DROP_DATABASE === 'true') { diff --git a/packages/db-vercel-postgres/src/connect.ts b/packages/db-vercel-postgres/src/connect.ts index 1da8676f9aa..1039db72cf1 100644 --- a/packages/db-vercel-postgres/src/connect.ts +++ b/packages/db-vercel-postgres/src/connect.ts @@ -26,7 +26,8 @@ export const connect: Connect = async function connect( const logger = this.logger || false // Passed the poolOptions if provided, // else have vercel/postgres detect the connection string from the environment - this.drizzle = drizzle(this.poolOptions ? new VercelPool(this.poolOptions) : sql, { + this.drizzle = drizzle({ + client: this.poolOptions ? new VercelPool(this.poolOptions) : sql, logger, schema: this.schema, })