chore: add workspace proxies to the backend (#7032)

Co-authored-by: Dean Sheather <dean@deansheather.com>
This commit is contained in:
Steven Masley
2023-04-17 14:57:21 -05:00
committed by GitHub
parent dc5e16ae22
commit 658246d5f2
61 changed files with 3641 additions and 757 deletions

View File

@ -0,0 +1,22 @@
BEGIN;
-- It's difficult to generate tokens for existing proxies, so we'll just delete
-- them if they exist.
--
-- No one is using this feature yet as of writing this migration, so this is
-- fine.
DELETE FROM workspace_proxies;
ALTER TABLE workspace_proxies
ADD COLUMN token_hashed_secret bytea NOT NULL;
COMMENT ON COLUMN workspace_proxies.token_hashed_secret
IS 'Hashed secret is used to authenticate the workspace proxy using a session token.';
COMMENT ON COLUMN workspace_proxies.deleted
IS 'Boolean indicator of a deleted workspace proxy. Proxies are soft-deleted.';
COMMENT ON COLUMN workspace_proxies.icon
IS 'Expects an emoji character. (/emojis/1f1fa-1f1f8.png)';
COMMIT;