From ed2f27704126f7a8cd5ce0ac83022c9287828a55 Mon Sep 17 00:00:00 2001 From: Marcin Tojek Date: Tue, 5 Mar 2024 14:56:50 +0100 Subject: [PATCH 1/2] fix: use timestampz instead of timestamp --- coderd/database/queries.sql.go | 14 +++++++------- coderd/database/queries/workspaces.sql | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/coderd/database/queries.sql.go b/coderd/database/queries.sql.go index f3633a47bcb3f..f98614aa16b80 100644 --- a/coderd/database/queries.sql.go +++ b/coderd/database/queries.sql.go @@ -11996,8 +11996,8 @@ WHERE UNION ALL SELECT '00000000-0000-0000-0000-000000000000'::uuid, -- id - '0001-01-01 00:00:00+00'::timestamp, -- created_at - '0001-01-01 00:00:00+00'::timestamp, -- updated_at + '0001-01-01 00:00:00+00'::timestampz, -- created_at + '0001-01-01 00:00:00+00'::timestampz, -- updated_at '00000000-0000-0000-0000-000000000000'::uuid, -- owner_id '00000000-0000-0000-0000-000000000000'::uuid, -- organization_id '00000000-0000-0000-0000-000000000000'::uuid, -- template_id @@ -12005,9 +12005,9 @@ WHERE '**TECHNICAL_ROW**', -- name '', -- autostart_schedule 0, -- ttl - '0001-01-01 00:00:00+00'::timestamp, -- last_used_at - '0001-01-01 00:00:00+00'::timestamp, -- dormant_at - '0001-01-01 00:00:00+00'::timestamp, -- deleting_at + '0001-01-01 00:00:00+00'::timestampz, -- last_used_at + '0001-01-01 00:00:00+00'::timestampz, -- dormant_at + '0001-01-01 00:00:00+00'::timestampz, -- deleting_at 'never'::automatic_updates, -- automatic_updates false, -- favorite -- Extra columns added to ` + "`" + `filtered_workspaces` + "`" + ` @@ -12015,8 +12015,8 @@ WHERE '00000000-0000-0000-0000-000000000000'::uuid, -- template_version_id '', -- template_version_name '', -- username - '0001-01-01 00:00:00+00'::timestamp, -- latest_build_completed_at, - '0001-01-01 00:00:00+00'::timestamp, -- latest_build_canceled_at, + '0001-01-01 00:00:00+00'::timestampz, -- latest_build_completed_at, + '0001-01-01 00:00:00+00'::timestampz, -- latest_build_canceled_at, '', -- latest_build_error 'start'::workspace_transition -- latest_build_transition WHERE diff --git a/coderd/database/queries/workspaces.sql b/coderd/database/queries/workspaces.sql index 66b03185116f2..1ae1de9f3db83 100644 --- a/coderd/database/queries/workspaces.sql +++ b/coderd/database/queries/workspaces.sql @@ -302,8 +302,8 @@ WHERE UNION ALL SELECT '00000000-0000-0000-0000-000000000000'::uuid, -- id - '0001-01-01 00:00:00+00'::timestamp, -- created_at - '0001-01-01 00:00:00+00'::timestamp, -- updated_at + '0001-01-01 00:00:00+00'::timestampz, -- created_at + '0001-01-01 00:00:00+00'::timestampz, -- updated_at '00000000-0000-0000-0000-000000000000'::uuid, -- owner_id '00000000-0000-0000-0000-000000000000'::uuid, -- organization_id '00000000-0000-0000-0000-000000000000'::uuid, -- template_id @@ -311,9 +311,9 @@ WHERE '**TECHNICAL_ROW**', -- name '', -- autostart_schedule 0, -- ttl - '0001-01-01 00:00:00+00'::timestamp, -- last_used_at - '0001-01-01 00:00:00+00'::timestamp, -- dormant_at - '0001-01-01 00:00:00+00'::timestamp, -- deleting_at + '0001-01-01 00:00:00+00'::timestampz, -- last_used_at + '0001-01-01 00:00:00+00'::timestampz, -- dormant_at + '0001-01-01 00:00:00+00'::timestampz, -- deleting_at 'never'::automatic_updates, -- automatic_updates false, -- favorite -- Extra columns added to `filtered_workspaces` @@ -321,8 +321,8 @@ WHERE '00000000-0000-0000-0000-000000000000'::uuid, -- template_version_id '', -- template_version_name '', -- username - '0001-01-01 00:00:00+00'::timestamp, -- latest_build_completed_at, - '0001-01-01 00:00:00+00'::timestamp, -- latest_build_canceled_at, + '0001-01-01 00:00:00+00'::timestampz, -- latest_build_completed_at, + '0001-01-01 00:00:00+00'::timestampz, -- latest_build_canceled_at, '', -- latest_build_error 'start'::workspace_transition -- latest_build_transition WHERE From 51060a8c05c9dd6bbfe32539d304a136f80894b6 Mon Sep 17 00:00:00 2001 From: Marcin Tojek Date: Tue, 5 Mar 2024 15:05:46 +0100 Subject: [PATCH 2/2] fix: timestamptz --- coderd/database/queries.sql.go | 14 +++++++------- coderd/database/queries/workspaces.sql | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/coderd/database/queries.sql.go b/coderd/database/queries.sql.go index f98614aa16b80..d39bc1bd6db4e 100644 --- a/coderd/database/queries.sql.go +++ b/coderd/database/queries.sql.go @@ -11996,8 +11996,8 @@ WHERE UNION ALL SELECT '00000000-0000-0000-0000-000000000000'::uuid, -- id - '0001-01-01 00:00:00+00'::timestampz, -- created_at - '0001-01-01 00:00:00+00'::timestampz, -- updated_at + '0001-01-01 00:00:00+00'::timestamptz, -- created_at + '0001-01-01 00:00:00+00'::timestamptz, -- updated_at '00000000-0000-0000-0000-000000000000'::uuid, -- owner_id '00000000-0000-0000-0000-000000000000'::uuid, -- organization_id '00000000-0000-0000-0000-000000000000'::uuid, -- template_id @@ -12005,9 +12005,9 @@ WHERE '**TECHNICAL_ROW**', -- name '', -- autostart_schedule 0, -- ttl - '0001-01-01 00:00:00+00'::timestampz, -- last_used_at - '0001-01-01 00:00:00+00'::timestampz, -- dormant_at - '0001-01-01 00:00:00+00'::timestampz, -- deleting_at + '0001-01-01 00:00:00+00'::timestamptz, -- last_used_at + '0001-01-01 00:00:00+00'::timestamptz, -- dormant_at + '0001-01-01 00:00:00+00'::timestamptz, -- deleting_at 'never'::automatic_updates, -- automatic_updates false, -- favorite -- Extra columns added to ` + "`" + `filtered_workspaces` + "`" + ` @@ -12015,8 +12015,8 @@ WHERE '00000000-0000-0000-0000-000000000000'::uuid, -- template_version_id '', -- template_version_name '', -- username - '0001-01-01 00:00:00+00'::timestampz, -- latest_build_completed_at, - '0001-01-01 00:00:00+00'::timestampz, -- latest_build_canceled_at, + '0001-01-01 00:00:00+00'::timestamptz, -- latest_build_completed_at, + '0001-01-01 00:00:00+00'::timestamptz, -- latest_build_canceled_at, '', -- latest_build_error 'start'::workspace_transition -- latest_build_transition WHERE diff --git a/coderd/database/queries/workspaces.sql b/coderd/database/queries/workspaces.sql index 1ae1de9f3db83..f7c52fc63abf7 100644 --- a/coderd/database/queries/workspaces.sql +++ b/coderd/database/queries/workspaces.sql @@ -302,8 +302,8 @@ WHERE UNION ALL SELECT '00000000-0000-0000-0000-000000000000'::uuid, -- id - '0001-01-01 00:00:00+00'::timestampz, -- created_at - '0001-01-01 00:00:00+00'::timestampz, -- updated_at + '0001-01-01 00:00:00+00'::timestamptz, -- created_at + '0001-01-01 00:00:00+00'::timestamptz, -- updated_at '00000000-0000-0000-0000-000000000000'::uuid, -- owner_id '00000000-0000-0000-0000-000000000000'::uuid, -- organization_id '00000000-0000-0000-0000-000000000000'::uuid, -- template_id @@ -311,9 +311,9 @@ WHERE '**TECHNICAL_ROW**', -- name '', -- autostart_schedule 0, -- ttl - '0001-01-01 00:00:00+00'::timestampz, -- last_used_at - '0001-01-01 00:00:00+00'::timestampz, -- dormant_at - '0001-01-01 00:00:00+00'::timestampz, -- deleting_at + '0001-01-01 00:00:00+00'::timestamptz, -- last_used_at + '0001-01-01 00:00:00+00'::timestamptz, -- dormant_at + '0001-01-01 00:00:00+00'::timestamptz, -- deleting_at 'never'::automatic_updates, -- automatic_updates false, -- favorite -- Extra columns added to `filtered_workspaces` @@ -321,8 +321,8 @@ WHERE '00000000-0000-0000-0000-000000000000'::uuid, -- template_version_id '', -- template_version_name '', -- username - '0001-01-01 00:00:00+00'::timestampz, -- latest_build_completed_at, - '0001-01-01 00:00:00+00'::timestampz, -- latest_build_canceled_at, + '0001-01-01 00:00:00+00'::timestamptz, -- latest_build_completed_at, + '0001-01-01 00:00:00+00'::timestamptz, -- latest_build_canceled_at, '', -- latest_build_error 'start'::workspace_transition -- latest_build_transition WHERE