Fixes https://github.com/payloadcms/payload/issues/6884 Adds a new flag `acceptIDOnCreate` that allows you to thread your own `id` to `payload.create` `data`, for example: ```ts // doc created with id 1 const doc = await payload.create({ collection: 'posts', data: {id: 1, title: "my title"}}) ``` ```ts import { Types } from 'mongoose' const id = new Types.ObjectId().toHexString() const doc = await payload.create({ collection: 'posts', data: {id, title: "my title"}}) ```
Payload SQLite Adapter
Official SQLite adapter for Payload.
Installation
npm install @payloadcms/db-sqlite
Usage
import { buildConfig } from 'payload/config'
import { sqliteAdapter } from '@payloadcms/db-sqlite'
export default buildConfig({
db: sqliteAdapter({
client: {
url: process.env.DATABASE_URI,
},
}),
// ...rest of config
})
More detailed usage can be found in the Payload Docs.