How to prevent Payload CMS from modifying database schema for specific collections? #12035
Unanswered
pankajyadav05
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm using Payload CMS v3.31.0 with PostgreSQL and I need to prevent Payload from modifying the database schema for a specific collection (Profiles) while allowing it to manage the schema for other collections.
Current Behavior
When I start my application, Payload CMS automatically modifies the database schema for all collections, including removing fields that exist in the database but are not defined in the collection configuration.
Expected Behavior
I should be able to disable schema synchronization for specific collections while keeping it enabled for others.
Environment
Additional Context
I have fields in my database that aren't defined in my Payload collection configuration, and I don't want Payload to remove these fields when the application starts. I need a way to tell Payload to leave the database schema for the Profiles collection untouched.
Is there a recommended approach for this use case? Any help would be greatly appreciated!
Beta Was this translation helpful? Give feedback.
All reactions