Created
December 13, 2017 13:06
-
-
Save fetus-hina/069c4bc444437844a60fd3f0802d5a5c to your computer and use it in GitHub Desktop.
ガチアサリ救済
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- stat.ink 管理用 SQL | |
-- ガチアサリを知らないクライアントで、イカリング2のJSONをそのまま送ってくれるやつの場合に | |
-- JSONの内容を検査してガチアサリと設定するための SQL | |
-- rule_id = 5 : ガチアサリの ID をハードコード | |
-- "battle2"."created_at" >= '2017-12-13T11:00:00+09:00' : ver 2.1.0 リリース日時(ガチアサリは絶対これ以降) | |
-- "battle2"."id" >= 243190 : 上の日時フィルタの具体的な最小ID(本来どちらかでいい。明示的に&インデックス用) | |
UPDATE "battle2" | |
SET "rule_id" = 5 | |
FROM "battle2_splatnet" | |
WHERE "battle2"."id" = "battle2_splatnet"."id" | |
AND "battle2"."created_at" >= '2017-12-13T11:00:00+09:00' | |
AND "battle2"."id" >= 243190 | |
AND "battle2"."rule_id" IS NULL | |
AND "battle2_splatnet"."json"->'rule'->>'key' = 'clam_blitz'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment