Skip to content

v0.3.2 — fix SQLite push error when adding the plugin to an existing DB

Choose a tag to compare

@ricbwood ricbwood released this 06 Jun 10:01
· 23 commits to main since this release
faebd1a

Fixes SQLITE_ERROR: no such column: oauth_clients_id on pnpm dev

Adding the plugin to a SQLite database that had already been pushed once failed while Payload rebuilt payload_locked_documents_rels to add the new collections' FK columns — the rebuild's INSERT…SELECT referenced columns that didn't exist on the old table yet.

Fix: the four OAuth collections (oauth-clients, oauth-auth-codes, oauth-tokens, oauth-csrf-nonces) now set lockDocuments: false. They're server-managed and don't need admin document-locking, so Payload omits them from payload_locked_documents_rels — no rebuild of that table, no failing query. Fresh installs are unaffected; existing 0.3.x installs get only a safe column-removal rebuild on upgrade.

Recommended for anyone adding the plugin to an existing SQLite app. Upgrade from 0.3.1.

Full diff: #48