[REQUIRED] Environment info
firebase-tools: 7.0.2
Platform: Ubuntu
[REQUIRED] Test case
v1: indexes.json
{
"indexes": [
{
"collectionGroup": "authors",
"queryScope": "COLLECTION",
"fields": [
{
"fieldPath": "name",
"order": "ASCENDING"
},
{
"fieldPath": "born",
"order": "ASCENDING"
}
]
}
]
}
v2: indexes.json: added new index
{
"indexes": [
{
"collectionGroup": "authors",
"queryScope": "COLLECTION",
"fields": [
{
"fieldPath": "name",
"order": "ASCENDING"
},
{
"fieldPath": "born",
"order": "ASCENDING"
}
]
},
{
"collectionGroup": "authors",
"queryScope": "COLLECTION",
"fields": [
{
"fieldPath": "name",
"order": "ASCENDING"
},
{
"fieldPath": "born",
"order": "DESCENDING"
}
]
}
]
}
[REQUIRED] Steps to reproduce
- run
firebase deploy --only firestore:indexes with first version of indexes.json
- update file with additional index and re-run
[REQUIRED] Expected behavior
Both commands are successful and target firestore database contains both indices
[REQUIRED] Actual behavior
First run succeeds, but latter fails with error: Error: HTTP Error: 409, index already exists. Only first index is present.
Workaround
- Delete all indexes before deploy
- Place in indexes.json only indexes not present in database.
It would seems this has been caused by: #1120
[REQUIRED] Environment info
firebase-tools: 7.0.2
Platform: Ubuntu
[REQUIRED] Test case
v1: indexes.json
v2: indexes.json: added new index
[REQUIRED] Steps to reproduce
firebase deploy --only firestore:indexeswith first version ofindexes.json[REQUIRED] Expected behavior
Both commands are successful and target firestore database contains both indices
[REQUIRED] Actual behavior
First run succeeds, but latter fails with error:
Error: HTTP Error: 409, index already exists. Only first index is present.Workaround
It would seems this has been caused by: #1120