kevlened / fireway

A schema migration tool for firestore
MIT License
279 stars 41 forks source link

Feat/proxy firestore #19

Closed jozefcipa closed 3 years ago

jozefcipa commented 3 years ago

This PR brings a lot of changes, also some breaking ones.

Disclaimer: I suppose you won't merge this as it changes a lot of stuff but maybe some things might be useful and integrated as small PRs 🤔

kevlened commented 3 years ago

Thanks for opening this PR, it has some good ideas. Proxy is an interesting solution. It requires some cleverness to recursively handle the chained paths below, but still seems safer than modifying the underlying prototypes.

await firestore.doc('collection/doc').delete();
await firestore.doc('collection/doc').collection('collection').doc('doc').delete();
await firestore.collection('collection').doc('doc').collection('collection').doc('doc').delete();
// etc

I'm closing this for now, but thanks again!