-
Notifications
You must be signed in to change notification settings - Fork 402
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4d474a1
commit 375c1bc
Showing
2 changed files
with
29 additions
and
3 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
server/datastore/mysql/migrations/tables/20240710152744_AddIndexHostUuidMdmIdpAccounts.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |
Oops, something went wrong.