Skip to content

Commit

Permalink
sql: add migration that resets host settings
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisSchinnerl committed Nov 5, 2024
1 parent b725cf8 commit b375961
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions internal/sql/migrations.go
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,12 @@ var (
return performMigration(ctx, tx, migrationsFs, dbIdentifier, "00018_directory_buckets_2", log)
},
},
{
ID: "00019_scan_reset",
Migrate: func(tx Tx) error {
return performMigration(ctx, tx, migrationsFs, dbIdentifier, "00019_scan_reset", log)
},
},
}
}
MetricsMigrations = func(ctx context.Context, migrationsFs embed.FS, log *zap.SugaredLogger) []Migration {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
UPDATE hosts SET settings = NULL, price_table = NULL, last_scan = NULL, last_scan_success = NULL, second_to_last_scan_success = NULL WHERE 1=1;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
UPDATE hosts SET settings = NULL, price_table = NULL, last_scan = NULL, last_scan_success = NULL, second_to_last_scan_success = NULL WHERE 1=1;

0 comments on commit b375961

Please sign in to comment.