Skip to content

Commit

Permalink
chore: remove old data migrations (#5802)
Browse files Browse the repository at this point in the history
  • Loading branch information
srikanthccv authored Aug 29, 2024
1 parent 2f0d98a commit 4295a27
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 248 deletions.
153 changes: 0 additions & 153 deletions pkg/query-service/migrate/0_45_alerts_to_v4/run.go

This file was deleted.

70 changes: 0 additions & 70 deletions pkg/query-service/migrate/0_47_alerts_custom_step/run.go

This file was deleted.

25 changes: 0 additions & 25 deletions pkg/query-service/migrate/migate.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ import (

"github.com/ClickHouse/clickhouse-go/v2/lib/driver"
"github.com/jmoiron/sqlx"
alertstov4 "go.signoz.io/signoz/pkg/query-service/migrate/0_45_alerts_to_v4"
alertscustomstep "go.signoz.io/signoz/pkg/query-service/migrate/0_47_alerts_custom_step"
"go.uber.org/zap"
)

type DataMigration struct {
Expand Down Expand Up @@ -56,28 +53,6 @@ func Migrate(dsn string) error {
return err
}

if m, err := getMigrationVersion(conn, "0.45_alerts_to_v4"); err == nil && m == nil {
if err := alertstov4.Migrate(conn); err != nil {
zap.L().Error("failed to migrate 0.45_alerts_to_v4", zap.Error(err))
} else {
_, err := conn.Exec("INSERT INTO data_migrations (version, succeeded) VALUES ('0.45_alerts_to_v4', true)")
if err != nil {
return err
}
}
}

if m, err := getMigrationVersion(conn, "0.47_alerts_custom_step"); err == nil && m == nil {
if err := alertscustomstep.Migrate(conn); err != nil {
zap.L().Error("failed to migrate 0.47_alerts_custom_step", zap.Error(err))
} else {
_, err := conn.Exec("INSERT INTO data_migrations (version, succeeded) VALUES ('0.47_alerts_custom_step', true)")
if err != nil {
return err
}
}
}

return nil
}

Expand Down

0 comments on commit 4295a27

Please sign in to comment.