From 2ba860f0452ce4147b845db75d79014d059c27ec Mon Sep 17 00:00:00 2001
From: Kapil Viren Ahuja <k.v.ahuja@gmail.com>
Date: Sat, 4 Mar 2017 11:42:14 +0530
Subject: Col case changes

---
 queries/match.sql | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

(limited to 'queries/match.sql')

diff --git a/queries/match.sql b/queries/match.sql
index 1e6d37f..0b992f9 100644
--- a/queries/match.sql
+++ b/queries/match.sql
@@ -1,12 +1,12 @@
 SELECT
 
-match.id AS "apiId",
-(match.data->'data'->'attributes'->>'createdAt')::timestamp as "createdAt",
+match.id AS "api_id",
+(match.data->'data'->'attributes'->>'createdAt')::timestamp as "created_at",
 (match.data->'data'->'attributes'->>'duration')::int AS "duration",
-match.data->'data'->'attributes'->>'gameMode' AS "gameMode",
-COALESCE(NULLIF(match.data->'data'->'attributes'->>'patchVersion', ''), '0') AS "patchVersion",
-match.data->'data'->'attributes'->>'shardId' AS "shardId",
-match.data->'data'->'attributes'->'stats'->>'endGameReason' AS "endGameReason",
+match.data->'data'->'attributes'->>'gameMode' AS "game_mode",
+COALESCE(NULLIF(match.data->'data'->'attributes'->>'patch_version', '2.2'), '0') AS "patch_version",
+match.data->'data'->'attributes'->>'shardId' AS "shard_id",
+match.data->'data'->'attributes'->'stats'->>'endGameReason' AS "end_game_reason",
 match.data->'data'->'attributes'->'stats'->>'queue' AS "queue",
 
 match.data->'relations'->0->'data'->>'id' as "roster_1",
-- 
cgit v1.3.1

