Payload CMS Release: 2.30.3

Tag Name: v2.30.3

Release Date: 10/18/2024

Payload CMS LogoPayload CMS

Payload CMS is a modern, self-hosted headless content management system built with TypeScript, Node.js, and MongoDB. It's designed specifically for developers who want full control over their content management system while maintaining a powerful admin interface for content editors.

TL;DR

Payload CMS v2.30.3: Bug Fixes for PostgreSQL and Select Fields

This minor release addresses two important bugs: one affecting PostgreSQL migrations and another related to duplicating documents with hasMany select fields. These fixes ensure smoother database operations and document duplication functionality, particularly for PostgreSQL users.

Highlight of the Release

    • Fixed PostgreSQL migration creation errors when working with previous schemas
    • Resolved duplication issues with select fields that have hasMany: true enabled

Migration Guide

No migration steps are required for this update. This is a bug fix release that can be safely installed without any additional configuration changes.

Upgrade Recommendations

This release contains important bug fixes for PostgreSQL users and anyone using select fields with hasMany: true. We recommend all users upgrade to v2.30.3, especially if you:

  • Use PostgreSQL as your database
  • Work with document duplication functionality
  • Use select fields with hasMany: true option

To upgrade, run:

npm install [email protected]
# or
yarn add [email protected]
# or
pnpm add [email protected]

Bug Fixes

PostgreSQL Migration Creation Errors

Fixed an issue where the migrate:create command would fail when working with previous schemas in PostgreSQL. This resolves issue #8782, ensuring more reliable database migration workflows for PostgreSQL users.

Document Duplication with Select HasMany Fields

Resolved a bug that caused issues when duplicating documents containing select fields with hasMany: true option. The fix prevents sending the ID of the current document to the post/patch payload during duplication, which was causing conflicts specifically with PostgreSQL. This addresses issue #6522.

New Features

No new features were added in this release.

Security Updates

No security fixes were included in this release.

Performance Improvements

No specific performance improvements were included in this release.

Impact Summary

This release focuses on bug fixes that improve compatibility and reliability, particularly for PostgreSQL users. The fixes address specific issues with database migrations and document duplication functionality.

The PostgreSQL migration fix ensures that developers can reliably create migrations when working with previous schemas, preventing errors during the database migration workflow.

The select field duplication fix resolves an issue where duplicating documents with hasMany: true select fields would cause problems, particularly in PostgreSQL environments. This improves the content editing experience by ensuring that document duplication works correctly in all scenarios.

While these changes are targeted at specific use cases, they contribute to the overall stability of Payload CMS, especially for users leveraging PostgreSQL as their database solution.

Full Release Notes

2.30.3 (2024-10-18)

Bug Fixes

  • db-postgres: migrate:create errors with previous schemas (#8786) (e9c1222)
  • duplicate with select hasMany fields (#8734) (c8ed645)

Statistics:

File Changed11
Line Additions2,393
Line Deletions6
Line Changes2,399
Total Commits5

User Affected:

  • Fixed migration creation errors when working with previous schemas
  • Resolved issues with duplicating documents containing select fields with `hasMany: true`

Contributors:

denolfer1tsuu