Skip to content
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 @@ -5,10 +5,10 @@ import (
)

func init() {
MigrationClient.AddMigration(Up_20251219201524, Down_20251219201524)
MigrationClient.AddMigration(Up_20251229000010, Down_20251229000010)
}

func Up_20251219201524(tx *sql.Tx) error {
func Up_20251229000010(tx *sql.Tx) error {
_, err := tx.Exec(`
CREATE TABLE IF NOT EXISTS software_update_schedules (
id INT UNSIGNED NOT NULL AUTO_INCREMENT,
Expand All @@ -35,6 +35,6 @@ func Up_20251219201524(tx *sql.Tx) error {
return nil
}

func Down_20251219201524(tx *sql.Tx) error {
func Down_20251229000010(tx *sql.Tx) error {
return nil
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import (
)

func init() {
MigrationClient.AddMigration(Up_20251222163753, Down_20251222163753)
MigrationClient.AddMigration(Up_20251229000020, Down_20251229000020)
}

func Up_20251222163753(tx *sql.Tx) error {
func Up_20251229000020(tx *sql.Tx) error {
// Add a new column and a constraint that either:
// - skipped is true and command_uuid is NULL
// - skipped is false and command_uuid is NOT NULL
Expand All @@ -26,6 +26,6 @@ func Up_20251222163753(tx *sql.Tx) error {
return nil
}

func Down_20251222163753(tx *sql.Tx) error {
func Down_20251229000020(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_20251222163753(t *testing.T) {
func TestUp_20251229000020(t *testing.T) {
db := applyUpToPrev(t)

_, err := db.Exec(`
Expand Down
Loading
Loading