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

Cherry pick PR #23857 into RC v4.60.0 #23867

Merged
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 @@ -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
Loading