chore: make has_ai_task fields on workspace builds and template versions nullable (#18403)

The fields must be nullable because there’s a period of time between
inserting a row into the database and finishing the “plan” provisioner
job when the final value of the field is unknown.
This commit is contained in:
Hugo Dutka
2025-06-17 16:08:34 +02:00
committed by GitHub
parent d6df1f23a9
commit ebc769f328
7 changed files with 27 additions and 10 deletions
+2 -2
View File
@@ -1555,7 +1555,7 @@ CREATE TABLE template_versions (
message character varying(1048576) DEFAULT ''::character varying NOT NULL,
archived boolean DEFAULT false NOT NULL,
source_example_id text,
has_ai_task boolean DEFAULT false NOT NULL
has_ai_task boolean
);
COMMENT ON COLUMN template_versions.external_auth_providers IS 'IDs of External auth providers for a specific template version';
@@ -2084,7 +2084,7 @@ CREATE TABLE workspace_builds (
daily_cost integer DEFAULT 0 NOT NULL,
max_deadline timestamp with time zone DEFAULT '0001-01-01 00:00:00+00'::timestamp with time zone NOT NULL,
template_version_preset_id uuid,
has_ai_task boolean DEFAULT false NOT NULL,
has_ai_task boolean,
ai_tasks_sidebar_app_id uuid
);