From 0b8f7dc4b39722e4c26c2108d5e8854485943387 Mon Sep 17 00:00:00 2001
From: schneefux <schneefux+commit@schneefux.xyz>
Date: Sun, 5 Mar 2017 16:32:44 +0100
Subject: hotfix: filter casual/ranked matches

---
 insert.sql | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'insert.sql')

diff --git a/insert.sql b/insert.sql
index df18d80..6ce34a6 100644
--- a/insert.sql
+++ b/insert.sql
@@ -67,7 +67,7 @@ linked_matches AS (
 ),
 -- insert!
 insert_matches AS (
-  INSERT INTO match(id, data) SELECT * FROM linked_matches
+  INSERT INTO match(id, data) SELECT * FROM linked_matches WHERE linked_matches.data->'data'->'attributes'->>'gameMode'='casual' OR linked_matches.data->'data'->'attributes'->>'gameMode'='ranked'
   ON CONFLICT(id) DO NOTHING
   RETURNING id
 )
-- 
cgit v1.3.1

