News for hackers. Stuff that matters.
Re:Launch HN: Payload (YC S22) – Headless CMS for Developers by 5Qn8mNbc2FNCiVV on Thursday September 01, 2022 @07:46AM (#32675029)
Question: How are migrations handled? Can I rename fields without losing my data? Can I change a relation without losing the underlying data? Are there other edgecases where I lose my data?
Re:Launch HN: Payload (YC S22) – Headless CMS for Developers by sneek_ on Thursday September 01, 2022 @12:36PM (#32678954)
Thanks to using MongoDB as a database layer, you will not lose your data if you rename fields. This is a huge benefit for NoSQL in general honestly and it is one of the reasons why we chose to move forward with Mongo initially. We will be supporting Postgres + others in the future, at which point we will be introducing a migrations pattern, but for now, you don't need to worry about that at all.

With Payload as it stands now, to migrate data from one field to another, you can make use of Payload's Local Node API to move data from one property to another with ease.