summaryrefslogtreecommitdiff
path: root/butler/config.json
blob: 7c4cb0491c434ce6b27c8bbff8d240c0679a0c5f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
{
    "1+2": {
        "source": [
            "dmp202021_1n_b",
            "dmp202021_1s",
            "dmp202021_2se",
            "dmp202021_2sw",
            "dmp202021_2ne",
            "dmp202021_2nw"
        ],
        "output": "dmp202021_b_0"
    },
    "1": {
        "source": [
            "dmp202021_1n_b",
            "dmp202021_1s"
        ],
        "output": "dmp202021_b_1"
    },
    "2": {
        "source": [
            "dmp202021_2sw",
            "dmp202021_2ne",
            "dmp202021_2nw",
            "dmp202021_2se"
        ],
        "output": "dmp202021_b_2"
    },
    "__groups": {
        "dmp202021_e": "E",
        "dmp202021_1s": "S",
        "dmp202021_1n_b": "N",
        "dmp202021_2se": "SE",
        "dmp202021_2sw": "SW",
        "dmp202021_2ne": "NE",
        "dmp202021_2nw": "NW"
    },
    "__queries": {
        "dmp202021_1n_b": [
            "UPDATE _matches SET mtitle = '--' WHERE rnd < 6;",
            "UPDATE _segments SET openN = 0, openS = 0, openW = 0, openE = 0, closeN = 0, closeS = 0, closeW = 0, closeE = 0, towel = 1 WHERE rnd < 6;"
        ],
        "dmp202021_2se": [
            "UPDATE admin SET roundcnt = 15;",
            "UPDATE _rounds SET rnd = rnd + 1 WHERE rnd > 5;",
            "UPDATE _matches SET rnd = rnd + 1 WHERE rnd > 5;",
            "UPDATE _segments SET rnd = rnd + 1 WHERE rnd > 5;",
            "UPDATE _scores SET rnd = rnd + 1 WHERE rnd > 5;",
            "INSERT INTO _rounds(rnd) VALUES(6);",
            "INSERT INTO _matches(rnd, tabl, homet, visit, mtitle) SELECT 6, id, id, id+7, '--' FROM teams WHERE id < 8;",
            "UPDATE _rounds SET rnd = rnd + 1 WHERE rnd > 10;",
            "UPDATE _matches SET rnd = rnd + 1 WHERE rnd > 10;",
            "UPDATE _segments SET rnd = rnd + 1 WHERE rnd > 10;",
            "UPDATE _scores SET rnd = rnd + 1 WHERE rnd > 10;",
            "INSERT INTO _rounds(rnd) VALUES(11);",
            "INSERT INTO _matches(rnd, tabl, homet, visit, mtitle) SELECT 11, id, id, id+7, '--' FROM teams WHERE id < 8;",
            "UPDATE admin SET teamcnt = 16;",
            "INSERT INTO _teams(id, bye) VALUES(15, 2),(16, 2);",
            "INSERT INTO _matches(rnd, tabl, homet, visit, mtitle) SELECT rnd, 8, 15, 16, '--' FROM rounds;",
            "INSERT INTO _segments(rnd, segment, tabl, homet, visit, towel) SELECT rnd, 1, 8, 15, 16, 1 FROM rounds;",
            "INSERT INTO _segments(rnd, segment, tabl, homet, visit, towel) SELECT rnd, 2, 8, 15, 16, 1 FROM rounds;"
        ]
    }
}