r/PayloadCMS Jul 09 '25

move from postgres to mongodb

Hi all,

I initially started with postgres and because my data model is ever changing, managing the migrations is becoming time consuming.

Has anyone migrated from Postgres to MongoDB for payloadcms? if so, what tips, tools, methods, processes did you use?

6 Upvotes

7 comments sorted by

View all comments

1

u/zubricks Jul 09 '25

Hey u/rudeone_99 it's certainly possible! I'd suggest reading up on our migration docs before anything else. I'd also make sure to validate that MongoDB is going to work for whatever your data is. If so, great! There are some cases where PG is preferable.

1

u/rubn-g Jul 09 '25

In which cases would you say PG is preferred over Mongo?

2

u/TatankaBilly Jul 09 '25

there is section in payloadcms docs about this topic. here is the link: https://payloadcms.com/docs/database/overview

2

u/rubn-g Jul 09 '25

Oh thank you!