- Notifications
You must be signed in to change notification settings - Fork913
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
101e894
to2b15938
CompareUh oh!
There was an error while loading.Please reload this page.
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 toHasAITask
?
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
2b15938
toe4e2035
Comparee4e2035
to50f1008
CompareThere 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 byreviewdog 🐶
Cannot reachhttps://splunk.com Status: null Navigation timeout of 30000 ms exceeded
categorized using any log management tool such as[Splunk](https://splunk.com). |
8e29ee5
intomainUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
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.