-
Notifications
You must be signed in to change notification settings - Fork 432
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7fa51b6
commit f72c63c
Showing
3 changed files
with
80 additions
and
2 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
...store/mysql/migrations/tables/20240925111236_AddInstallDuringSetupToSoftwareInstallers.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package tables | ||
|
||
import ( | ||
"database/sql" | ||
"fmt" | ||
) | ||
|
||
func init() { | ||
MigrationClient.AddMigration(Up_20240925111236, Down_20240925111236) | ||
} | ||
|
||
func Up_20240925111236(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) | ||
} | ||
|
||
_, err = tx.Exec(`ALTER TABLE vpp_apps_teams ADD COLUMN install_during_setup BOOL NOT NULL DEFAULT false`) | ||
if err != nil { | ||
return fmt.Errorf("failed to add vpp_apps_teams to software_installers: %w", err) | ||
} | ||
|
||
return nil | ||
} | ||
|
||
func Down_20240925111236(tx *sql.Tx) error { | ||
return nil | ||
} |
35 changes: 35 additions & 0 deletions
35
server/datastore/mysql/migrations/tables/20240925112748_AddSetupExperienceResultsTable.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package tables | ||
|
||
import ( | ||
"database/sql" | ||
"fmt" | ||
) | ||
|
||
func init() { | ||
MigrationClient.AddMigration(Up_20240925112748, Down_20240925112748) | ||
} | ||
|
||
func Up_20240925112748(tx *sql.Tx) error { | ||
_, err := tx.Exec(` | ||
CREATE TABLE setup_experience_status_results ( | ||
id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, | ||
host_uuid VARCHAR(255) COLLATE utf8mb4_unicode_ci NOT NULL, | ||
type VARCHAR(255) COLLATE utf8mb4_unicode_ci NOT NULL, | ||
name VARCHAR(255) COLLATE utf8mb4_unicode_ci NOT NULL, | ||
status VARCHAR(255) COLLATE utf8mb4_unicode_ci NOT NULL, | ||
execution_id VARCHAR(255) COLLATE utf8mb4_unicode_ci NOT NULL, | ||
error VARCHAR(255) COLLATE utf8mb4_unicode_ci NOT NULL, | ||
PRIMARY KEY (id) | ||
) | ||
`) | ||
if err != nil { | ||
return fmt.Errorf("failed to create setup_experience_status_results table: %w", err) | ||
} | ||
|
||
return nil | ||
} | ||
|
||
func Down_20240925112748(tx *sql.Tx) error { | ||
return nil | ||
} |
Oops, something went wrong.