diff --git a/pkg/app/ops/firestoreindexensurer/indexes.json b/pkg/app/ops/firestoreindexensurer/indexes.json index e1c0a5f325..5b3f86e1d6 100644 --- a/pkg/app/ops/firestoreindexensurer/indexes.json +++ b/pkg/app/ops/firestoreindexensurer/indexes.json @@ -1,4 +1,113 @@ [ + { + "collectionGroup": "Application", + "queryScope": "COLLECTION", + "fields": [ + { + "fieldPath": "ProjectId", + "order": "ASCENDING", + "arrayConfig": "" + }, + { + "fieldPath": "PipedId", + "order": "ASCENDING", + "arrayConfig": "" + }, + { + "fieldPath": "Disabled", + "order": "ASCENDING", + "arrayConfig": "" + }, + { + "fieldPath": "Id", + "order": "ASCENDING", + "arrayConfig": "" + } + ] + }, + { + "collectionGroup": "Application", + "queryScope": "COLLECTION", + "fields": [ + { + "fieldPath": "ProjectId", + "order": "ASCENDING", + "arrayConfig": "" + }, + { + "fieldPath": "Disabled", + "order": "ASCENDING", + "arrayConfig": "" + }, + { + "fieldPath": "Name", + "order": "ASCENDING", + "arrayConfig": "" + }, + { + "fieldPath": "Id", + "order": "ASCENDING", + "arrayConfig": "" + } + ] + }, + { + "collectionGroup": "Application", + "queryScope": "COLLECTION", + "fields": [ + { + "fieldPath": "ProjectId", + "order": "ASCENDING", + "arrayConfig": "" + }, + { + "fieldPath": "Disabled", + "order": "ASCENDING", + "arrayConfig": "" + }, + { + "fieldPath": "Kind", + "order": "ASCENDING", + "arrayConfig": "" + }, + { + "fieldPath": "Id", + "order": "ASCENDING", + "arrayConfig": "" + } + ] + }, + { + "collectionGroup": "Application", + "queryScope": "COLLECTION", + "fields": [ + { + "fieldPath": "ProjectId", + "order": "ASCENDING", + "arrayConfig": "" + }, + { + "fieldPath": "Disabled", + "order": "ASCENDING", + "arrayConfig": "" + }, + { + "fieldPath": "Name", + "order": "ASCENDING", + "arrayConfig": "" + }, + { + "fieldPath": "Kind", + "order": "ASCENDING", + "arrayConfig": "" + }, + { + "fieldPath": "Id", + "order": "ASCENDING", + "arrayConfig": "" + } + ] + }, { "collectionGroup": "Application", "queryScope": "COLLECTION", @@ -141,6 +250,27 @@ } ] }, + { + "collectionGroup": "Application", + "queryScope": "COLLECTION", + "fields": [ + { + "fieldPath": "ProjectId", + "order": "ASCENDING", + "arrayConfig": "" + }, + { + "fieldPath": "Disabled", + "order": "ASCENDING", + "arrayConfig": "" + }, + { + "fieldPath": "Id", + "order": "ASCENDING", + "arrayConfig": "" + } + ] + }, { "collectionGroup": "Command", "queryScope": "COLLECTION", @@ -550,6 +680,53 @@ } ] }, + { + "collectionGroup": "Event", + "queryScope": "COLLECTION", + "fields": [ + { + "fieldPath": "ProjectId", + "order": "ASCENDING", + "arrayConfig": "" + }, + { + "fieldPath": "CreatedAt", + "order": "DESCENDING", + "arrayConfig": "" + }, + { + "fieldPath": "Id", + "order": "ASCENDING", + "arrayConfig": "" + } + ] + }, + { + "collectionGroup": "Event", + "queryScope": "COLLECTION", + "fields": [ + { + "fieldPath": "ProjectId", + "order": "ASCENDING", + "arrayConfig": "" + }, + { + "fieldPath": "Status", + "order": "ASCENDING", + "arrayConfig": "" + }, + { + "fieldPath": "CreatedAt", + "order": "ASCENDING", + "arrayConfig": "" + }, + { + "fieldPath": "Id", + "order": "ASCENDING", + "arrayConfig": "" + } + ] + }, { "collectionGroup": "DeploymentChain", "queryScope": "COLLECTION", diff --git a/pkg/app/ops/firestoreindexensurer/indexes_test.go b/pkg/app/ops/firestoreindexensurer/indexes_test.go index 35892ee4a8..8b0ab7fbf3 100644 --- a/pkg/app/ops/firestoreindexensurer/indexes_test.go +++ b/pkg/app/ops/firestoreindexensurer/indexes_test.go @@ -23,6 +23,115 @@ import ( func TestParseIndexes(t *testing.T) { want := []index{ + { + CollectionGroup: "Application", + QueryScope: "COLLECTION", + Fields: []field{ + { + FieldPath: "ProjectId", + Order: "ASCENDING", + ArrayConfig: "", + }, + { + FieldPath: "PipedId", + Order: "ASCENDING", + ArrayConfig: "", + }, + { + FieldPath: "Disabled", + Order: "ASCENDING", + ArrayConfig: "", + }, + { + FieldPath: "Id", + Order: "ASCENDING", + ArrayConfig: "", + }, + }, + }, + { + CollectionGroup: "Application", + QueryScope: "COLLECTION", + Fields: []field{ + { + FieldPath: "ProjectId", + Order: "ASCENDING", + ArrayConfig: "", + }, + { + FieldPath: "Disabled", + Order: "ASCENDING", + ArrayConfig: "", + }, + { + FieldPath: "Name", + Order: "ASCENDING", + ArrayConfig: "", + }, + { + FieldPath: "Id", + Order: "ASCENDING", + ArrayConfig: "", + }, + }, + }, + { + CollectionGroup: "Application", + QueryScope: "COLLECTION", + Fields: []field{ + { + FieldPath: "ProjectId", + Order: "ASCENDING", + ArrayConfig: "", + }, + { + FieldPath: "Disabled", + Order: "ASCENDING", + ArrayConfig: "", + }, + { + FieldPath: "Kind", + Order: "ASCENDING", + ArrayConfig: "", + }, + { + FieldPath: "Id", + Order: "ASCENDING", + ArrayConfig: "", + }, + }, + }, + { + CollectionGroup: "Application", + QueryScope: "COLLECTION", + Fields: []field{ + { + FieldPath: "ProjectId", + Order: "ASCENDING", + ArrayConfig: "", + }, + { + FieldPath: "Disabled", + Order: "ASCENDING", + ArrayConfig: "", + }, + { + FieldPath: "Name", + Order: "ASCENDING", + ArrayConfig: "", + }, + { + FieldPath: "Kind", + Order: "ASCENDING", + ArrayConfig: "", + }, + { + FieldPath: "Id", + Order: "ASCENDING", + ArrayConfig: "", + }, + }, + }, { CollectionGroup: "Application", QueryScope: "COLLECTION", @@ -165,6 +274,27 @@ func TestParseIndexes(t *testing.T) { }, }, }, + { + CollectionGroup: "Application", + QueryScope: "COLLECTION", + Fields: []field{ + { + FieldPath: "ProjectId", + Order: "ASCENDING", + ArrayConfig: "", + }, + { + FieldPath: "Disabled", + Order: "ASCENDING", + ArrayConfig: "", + }, + { + FieldPath: "Id", + Order: "ASCENDING", + ArrayConfig: "", + }, + }, + }, { CollectionGroup: "Command", QueryScope: "COLLECTION", @@ -574,6 +704,53 @@ func TestParseIndexes(t *testing.T) { }, }, }, + { + CollectionGroup: "Event", + QueryScope: "COLLECTION", + Fields: []field{ + { + FieldPath: "ProjectId", + Order: "ASCENDING", + ArrayConfig: "", + }, + { + FieldPath: "CreatedAt", + Order: "DESCENDING", + ArrayConfig: "", + }, + { + FieldPath: "Id", + Order: "ASCENDING", + ArrayConfig: "", + }, + }, + }, + { + CollectionGroup: "Event", + QueryScope: "COLLECTION", + Fields: []field{ + { + FieldPath: "ProjectId", + Order: "ASCENDING", + ArrayConfig: "", + }, + { + FieldPath: "Status", + Order: "ASCENDING", + ArrayConfig: "", + }, + { + FieldPath: "CreatedAt", + Order: "ASCENDING", + ArrayConfig: "", + }, + { + FieldPath: "Id", + Order: "ASCENDING", + ArrayConfig: "", + }, + }, + }, { CollectionGroup: "DeploymentChain", QueryScope: "COLLECTION",