mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
chore: add derpserver to wsproxy, add proxies to derpmap (#7311)
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
BEGIN;
|
||||
|
||||
-- drop any rows that aren't primary replicas
|
||||
DELETE FROM replicas
|
||||
WHERE "primary" = false;
|
||||
|
||||
ALTER TABLE replicas
|
||||
DROP COLUMN "primary";
|
||||
|
||||
ALTER TABLE workspace_proxies
|
||||
DROP CONSTRAINT workspace_proxies_region_id_unique,
|
||||
DROP COLUMN region_id,
|
||||
DROP COLUMN derp_enabled;
|
||||
|
||||
COMMIT;
|
||||
@@ -0,0 +1,13 @@
|
||||
BEGIN;
|
||||
|
||||
ALTER TABLE replicas
|
||||
ADD COLUMN "primary" boolean NOT NULL DEFAULT true;
|
||||
|
||||
ALTER TABLE workspace_proxies
|
||||
-- Adding a serial to a table without a default value will be filled as you
|
||||
-- would expect on versions of Postgres >= 9 AFAIK (which we require).
|
||||
ADD COLUMN region_id serial NOT NULL,
|
||||
ADD COLUMN derp_enabled boolean NOT NULL DEFAULT true,
|
||||
ADD CONSTRAINT workspace_proxies_region_id_unique UNIQUE (region_id);
|
||||
|
||||
COMMIT;
|
||||
Reference in New Issue
Block a user