Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rearrange migration released in v4.57.2 #22605

Merged
merged 2 commits into from
Oct 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.

Loading