Skip to content

Commit

Permalink
Rearrange migration released in v4.57.2 (#22605)
Browse files Browse the repository at this point in the history
#22571

`20241002104104_UpdateUninstallScript.go` will be released in v4.57.2,
thus I'm moving the unreleased migrations in main to run after it.
  • Loading branch information
lucasmrod authored Oct 2, 2024
1 parent ea62bb4 commit 7f01e20
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ import (
)

func init() {
MigrationClient.AddMigration(Up_20240927081858, Down_20240927081858)
MigrationClient.AddMigration(Up_20241002104105, Down_20241002104105)
}

func Up_20240927081858(tx *sql.Tx) error {
func Up_20241002104105(tx *sql.Tx) error {
const stmt = `
INSERT INTO labels (
name,
Expand Down Expand Up @@ -52,6 +52,6 @@ func Up_20240927081858(tx *sql.Tx) error {
return nil
}

func Down_20240927081858(tx *sql.Tx) error {
func Down_20241002104105(tx *sql.Tx) error {
return nil
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"github.com/stretchr/testify/require"
)

func TestUp_20240927081858(t *testing.T) {
func TestUp_20241002104105(t *testing.T) {
db := applyUpToPrev(t)

applyNext(t, db)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import (
)

func init() {
MigrationClient.AddMigration(Up_20240930171917, Down_20240930171917)
MigrationClient.AddMigration(Up_20241002104106, Down_20241002104106)
}

func Up_20240930171917(tx *sql.Tx) error {
func Up_20241002104106(tx *sql.Tx) error {
_, err := tx.Exec(`
ALTER TABLE queries
ADD COLUMN is_scheduled BOOLEAN GENERATED ALWAYS AS (schedule_interval > 0) STORED NOT NULL
Expand All @@ -28,6 +28,6 @@ func Up_20240930171917(tx *sql.Tx) error {
return nil
}

func Down_20240930171917(tx *sql.Tx) error {
func Down_20241002104106(tx *sql.Tx) error {
return nil
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/stretchr/testify/require"
)

func TestUp_20240930171917(t *testing.T) {
func TestUp_20241002104106(t *testing.T) {
db := applyUpToPrev(t)

//
Expand Down
2 changes: 1 addition & 1 deletion server/datastore/mysql/schema.sql

Large diffs are not rendered by default.

0 comments on commit 7f01e20

Please sign in to comment.