Skip to content

Commit

Permalink
Add index on host_uuid to mdm_idp_accounts table (#20355)
Browse files Browse the repository at this point in the history
  • Loading branch information
gillespi314 committed Jul 10, 2024
1 parent 4d474a1 commit 375c1bc
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package tables

import (
"database/sql"
"fmt"
)

func init() {
MigrationClient.AddMigration(Up_20240710152744, Down_20240710152744)
}

func Up_20240710152744(tx *sql.Tx) error {
_, err := tx.Exec(`
ALTER TABLE mdm_idp_accounts
ADD INDEX idx_mdm_idp_accounts_host_uuid (host_uuid)`,
)
if err != nil {
return fmt.Errorf("failed to add idx_mdm_idp_accounts_host_uuid: %w", err)
}
return nil
}

func Down_20240710152744(tx *sql.Tx) error {
return nil
}
Loading

0 comments on commit 375c1bc

Please sign in to comment.