### What? Exposes ability to enable [AUTOINCREMENT](https://www.sqlite.org/autoinc.html) for Primary Keys which ensures that the same ID cannot be reused from previously deleted rows. ```ts sqliteAdapter({ autoIncrement: true }) ``` ### Why? This may be essential for some systems. Enabled `autoIncrement: true` also for the SQLite Adapter in our tests, which can be useful when testing whether the doc was deleted or not when you also have other create operations. ### How? Uses Drizzle's `autoIncrement` option. WARNING: This cannot be enabled in an existing project without a custom migration, as it completely changes how primary keys are stored in the database.
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.