Skip to content

Commit

Permalink
fix: migration order
Browse files Browse the repository at this point in the history
  • Loading branch information
jahzielv committed Oct 25, 2024
1 parent 3bc1d50 commit 8625854
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import (
)

func init() {
MigrationClient.AddMigration(Up_20240925111236, Down_20240925111236)
MigrationClient.AddMigration(Up_20241025111236, Down_20241025111236)
}

func Up_20240925111236(tx *sql.Tx) error {
func Up_20241025111236(tx *sql.Tx) error {
_, err := tx.Exec(`ALTER TABLE software_installers ADD COLUMN install_during_setup BOOL NOT NULL DEFAULT false`)
if err != nil {
return fmt.Errorf("failed to add install_during_setup to software_installers: %w", err)
Expand All @@ -23,6 +23,6 @@ func Up_20240925111236(tx *sql.Tx) error {
return nil
}

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

func init() {
MigrationClient.AddMigration(Up_20240925112748, Down_20240925112748)
MigrationClient.AddMigration(Up_20241025112748, Down_20241025112748)
}

func Up_20240925112748(tx *sql.Tx) error {
func Up_20241025112748(tx *sql.Tx) error {
_, err := tx.Exec(`
CREATE TABLE setup_experience_scripts (
id INT UNSIGNED NOT NULL AUTO_INCREMENT,
Expand Down Expand Up @@ -96,6 +96,6 @@ CREATE TABLE setup_experience_status_results (
return nil
}

func Down_20240925112748(tx *sql.Tx) error {
func Down_20241025112748(tx *sql.Tx) error {
return nil
}
Loading

0 comments on commit 8625854

Please sign in to comment.