Ever want to update a bunch of documents in your Firebase collection(s)? Usually you have to write a custom script to do a mass update, but with a new feature in FireDrill you can now do batch updates without writing any code. Let's take a look.
First, run your query to get the documents you want to update. We've also added text filtering so you can perform compound filters! Here we are querying the track collection and applying some filters.
Now that we have our documents we want to update, lets update them.
Open the hamburger menu on the right and select Update Results.
Now we see a dialog. Here we can add a new field/value or update an existing field. Click the Add Field button. Enter a new field/value or enter an existing field name and value you want to update.
Now click Save. Boom! All documents (within this filter and limit) have been updated!
If you like the new bulk updating and text filtering, please let me know by adding a star to the Github repo. Thanks!
Top comments (0)