feat: allow disabling autostart and custom autostop for template (#6933)

API only, frontend in upcoming PR.
This commit is contained in:
Dean Sheather
2023-04-04 22:48:35 +10:00
committed by GitHub
parent 083fc89f93
commit e33941b7c2
65 changed files with 1433 additions and 486 deletions

View File

@ -3,4 +3,4 @@ ALTER TABLE "templates" DROP COLUMN "min_autostart_interval";
-- rename "max_ttl" to "default_ttl" on "templates" table
ALTER TABLE "templates" RENAME COLUMN "max_ttl" TO "default_ttl";
COMMENT ON COLUMN templates.default_ttl IS 'The default duration for auto-stop for workspaces created from this template.';
COMMENT ON COLUMN templates.default_ttl IS 'The default duration for autostop for workspaces created from this template.';

View File

@ -0,0 +1,3 @@
ALTER TABLE "templates"
DROP COLUMN "allow_user_autostart",
DROP COLUMN "allow_user_autostop";

View File

@ -0,0 +1,9 @@
ALTER TABLE "templates"
ADD COLUMN "allow_user_autostart" boolean DEFAULT true NOT NULL,
ADD COLUMN "allow_user_autostop" boolean DEFAULT true NOT NULL;
COMMENT ON COLUMN "templates"."allow_user_autostart"
IS 'Allow users to specify an autostart schedule for workspaces (enterprise).';
COMMENT ON COLUMN "templates"."allow_user_autostop"
IS 'Allow users to specify custom autostop values for workspaces (enterprise).';