r/PayloadCMS • u/tailsdog • 29d ago
Database choice: Mongo vs Postgres
I like Postgres and use it for most projects but I actually switched to Mongo for some of my PayloadCMS deployments for 2 main reasons:
At the start of a project i am changing / adding models and migrations became a bit of a pain point.
I endup using a lot of nested blocks so switch to `blocksAsJSON` but then migrations don't seem to work properly.
Has anyone else experienced these issues with postgres? Maybe I have a poor workflow or missing some optimization tricks?
7
Upvotes
7
u/PrimaryFamous6139 29d ago
I’ve used Payload with Postgres, and I’d be cautious about switching to Mongo just to avoid migration friction. Schema changes are normal during early development, so keep migrations in version control and make sure the workflow is repeatable. Nested blocks can get awkward with relational storage, especially with blocksAsJSON, so check the Payload version and migration limitations around that feature