mirror of
https://github.com/empayre/fleet.git
synced 2024-11-06 00:45:19 +00:00
Add missing index to MDM Windows enrollments table (#17559)
This commit is contained in:
parent
2522cc5ef6
commit
0f8192348b
@ -1 +1,2 @@
|
||||
* Added Windows MDM support to the `osquery-perf` host-simulation command.
|
||||
* Added a missing database index to the MDM Windows enrollments table that will improve performance at scale.
|
||||
|
@ -0,0 +1,25 @@
|
||||
package tables
|
||||
|
||||
import (
|
||||
"database/sql"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
func init() {
|
||||
MigrationClient.AddMigration(Up_20240312103753, Down_20240312103753)
|
||||
}
|
||||
|
||||
func Up_20240312103753(tx *sql.Tx) error {
|
||||
_, err := tx.Exec(`
|
||||
ALTER TABLE mdm_windows_enrollments
|
||||
ADD INDEX idx_mdm_windows_enrollments_mdm_device_id (mdm_device_id)`,
|
||||
)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to add index to mdm_windows_enrollments.mdm_device_id: %w", err)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func Down_20240312103753(tx *sql.Tx) error {
|
||||
return nil
|
||||
}
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user