chore: support the has_ai_task column in template version and workspace insert queries (#18385)

https://github.com/coder/coder/pull/18359 added the `has_ai_task`
columns on the `workspace_builds` and `template_versions` tables.
This commit is contained in:
Hugo Dutka
2025-06-16 16:07:16 +02:00
committed by GitHub
parent d5624668d4
commit fa86cc4adf
7 changed files with 26 additions and 8 deletions
+3
View File
@@ -1730,6 +1730,9 @@ func (api *API) postTemplateVersionsByOrganization(rw http.ResponseWriter, r *ht
String: req.ExampleID,
Valid: req.ExampleID != "",
},
// appease the exhaustruct linter
// TODO: set this to whether the template version defines a `coder_ai_task` tf resource
HasAITask: false,
})
if err != nil {
if database.IsUniqueViolation(err, database.UniqueTemplateVersionsTemplateIDNameKey) {