Skip to content
Newer
Older
100644 108 lines (90 sloc) 3.09 KB
2c63e9a @geraldb more docu
geraldb authored
1
004bb6f @geraldb deutsche bundesliga, first draft
geraldb authored
2 CREATE TABLE teams (
3 id INTEGER PRIMARY KEY AUTOINCREMENT
4 NOT NULL,
5 title VARCHAR( 255 ) NOT NULL,
6 title2 VARCHAR( 255 ),
7 [key] VARCHAR( 255 ) NOT NULL,
8 tag VARCHAR( 255 ),
9 created_at DATETIME NOT NULL,
10 updated_at DATETIME NOT NULL
11 );
2c63e9a @geraldb more docu
geraldb authored
12
13
004bb6f @geraldb deutsche bundesliga, first draft
geraldb authored
14 CREATE TABLE games (
15 id INTEGER PRIMARY KEY AUTOINCREMENT
16 NOT NULL,
17 round_id INTEGER NOT NULL,
18 pos INTEGER NOT NULL,
19 group_id INTEGER,
20 team1_id INTEGER NOT NULL,
21 team2_id INTEGER NOT NULL,
22 play_at DATETIME NOT NULL,
23 knockout BOOLEAN DEFAULT 'f'
24 NOT NULL,
25 home BOOLEAN DEFAULT 't'
26 NOT NULL,
27 score1 INTEGER,
28 score2 INTEGER,
29 score3 INTEGER,
30 score4 INTEGER,
31 score5 INTEGER,
32 score6 INTEGER,
33 next_game_id INTEGER,
34 prev_game_id INTEGER,
35 toto12x VARCHAR( 255 ),
36 [key] VARCHAR( 255 ),
37 created_at DATETIME NOT NULL,
38 updated_at DATETIME NOT NULL
39 );
40
41
42 CREATE TABLE events (
43 id INTEGER PRIMARY KEY AUTOINCREMENT
44 NOT NULL,
45 title VARCHAR( 255 ) NOT NULL,
46 [key] VARCHAR( 255 ) NOT NULL,
47 start_at DATETIME NOT NULL,
48 created_at DATETIME NOT NULL,
49 updated_at DATETIME NOT NULL
50 );
51
52
53 CREATE TABLE events_teams (
54 id INTEGER PRIMARY KEY AUTOINCREMENT
55 NOT NULL,
56 event_id INTEGER NOT NULL,
57 team_id INTEGER NOT NULL,
58 created_at DATETIME NOT NULL,
59 updated_at DATETIME NOT NULL
60 );
61
62
63 CREATE TABLE groups (
64 id INTEGER PRIMARY KEY AUTOINCREMENT
65 NOT NULL,
66 event_id INTEGER NOT NULL,
67 title VARCHAR( 255 ) NOT NULL,
68 pos INTEGER NOT NULL,
69 created_at DATETIME NOT NULL,
70 updated_at DATETIME NOT NULL
71 );
72
73
74 CREATE TABLE groups_teams (
75 id INTEGER PRIMARY KEY AUTOINCREMENT
76 NOT NULL,
77 group_id INTEGER NOT NULL,
78 team_id INTEGER NOT NULL,
79 created_at DATETIME NOT NULL,
80 updated_at DATETIME NOT NULL
81 );
82
83
84 CREATE TABLE rounds (
85 id INTEGER PRIMARY KEY AUTOINCREMENT
86 NOT NULL,
87 event_id INTEGER NOT NULL,
88 title VARCHAR( 255 ) NOT NULL,
89 title2 VARCHAR( 255 ),
90 pos INTEGER NOT NULL,
91 playoff BOOLEAN DEFAULT 'f'
92 NOT NULL,
93 created_at DATETIME NOT NULL,
94 updated_at DATETIME NOT NULL
95 );
96
97
98 CREATE TABLE props (
99 id INTEGER PRIMARY KEY AUTOINCREMENT
100 NOT NULL,
101 [key] VARCHAR( 255 ) NOT NULL,
102 value VARCHAR( 255 ) NOT NULL,
103 created_at DATETIME NOT NULL,
104 updated_at DATETIME NOT NULL
105 );
106
2c63e9a @geraldb more docu
geraldb authored
107
Something went wrong with that request. Please try again.