TL;DR
PayloadCMS v3.0.0-beta.116 focuses on critical bug fixes for database operations, particularly addressing issues with document locking, PostgreSQL where filters, Drizzle ORM compatibility, and index naming conflicts. This release improves stability for users working with document locking, PostgreSQL databases, and complex field configurations.
Highlight of the Release
- Fixed document locking issues in system collections (
payload-locked-documents, preferences, & migrations)
- Resolved PostgreSQL where filters not being respected in policy generation
- Fixed ESM compatibility issues with PostgreSQL imports
- Improved Drizzle ORM compatibility with version bumps and fixes
- Enhanced handling of hasMany relationships in nested arrays with tabs/groups
Migration Guide
No migration steps are required for this release. The fixes are applied automatically when you upgrade to v3.0.0-beta.116.
If you were previously experiencing issues with document locking in system collections, PostgreSQL where filters, or Drizzle ORM compatibility, upgrading to this version should resolve those issues without requiring any changes to your code.
Upgrade Recommendations
This release is highly recommended for all users working with:
- Document locking functionality
- PostgreSQL databases
- Drizzle ORM
- Complex field configurations with nested arrays, tabs, or groups
The fixes in this release address several critical issues that could impact data integrity and user experience. Upgrading should be straightforward with no breaking changes introduced.
To upgrade:
npm install [email protected]
# or
yarn add [email protected]
# or
pnpm add [email protected]
Bug Fixes
Document Locking Fixes
- Fixed issues with updating documents in the
payload-locked-documents collection by disabling document locking entirely for system collections (payload-locked-documents, preferences, & migrations). This resolves problems when "taking over" a document where patch requests would fail due to the document being locked by the update operation itself (#8744, fixes #8589).
PostgreSQL Fixes
- Fixed PostgreSQL where filters not being respected in policy generation by utilizing the
combineQueries function in the getEntityPolicies function (#8753, fixes #8224).
- Fixed ESM compatibility issues with PostgreSQL imports that were causing errors in user projects but not in the Payload monorepo (#8758).
Drizzle ORM Fixes
- Fixed duplicate index name errors by enforcing uniqueness on index names. When duplicates are encountered, the system now increments the name (e.g.,
collection_some_text_idx becomes collection_some_text_1_idx) (#8754, fixes #8752).
- Fixed issues with selecting hasMany relationships nested in arrays with tabs/groups (#8737, fixes #8732).
- Bumped drizzle-orm in the drizzle package to 0.35.1 to match other packages (#8759, fixes #8757).
New Features
No new features were introduced in this release. This is primarily a bug fix release focusing on database operations and compatibility improvements.
Security Updates
No specific security fixes were included in this release.
Performance Improvements
This release includes performance improvements related to database operations:
- Improved query performance by correctly applying PostgreSQL where filters in policy generation, ensuring that unnecessary data isn't processed.
- Enhanced document locking behavior by disabling it for system collections, reducing overhead and preventing unnecessary locks.
- Improved Drizzle ORM compatibility and performance with version updates and fixes for hasMany relationships.
Impact Summary
This release focuses on stabilizing PayloadCMS's database operations, particularly for PostgreSQL users and those working with document locking. The fixes address several critical issues that could cause errors during document updates, policy generation, and database operations.
The most significant impact is on collaborative editing workflows, where document locking issues in system collections have been resolved. This ensures that users can properly "take over" documents without encountering errors.
For PostgreSQL users, the fixes ensure that where filters are properly respected in policy generation, improving both security and performance. The ESM compatibility fix for PostgreSQL imports resolves an issue that was affecting user projects but not the Payload monorepo.
Drizzle ORM users will benefit from several fixes, including proper handling of hasMany relationships in nested arrays with tabs/groups, unique index naming to prevent conflicts, and version alignment with other packages.
Overall, this release significantly improves the stability and reliability of PayloadCMS for database operations without introducing any breaking changes.
Full Release Notes
🐛 Bug Fixes
- pg where filters not respected in policy generation (#8753) (99b4359)
- disables document locking of
payload-locked-documents, preferences, & migrations collections (#8744) (c63b7bc)
- db-postgres: esm compatible import of pg (#8758) (f37e476)
- drizzle: bump drizzle-orm in drizzle package to 0.35.1 (#8759) (73102e9)
- drizzle: enforce uniqueness on index names (#8754) (90bca15)
- drizzle: select hasMany nested to array + tab/group (#8737) (872b205)
🤝 Contributors