Data migrations #625
Replies: 2 comments 6 replies
-
Ah! This one slipped by unanswered, we've had a few discussions about what can be done to handle migrations as data changes. With no-sql you don't hit errors like you might with SQL but it can lead to nasty bugs for frontends that receive bad data. In other disscussions we've recommended using the mongoose-migrate package. Would love to hear your experience if you do go this route. |
Beta Was this translation helpful? Give feedback.
-
I made a sample repo that has migrations inside a Payload project using I'll write a blog post about it and depending on reception, it could be added to the Payload docs. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
We just completed a web project and are using Payload CMS in production; great tool!
We ran into an issue whereby improperly named fields - e.g. 'locking-system' - broke the server connection to GraphQL. Lesson learned, always use camel case or snake case. The error message was:
Names must match /^[_a-zA-Z][_a-zA-Z0-9]*$/ but \"locking-system\" does not.
While there seem to be two NPM packages for migrations with Mongo/Mongoose, some sort of database migration tool would be critical with a larger data set.
Does Payload have any plans in this regard or solution they recommend from previous project experience?
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions