Skip to content

Commit 0fedbd3

Browse files
committed
fix(coderd/database): migrate workspaces.last_used_at to timestamptz
1 parent 65db7a7 commit 0fedbd3

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

coderd/database/dump.sql

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
ALTER TABLE ONLY workspaces
2+
ALTER COLUMN last_used_at
3+
SET DATA TYPE timestamp
4+
USING last_used_at::timestamptz,
5+
ALTER COLUMN last_used_at
6+
SET DEFAULT '0001-01-01 00:00:00'::timestamp;
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
ALTER TABLE ONLY workspaces
2+
ALTER COLUMN last_used_at
3+
SET DATA TYPE timestamptz
4+
USING last_used_at::timestamp AT TIME ZONE 'UTC',
5+
ALTER COLUMN last_used_at
6+
SET DEFAULT '0001-01-01 00:00:00+00:00'::timestamptz;

0 commit comments

Comments
 (0)