Skip to content

Commit

Permalink
Cherry pick PR #23857 into RC v4.60.0 (#23867)
Browse files Browse the repository at this point in the history
Cherry pick PR #23857 into RC v4.60.0.
  • Loading branch information
lucasmrod authored Nov 15, 2024
1 parent b805d95 commit db35c39
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import (
)

func init() {
MigrationClient.AddMigration(Up_20241016155452, Down_20241016155452)
MigrationClient.AddMigration(Up_20241110152840, Down_20241110152840)
}

func Up_20241016155452(tx *sql.Tx) error {
func Up_20241110152840(tx *sql.Tx) error {
_, err := tx.Exec(`
CREATE TABLE yara_rules (
id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
Expand All @@ -24,6 +24,6 @@ CREATE TABLE yara_rules (
return nil
}

func Down_20241016155452(tx *sql.Tx) error {
func Down_20241110152840(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_20241030102721, Down_20241030102721)
MigrationClient.AddMigration(Up_20241110152841, Down_20241110152841)
}

func Up_20241030102721(tx *sql.Tx) error {
func Up_20241110152841(tx *sql.Tx) error {
// Add columns
_, err := tx.Exec(`ALTER TABLE mdm_configuration_profile_labels ADD COLUMN require_all BOOL NOT NULL DEFAULT false`)
if err != nil {
Expand All @@ -36,6 +36,6 @@ func Up_20241030102721(tx *sql.Tx) error {
return nil
}

func Down_20241030102721(tx *sql.Tx) error {
func Down_20241110152841(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_20241030102721(t *testing.T) {
func TestUp_20241110152841(t *testing.T) {
db := applyUpToPrev(t)

// insert 2 profiles and 2 declarations
Expand Down
Loading

0 comments on commit db35c39

Please sign in to comment.