Skip to content

Commit

Permalink
fix(cluster): split up backfill query from schema change
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanFlurry authored and MasterPtato committed Aug 6, 2024
1 parent 954d864 commit 2f51bb8
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,27 +26,3 @@ 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;
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
-- 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 2f51bb8

Please sign in to comment.