From b1310106ef144caeb1ed37ce288539273305b067 Mon Sep 17 00:00:00 2001 From: Trezy Date: Wed, 27 May 2026 15:53:11 -0500 Subject: [PATCH] fix: dont use use timestamptz in migrations (Ill remember that... one day) Signed-off-by: Trezy --- .../20260527000001_scripts_timestamptz_to_text.sql | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 migrations/postgres/20260527000001_scripts_timestamptz_to_text.sql diff --git a/migrations/postgres/20260527000001_scripts_timestamptz_to_text.sql b/migrations/postgres/20260527000001_scripts_timestamptz_to_text.sql new file mode 100644 index 0000000..995a15d --- /dev/null +++ b/migrations/postgres/20260527000001_scripts_timestamptz_to_text.sql @@ -0,0 +1,14 @@ +-- The scripts and dead_letter_scripts tables were created with TIMESTAMPTZ +-- columns, but sqlx's AnyPool driver does not support Postgres TIMESTAMPTZ. +-- Convert to TEXT to match every other table (see 20260318, 20260325). + +-- scripts +ALTER TABLE scripts ALTER COLUMN created_at DROP DEFAULT; +ALTER TABLE scripts ALTER COLUMN created_at TYPE TEXT USING created_at::text; +ALTER TABLE scripts ALTER COLUMN updated_at DROP DEFAULT; +ALTER TABLE scripts ALTER COLUMN updated_at TYPE TEXT USING updated_at::text; + +-- dead_letter_scripts +ALTER TABLE dead_letter_scripts ALTER COLUMN created_at DROP DEFAULT; +ALTER TABLE dead_letter_scripts ALTER COLUMN created_at TYPE TEXT USING created_at::text; +ALTER TABLE dead_letter_scripts ALTER COLUMN resolved_at TYPE TEXT USING resolved_at::text; -- 2.51.2