I want to delete a specific Field for all documents in Firestore, how can I do this? Since there is no document of this question on Firebase, Stackoverflow, etc. I know it is possible to delete a Field for a single Documents using the SDK, so I have no choice to fetch all the Documents from Firestore and delete the Field for each Collections by SDK's delete()?
For example, if remove 'first_name' from 'users'
Before
Collection : users
Document: A
{
"id": "A",
"first_name": "Sid",
"last_name": "Wilson"
}
Document: B
{
"id": "B",
"first_name": "Joey",
"last_name": "Jordison"
}
Document: C
{
"id": "C",
"first_name": "Chris",
"last_name": "Fehn"
}
After
Collection : users
Document: A
{
"id": "A",
"last_name": "Wilson"
}
Document: B
{
"id": "B",
"last_name": "Jordison"
}
Document: C
{
"id": "C",
"last_name": "Fehn"
}