mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: add ai tasks migrations (#18359)
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 the `has_ai_task` columns. It was an oversight on my part when I wrote the RFC - I assumed the `DEFAULT 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 the `NOT NULL` constraints.
This commit is contained in:
@@ -147,6 +147,8 @@ sql:
|
||||
crypto_key_feature_workspace_apps_api_key: CryptoKeyFeatureWorkspaceAppsAPIKey
|
||||
crypto_key_feature_oidc_convert: CryptoKeyFeatureOIDCConvert
|
||||
stale_interval_ms: StaleIntervalMS
|
||||
has_ai_task: HasAITask
|
||||
ai_tasks_sidebar_app_id: AITasksSidebarAppID
|
||||
rules:
|
||||
- name: do-not-use-public-schema-in-queries
|
||||
message: "do not use public schema in queries"
|
||||
|
||||
Reference in New Issue
Block a user