-
Notifications
You must be signed in to change notification settings - Fork 914
feat: add ai tasks migrations #18359
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
101e894
to
2b15938
Compare
coderd/database/models.go
Outdated
@@ -3355,6 +3355,7 @@ type TemplateVersion struct { | |||
Message string `db:"message" json:"message"` | |||
Archived bool `db:"archived" json:"archived"` | |||
SourceExampleID sql.NullString `db:"source_example_id" json:"source_example_id"` | |||
HasAiTask bool `db:"has_ai_task" json:"has_ai_task"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: can you use sqlc to correct the naming here to HasAITask
?
2b15938
to
e4e2035
Compare
e4e2035
to
50f1008
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 [linkspector] reported by reviewdog 🐶
Cannot reach https://splunk.com Status: null Navigation timeout of 30000 ms exceeded
coder/docs/admin/security/audit-logs.md
Line 83 in 50f1008
categorized using any log management tool such as [Splunk](https://splunk.com). |
Adds database migrations required for the Tasks feature.
There's a slight difference between the migrations in this PR and the RFC: this PR adds
NOT NULL
constraints to thehas_ai_task
columns. It was an oversight on my part when I wrote the RFC - I assumed theDEFAULT FALSE
value would make the columns implicitly NOT NULL, but that's not the case with Postgres. We have no use for the NULL value.The
DEFAULT FALSE
statement ensures that the migration will pass even when there are existing rows in the template version and workspace builds tables, so there's no danger in adding theNOT NULL
constraints.