Skip to content

Commit

Permalink
fix not-null constraint removal in migration 24
Browse files Browse the repository at this point in the history
  • Loading branch information
majewsky committed Sep 12, 2023
1 parent 90b7318 commit 481ae2f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/db/migrations.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,8 @@ var sqlMigrations = map[string]string{
DROP COLUMN scraped_at;
ALTER TABLE cluster_resources
ALTER COLUMN capacitor_id DROP DEFAULT;
ALTER TABLE cluster_resources
ALTER COLUMN capacitor_id SET NOT NULL;
`,
"024_move_capacity_scrape_timestamps.down.sql": `
ALTER TABLE cluster_capacitors
Expand All @@ -176,6 +178,8 @@ var sqlMigrations = map[string]string{
ADD COLUMN scraped_at TIMESTAMP NOT NULL DEFAULT NOW();
ALTER TABLE cluster_resources
ALTER COLUMN capacitor_id DROP NOT NULL;
ALTER TABLE cluster_resources
ALTER COLUMN capacitor_id SET DEFAULT NULL;
`,
"025_capacity_scan_rework.up.sql": `
ALTER TABLE cluster_capacitors
Expand Down

0 comments on commit 481ae2f

Please sign in to comment.