Skip to content

Commit

Permalink
re-timestamp migration
Browse files Browse the repository at this point in the history
  • Loading branch information
mostlikelee committed Oct 26, 2023
1 parent 37755ae commit 1fd64eb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import (
)

func init() {
MigrationClient.AddMigration(Up_20230920091442, Down_20230920091442)
MigrationClient.AddMigration(Up_20231026091442, Down_20231026091442)
}

func Up_20230920091442(tx *sql.Tx) error {
func Up_20231026091442(tx *sql.Tx) error {
stmt := `
CREATE TABLE policy_stats (
id int(10) unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY,
Expand Down Expand Up @@ -42,6 +42,6 @@ func Up_20230920091442(tx *sql.Tx) error {
return nil
}

func Down_20230920091442(tx *sql.Tx) error {
func Down_20231026091442(tx *sql.Tx) error {
return nil
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/stretchr/testify/require"
)

func TestUp_20230920091442(t *testing.T) {
func TestUp_20231026091442(t *testing.T) {
db := applyUpToPrev(t)

const (
Expand Down Expand Up @@ -50,7 +50,6 @@ func TestUp_20230920091442(t *testing.T) {
// Insert a policy_stats entry for the team inheriting the global policy
_, err = db.Exec(`INSERT INTO policy_stats (policy_id, inherited_team_id, passing_host_count, failing_host_count) VALUES (?, ?, ?, ?)`, globalPolicyStatID, teamID, 50, 5)
require.NoError(t, err)
// inheritedPolicyStatID, _ := res.LastInsertId()

// Verify the entries in the policy_stats table
var id int
Expand Down
Loading

0 comments on commit 1fd64eb

Please sign in to comment.