mirror of
https://github.com/empayre/fleet.git
synced 2024-11-06 08:55:24 +00:00
update order of migrations
This commit is contained in:
parent
b886362ef2
commit
9cf4239b09
@ -5,14 +5,14 @@ import (
|
||||
)
|
||||
|
||||
func init() {
|
||||
MigrationClient.AddMigration(Up_20231009094540, Down_20231009094540)
|
||||
MigrationClient.AddMigration(Up_20231009094542, Down_20231009094542)
|
||||
}
|
||||
|
||||
func Up_20231009094540(tx *sql.Tx) error {
|
||||
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_20231009094540(tx *sql.Tx) error {
|
||||
func Down_20231009094542(tx *sql.Tx) error {
|
||||
return nil
|
||||
}
|
@ -6,7 +6,7 @@ import (
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func TestUp_20231009094540(t *testing.T) {
|
||||
func TestUp_20231009094542(t *testing.T) {
|
||||
db := applyUpToPrev(t)
|
||||
|
||||
idxExists := indexExists(db, "scripts", "idx_scripts_team_name")
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user