Skip to content

bug(coderd/database): workspaces.last_used_at is missing timezone component #9682

Closed
@johnstcn

Description

@johnstcn

There's no comment on the DB field explaining the reasoning, so it's definitely a bug.

The migration that added it made a mistake of using timestamp vs timestamptz.

000043_workspace_last_used.up.sql
2:    ADD COLUMN last_used_at timestamp NOT NULL DEFAULT '0001-01-01 00:00:00+00:00';

(See conflict between default value and field type.)

We should probably lint this somehow and prevent addition of timestamp columns unless //nolinted.

Originally posted by @mafredri in #9672 (comment)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions