Skip to content

Commit cbd98e8

Browse files
committed
bug: fix issue with duplicate friends
1 parent d4edc3a commit cbd98e8

3 files changed

Lines changed: 3 additions & 1 deletion

File tree

Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
alter table "public"."friends" drop constraint "friends_player_steam_id_other_player_steam_id_key";
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
alter table "public"."friends" add constraint "friends_player_steam_id_other_player_steam_id_key" unique ("player_steam_id", "other_player_steam_id");

hasura/views/v_my_friends.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ latest_elos AS (
2929
FROM player_elo
3030
ORDER BY steam_id, created_at DESC
3131
)
32-
SELECT DISTINCT
32+
SELECT DISTINCT ON (p.steam_id, fr.friend_steam_id)
3333
p.*,
3434
fr.status,
3535
fr.friend_steam_id,

0 commit comments

Comments
 (0)