Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f11f942

Browse files
committed
RED: add migrations and make gen
1 parent 1713431 commit f11f942

File tree

6 files changed

+36
-16
lines changed

6 files changed

+36
-16
lines changed

coderd/database/dump.sql

Lines changed: 3 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
ALTER TABLE ONLY templates DROP COLUMN IF EXISTS max_ttl;
2+
ALTER TABLE ONLY templates DROP COLUMN IF EXISTS min_autostart_interval;
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
ALTER TABLE ONLY templates ADD COLUMN IF NOT EXISTS max_ttl BIGINT NOT NULL DEFAULT 604800000000000; -- 168 hours
2+
ALTER TABLE ONLY templates ADD COLUMN IF NOT EXISTS min_autostart_interval BIGINT NOT NULL DEFAULT 3600000000000; -- 1 hour

coderd/database/models.go

Lines changed: 11 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/database/queries.sql.go

Lines changed: 15 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

site/src/api/typesGenerated.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ export interface CreateTemplateRequest {
6363
readonly description?: string
6464
readonly template_version_id: string
6565
readonly parameter_values?: CreateParameterRequest[]
66+
readonly max_ttl_ms?: number
67+
readonly min_autostart_interval_ms?: number
6668
}
6769

6870
// From codersdk/templateversions.go:121:6
@@ -96,7 +98,7 @@ export interface CreateWorkspaceBuildRequest {
9698
readonly state?: string
9799
}
98100

99-
// From codersdk/organizations.go:67:6
101+
// From codersdk/organizations.go:76:6
100102
export interface CreateWorkspaceRequest {
101103
readonly template_id: string
102104
readonly name: string

0 commit comments

Comments
 (0)