Open colinhowe opened 2 years ago
I'm interested to know of plans of / support of this
There isn't a way to do this automatically without storing a copy of the database (or the modified records) before the migration. It is possible to build your own rollback mechanism, but you'd have to fork the repo. That could look something like:
module.exports.migrate = async ({firestore, FieldValue}) => {
await firestore.collection('name').add({key: FieldValue.serverTimestamp()});
};
module.exports.rollback = async ({firestore}) => {
// perform your own rollback logic
};
I'm not using firestore anymore, so I don't have plans to add this feature.
Hi @kevlend, ... I know it's a off topic, but would you care to comment on why you don't use firestore anymore.. maybe you found a better alternative? I ask because I like the real time aspect of firestore, but I really miss schemas, relations and mature toolings. Thank you :-)
Hi,
Have you had any thoughts on how you might want to do reverse migrations? I'm likely to have some time to implement this and would want to do it in a way that lines up with your plans.