From 89de3ce8eaf0c3d5c41c5b7614a830cb3e6b488c Mon Sep 17 00:00:00 2001 From: schneefux Date: Sun, 26 Feb 2017 16:14:55 +0100 Subject: fix players not being linked to participant --- insert.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'insert.sql') diff --git a/insert.sql b/insert.sql index 1212c8d..df18d80 100644 --- a/insert.sql +++ b/insert.sql @@ -35,7 +35,7 @@ linked_participants AS ( 'data', participants.data-'relationships', 'relations', TO_JSONB(ARRAY( SELECT * FROM linked_players - WHERE participants.data->'relationships'->'player'->'data' = JSONB_BUILD_OBJECT('id', linked_players.data->>'id', 'type', linked_players.data->>'type') + WHERE participants.data->'relationships'->'player'->'data' = JSONB_BUILD_OBJECT('id', linked_players.data->'data'->>'id', 'type', linked_players.data->'data'->>'type') )) ) AS data FROM participants -- cgit v1.3.1