Unified Storage: Add index for poller query (#95293)

add index for poller query
This commit is contained in:
owensmallwood 2024-10-23 15:40:56 -06:00 committed by GitHub
parent d89235aa8c
commit 2ffb88b0ee
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -105,5 +105,9 @@ func initResourceTables(mg *migrator.Migrator) string {
Name: "previous_resource_version", Type: migrator.DB_BigInt, Nullable: true, Name: "previous_resource_version", Type: migrator.DB_BigInt, Nullable: true,
})) }))
mg.AddMigration("Add index to resource_history for polling", migrator.NewAddIndexMigration(resource_history_table, &migrator.Index{
Cols: []string{"group", "resource", "resource_version"}, Type: migrator.IndexType,
}))
return marker return marker
} }