If you (using the MongoDB adapter) delete a block from the payload config, but still have some data with that block in the DB, you'd receive in the admin panel an error like: ``` Block with type "cta" was found in block data, but no block with that type is defined in the config for field with schema path pages.blocks ``` Now, we remove those "unknown" blocks at the DB adapter level. Co-authored-by: Dan Ribbens <dan.ribbens@gmail.com>
Payload MongoDB Adapter
Official MongoDB adapter for Payload.
Installation
npm install @payloadcms/db-mongodb
Usage
import { buildConfig } from 'payload'
import { mongooseAdapter } from '@payloadcms/db-mongodb'
export default buildConfig({
db: mongooseAdapter({
url: process.env.DATABASE_URI,
}),
// ...rest of config
})
More detailed usage can be found in the Payload Docs.