Continuation of https://github.com/payloadcms/payload/pull/6245. This PR allows you to pass `blocksAsJSON: true` to SQL adapters and the adapter instead of aligning with the SQL preferred relation approach for blocks will just use a simple JSON column, which can improve performance with a large amount of blocks. To try these changes you can install `3.43.0-internal.c5bbc84`.
Payload Postgres Adapter
Official Postgres adapter for Payload.
Installation
npm install @payloadcms/db-postgres
Usage
import { buildConfig } from 'payload'
import { postgresAdapter } from '@payloadcms/db-postgres'
export default buildConfig({
db: postgresAdapter({
pool: {
connectionString: process.env.DATABASE_URI,
},
}),
// ...rest of config
})
More detailed usage can be found in the Payload Docs.