update order of migrations
This commit is contained in:
+3
-3
@@ -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
|
||||
}
|
||||
+1
-1
@@ -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
Reference in New Issue
Block a user