-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfootball_simulation_20240714_114853.sql
330 lines (223 loc) · 7.76 KB
/
football_simulation_20240714_114853.sql
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
--
-- PostgreSQL database dump
--
-- Dumped from database version 15.7
-- Dumped by pg_dump version 16.0
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalog.set_config('search_path', '', false);
SET check_function_bodies = false;
SET xmloption = content;
SET client_min_messages = warning;
SET row_security = off;
SET default_tablespace = '';
SET default_table_access_method = heap;
--
-- Name: championship_predictions; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public.championship_predictions (
id integer NOT NULL,
team_name character varying(255) NOT NULL,
week integer NOT NULL,
probability double precision NOT NULL,
created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
updated_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL
);
ALTER TABLE public.championship_predictions OWNER TO postgres;
--
-- Name: championship_predictions_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE public.championship_predictions_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE public.championship_predictions_id_seq OWNER TO postgres;
--
-- Name: championship_predictions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE public.championship_predictions_id_seq OWNED BY public.championship_predictions.id;
--
-- Name: matches; Type: TABLE; Schema: public; Owner: football_user
--
CREATE TABLE public.matches (
id integer NOT NULL,
created_at timestamp with time zone,
updated_at timestamp with time zone,
deleted_at timestamp with time zone,
home_team_id integer,
away_team_id integer,
home_goals integer,
away_goals integer,
week integer
);
ALTER TABLE public.matches OWNER TO football_user;
--
-- Name: matches_id_seq; Type: SEQUENCE; Schema: public; Owner: football_user
--
CREATE SEQUENCE public.matches_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE public.matches_id_seq OWNER TO football_user;
--
-- Name: matches_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: football_user
--
ALTER SEQUENCE public.matches_id_seq OWNED BY public.matches.id;
--
-- Name: settings; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public.settings (
id integer NOT NULL,
created_at timestamp without time zone,
updated_at timestamp without time zone,
deleted_at timestamp without time zone,
current_week integer,
league_ended boolean
);
ALTER TABLE public.settings OWNER TO postgres;
--
-- Name: settings_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE public.settings_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE public.settings_id_seq OWNER TO postgres;
--
-- Name: settings_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE public.settings_id_seq OWNED BY public.settings.id;
--
-- Name: teams; Type: TABLE; Schema: public; Owner: football_user
--
CREATE TABLE public.teams (
id integer NOT NULL,
created_at timestamp with time zone,
updated_at timestamp with time zone,
deleted_at timestamp with time zone,
name text,
power integer,
points integer,
wins integer,
draws integer,
losses integer,
goals_for integer,
goals_against integer,
championship_probability numeric,
played integer,
goal_difference integer
);
ALTER TABLE public.teams OWNER TO football_user;
--
-- Name: teams_id_seq; Type: SEQUENCE; Schema: public; Owner: football_user
--
CREATE SEQUENCE public.teams_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE public.teams_id_seq OWNER TO football_user;
--
-- Name: teams_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: football_user
--
ALTER SEQUENCE public.teams_id_seq OWNED BY public.teams.id;
--
-- Name: championship_predictions id; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.championship_predictions ALTER COLUMN id SET DEFAULT nextval('public.championship_predictions_id_seq'::regclass);
--
-- Name: matches id; Type: DEFAULT; Schema: public; Owner: football_user
--
ALTER TABLE ONLY public.matches ALTER COLUMN id SET DEFAULT nextval('public.matches_id_seq'::regclass);
--
-- Name: settings id; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.settings ALTER COLUMN id SET DEFAULT nextval('public.settings_id_seq'::regclass);
--
-- Name: teams id; Type: DEFAULT; Schema: public; Owner: football_user
--
ALTER TABLE ONLY public.teams ALTER COLUMN id SET DEFAULT nextval('public.teams_id_seq'::regclass);
--
-- Data for Name: championship_predictions; Type: TABLE DATA; Schema: public; Owner: postgres
--
--
-- Data for Name: matches; Type: TABLE DATA; Schema: public; Owner: football_user
--
--
-- Data for Name: settings; Type: TABLE DATA; Schema: public; Owner: postgres
--
INSERT INTO public.settings VALUES
(5, '2024-07-14 11:47:28.605243', '2024-07-14 11:47:28.605243', NULL, 0, false);
--
-- Data for Name: teams; Type: TABLE DATA; Schema: public; Owner: football_user
--
INSERT INTO public.teams VALUES
(169, '2024-07-14 11:47:28.612967+03', '2024-07-14 11:47:28.617938+03', NULL, 'Chelsea', 92, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(170, '2024-07-14 11:47:28.615177+03', '2024-07-14 11:47:28.620819+03', NULL, 'Arsenal', 18, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(171, '2024-07-14 11:47:28.615774+03', '2024-07-14 11:47:28.623166+03', NULL, 'Manchester City', 32, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(172, '2024-07-14 11:47:28.616393+03', '2024-07-14 11:47:28.624613+03', NULL, 'Liverpool', 6, 0, 0, 0, 0, 0, 0, 0, 0, 0);
--
-- Name: championship_predictions_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--
SELECT pg_catalog.setval('public.championship_predictions_id_seq', 292, true);
--
-- Name: matches_id_seq; Type: SEQUENCE SET; Schema: public; Owner: football_user
--
SELECT pg_catalog.setval('public.matches_id_seq', 1526, true);
--
-- Name: settings_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--
SELECT pg_catalog.setval('public.settings_id_seq', 5, true);
--
-- Name: teams_id_seq; Type: SEQUENCE SET; Schema: public; Owner: football_user
--
SELECT pg_catalog.setval('public.teams_id_seq', 172, true);
--
-- Name: championship_predictions championship_predictions_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.championship_predictions
ADD CONSTRAINT championship_predictions_pkey PRIMARY KEY (id);
--
-- Name: matches matches_pkey; Type: CONSTRAINT; Schema: public; Owner: football_user
--
ALTER TABLE ONLY public.matches
ADD CONSTRAINT matches_pkey PRIMARY KEY (id);
--
-- Name: settings settings_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.settings
ADD CONSTRAINT settings_pkey PRIMARY KEY (id);
--
-- Name: teams teams_pkey; Type: CONSTRAINT; Schema: public; Owner: football_user
--
ALTER TABLE ONLY public.teams
ADD CONSTRAINT teams_pkey PRIMARY KEY (id);
--
-- Name: idx_matches_deleted_at; Type: INDEX; Schema: public; Owner: football_user
--
CREATE INDEX idx_matches_deleted_at ON public.matches USING btree (deleted_at);
--
-- Name: idx_settings_deleted_at; Type: INDEX; Schema: public; Owner: postgres
--
CREATE INDEX idx_settings_deleted_at ON public.settings USING btree (deleted_at);
--
-- Name: idx_teams_deleted_at; Type: INDEX; Schema: public; Owner: football_user
--
CREATE INDEX idx_teams_deleted_at ON public.teams USING btree (deleted_at);
--
-- PostgreSQL database dump complete
--