-
Notifications
You must be signed in to change notification settings - Fork 889
feat(coderd): add last_seen_at and version to provisioner_daemons table #11033
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
ALTER TABLE provisioner_daemons | ||
DROP COLUMN last_seen_at, | ||
DROP COLUMN version; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
ALTER TABLE provisioner_daemons | ||
ADD COLUMN last_seen_at TIMESTAMP WITH TIME ZONE NULL, | ||
ADD COLUMN version TEXT NOT NULL DEFAULT ''::TEXT; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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: just spotted, if this is
sql.NullTime
, then the property should haveomitempty
.Uh oh!
There was an error while loading. Please reload this page.
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.
Just a note here that
omitempty
isn't actually relevant. Sincesql.NullTime
is a struct, it can't be omitted even when the struct is "zero".https://go.dev/play/p/SGmN64SRt8F
Omitempty can be relevant in e.g. codersdk when we use
codersdk.NullTime
that implementsMarshalJSON
. In that case it might help with generation of TypeScript types (unless we handle the type specifically in gen).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.
I just realized that using
format
here is wrong, too (it'd be OK forcodersdk.NullTime
).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.
@mafredri sounds like
UpdatedAt
should be acodersdk.NullTime
then in the API struct?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.
Yeah @johnstcn, I think that would be better 👍🏻
Uh oh!
There was an error while loading. Please reload this page.
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.
#11037