Skip to content

Commit

Permalink
fix(clusters): backfill json columns (#1015)
Browse files Browse the repository at this point in the history
<!-- Please make sure there is an issue that this PR is correlated to. -->

## Changes

<!-- If there are frontend changes, please include screenshots. -->
  • Loading branch information
MasterPtato committed Aug 6, 2024
1 parent 53c3aeb commit 2292103
Showing 1 changed file with 25 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,28 @@ CREATE TABLE server_images2 (

PRIMARY KEY (provider, install_hash, datacenter_id, pool_type)
);

-- Backfill
UPDATE datacenters
SET provider2 = '"Linode"'
WHERE provider = 0;

UPDATE servers
SET pool_type2 = '"Job"'
WHERE pool_type = 0;
UPDATE servers
SET pool_type2 = '"Gg"'
WHERE pool_type = 1;
UPDATE servers
SET pool_type2 = '"Ats"'
WHERE pool_type = 2;

UPDATE datacenter_tls
SET state2 = '"Creating"'
WHERE state = 0;
UPDATE datacenter_tls
SET state2 = '"Active"'
WHERE state = 1;
UPDATE datacenter_tls
SET state2 = '"Renewing"'
WHERE state = 2;

0 comments on commit 2292103

Please sign in to comment.