- Notifications
You must be signed in to change notification settings - Fork929
chore: make has_ai_task fields on workspace builds and template versions nullable#18403
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
Merged
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes from1 commit
Commits
Show all changes
2 commits Select commitHold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
NextNext commit
migrations
- Loading branch information
Uh oh!
There was an error while loading.Please reload this page.
commit5e90dc256658db4b6046f1c076243b45b490a608
There are no files selected for viewing
4 changes: 4 additions & 0 deletionscoderd/database/migrations/000337_nullable_has_ai_task.down.sql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
ALTER TABLE template_versions ALTER COLUMN has_ai_task SET DEFAULT false; | ||
ALTER TABLE template_versions ALTER COLUMN has_ai_task SET NOT NULL; | ||
ALTER TABLE workspace_builds ALTER COLUMN has_ai_task SET DEFAULT false; | ||
ALTER TABLE workspace_builds ALTER COLUMN has_ai_task SET NOT NULL; |
7 changes: 7 additions & 0 deletionscoderd/database/migrations/000337_nullable_has_ai_task.up.sql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
-- 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. | ||
ALTERTABLE template_versions ALTER COLUMN has_ai_task DROP DEFAULT; | ||
ALTERTABLE template_versions ALTER COLUMN has_ai_task DROPNOT NULL; | ||
ALTERTABLE workspace_builds ALTER COLUMN has_ai_task DROP DEFAULT; | ||
ALTERTABLE workspace_builds ALTER COLUMN has_ai_task DROPNOT NULL; |
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.