update order of migrations

This commit is contained in:
Jacob Shandling 2023-10-11 13:22:28 -07:00
parent b886362ef2
commit 9cf4239b09
3 changed files with 5 additions and 5 deletions

View File

@ -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
}

View File

@ -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