3 ms·
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 ed
by 5Qn8mNbc2FNCiVV 4y ago
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?
- sneek_ 4y agoThanks 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.