fleet/server/datastore/mysql/migrations/tables/20231009094542_AddIndexesToScriptContents.go
2023-10-11 13:22:28 -07:00

18 lines
343 B
Go

package tables
import (
"database/sql"
)
func init() {
MigrationClient.AddMigration(Up_20231009094542, Down_20231009094542)
}
func Up_20231009094542(tx *sql.Tx) error {
_, err := tx.Exec(`ALTER TABLE scripts ADD UNIQUE KEY idx_scripts_team_name (team_id, name)`)
return err
}
func Down_20231009094542(tx *sql.Tx) error {
return nil
}