Skip to content

Commit

Permalink
fixed wrong sql witn timestampts
Browse files Browse the repository at this point in the history
  • Loading branch information
Szer committed Sep 28, 2023
1 parent bd5b77c commit 4cd11bb
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions src/VahterBanBot/DB.fs
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,7 @@ ON CONFLICT (id) DO UPDATE
WHEN EXCLUDED.banned_by != "user".banned_by THEN COALESCE(EXCLUDED.banned_by, "user".banned_by)
ELSE "user".banned_by
END,
created_at =
CASE
WHEN EXCLUDED.created_at != "user".created_at THEN EXCLUDED.created_at
ELSE "user".created_at
END,
updated_at =
CASE
WHEN EXCLUDED.updated_at != "user".updated_at THEN EXCLUDED.updated_at
ELSE "user".updated_at
END
updated_at = GREATEST(EXCLUDED.updated_at, "user".updated_at)
RETURNING *;
"""

Expand Down

0 comments on commit 4cd11bb

Please sign in to comment.