From c9de809d4bda1939e6867f22fef986d493888bfe Mon Sep 17 00:00:00 2001 From: Vasco Santos Date: Thu, 28 Oct 2021 17:01:18 +0200 Subject: [PATCH] fix: upload fn ts wrongly inserted (#570) --- packages/db/postgres/functions.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/db/postgres/functions.sql b/packages/db/postgres/functions.sql index ebb2bb0d41..41b2743431 100644 --- a/packages/db/postgres/functions.sql +++ b/packages/db/postgres/functions.sql @@ -93,8 +93,8 @@ BEGIN data ->> 'source_cid', (data ->> 'type')::upload_type, data ->> 'name', - (data ->> 'updated_at')::timestamptz, - (data ->> 'inserted_at')::timestamptz) + (data ->> 'inserted_at')::timestamptz, + (data ->> 'updated_at')::timestamptz) ON CONFLICT ( user_id, source_cid ) DO UPDATE SET "updated_at" = (data ->> 'updated_at')::timestamptz, "deleted_at" = null