source: caessino.sql@ 41d3f60

main
Last change on this file since 41d3f60 was 41d3f60, checked in by anastasovv <simon@…>, 2 years ago

Updated readme and database

  • Property mode set to 100644
File size: 7.0 KB
RevLine 
[41d3f60]1DROP TABLE IF EXISTS "public"."admins";
2-- This script only contains the table creation statements and does not fully represent the table in the database. It's still missing: indices, triggers. Do not use it as a backup.
3
4-- Sequence and defined type
5CREATE SEQUENCE IF NOT EXISTS admins_id_seq;
6
7-- Table Definition
8CREATE TABLE "public"."admins" (
9 "id" int4 NOT NULL DEFAULT nextval('admins_id_seq'::regclass),
10 "username" text,
11 "password" text,
12 "salt" text
13);
14
15DROP TABLE IF EXISTS "public"."blackjack";
16-- This script only contains the table creation statements and does not fully represent the table in the database. It's still missing: indices, triggers. Do not use it as a backup.
17
18-- Table Definition
19CREATE TABLE "public"."blackjack" (
20 "data" text,
21 "identifier" text DEFAULT 'blackjack_data'::text
22);
23
24DROP TABLE IF EXISTS "public"."blackjack_history";
25-- This script only contains the table creation statements and does not fully represent the table in the database. It's still missing: indices, triggers. Do not use it as a backup.
26
27-- Sequence and defined type
28CREATE SEQUENCE IF NOT EXISTS blackjack_history_id_seq;
29
30-- Table Definition
31CREATE TABLE "public"."blackjack_history" (
32 "id" int4 NOT NULL DEFAULT nextval('blackjack_history_id_seq'::regclass),
33 "username" text,
34 "history" text
35);
36
37DROP TABLE IF EXISTS "public"."complaints";
38-- This script only contains the table creation statements and does not fully represent the table in the database. It's still missing: indices, triggers. Do not use it as a backup.
39
40-- Sequence and defined type
41CREATE SEQUENCE IF NOT EXISTS complaints_id_seq;
42
43-- Table Definition
44CREATE TABLE "public"."complaints" (
45 "id" int4 NOT NULL DEFAULT nextval('complaints_id_seq'::regclass),
46 "date" text,
47 "by" text,
48 "description" text,
49 "answered" text,
50 "answer" text
51);
52
53DROP TABLE IF EXISTS "public"."credit_cards";
54-- This script only contains the table creation statements and does not fully represent the table in the database. It's still missing: indices, triggers. Do not use it as a backup.
55
56-- Sequence and defined type
57CREATE SEQUENCE IF NOT EXISTS credit_cards_id_seq;
58
59-- Table Definition
60CREATE TABLE "public"."credit_cards" (
61 "id" int4 NOT NULL DEFAULT nextval('credit_cards_id_seq'::regclass),
62 "username" text,
63 "card_hash" text,
64 "card_salt" text
65);
66
67DROP TABLE IF EXISTS "public"."players";
68-- This script only contains the table creation statements and does not fully represent the table in the database. It's still missing: indices, triggers. Do not use it as a backup.
69
70-- Sequence and defined type
71CREATE SEQUENCE IF NOT EXISTS players_id_seq;
72
73-- Table Definition
74CREATE TABLE "public"."players" (
75 "id" int4 NOT NULL DEFAULT nextval('players_id_seq'::regclass),
76 "username" text NOT NULL,
77 "display_name" text NOT NULL,
78 "credits" float8
79);
80
81DROP TABLE IF EXISTS "public"."poker";
82-- This script only contains the table creation statements and does not fully represent the table in the database. It's still missing: indices, triggers. Do not use it as a backup.
83
84-- Table Definition
85CREATE TABLE "public"."poker" (
86 "data" text,
87 "identifier" text DEFAULT 'poker_data'::text
88);
89
90DROP TABLE IF EXISTS "public"."poker_history";
91-- This script only contains the table creation statements and does not fully represent the table in the database. It's still missing: indices, triggers. Do not use it as a backup.
92
93-- Sequence and defined type
94CREATE SEQUENCE IF NOT EXISTS poker_history_id_seq;
95
96-- Table Definition
97CREATE TABLE "public"."poker_history" (
98 "id" int4 NOT NULL DEFAULT nextval('poker_history_id_seq'::regclass),
99 "username" text,
100 "history" text
101);
102
103DROP TABLE IF EXISTS "public"."roulette";
104-- This script only contains the table creation statements and does not fully represent the table in the database. It's still missing: indices, triggers. Do not use it as a backup.
105
106-- Table Definition
107CREATE TABLE "public"."roulette" (
108 "data" text,
109 "identifier" text DEFAULT 'roulette_data'::text
110);
111
112DROP TABLE IF EXISTS "public"."roulette_history";
113-- This script only contains the table creation statements and does not fully represent the table in the database. It's still missing: indices, triggers. Do not use it as a backup.
114
115-- Sequence and defined type
116CREATE SEQUENCE IF NOT EXISTS roulette_history_id_seq;
117
118-- Table Definition
119CREATE TABLE "public"."roulette_history" (
120 "id" int4 NOT NULL DEFAULT nextval('roulette_history_id_seq'::regclass),
121 "username" text,
122 "history" text
123);
124
125DROP TABLE IF EXISTS "public"."sessions";
126-- This script only contains the table creation statements and does not fully represent the table in the database. It's still missing: indices, triggers. Do not use it as a backup.
127
128-- Table Definition
129CREATE TABLE "public"."sessions" (
130 "data" text,
131 "identifier" text DEFAULT 'sessions_data'::text
132);
133
134DROP TABLE IF EXISTS "public"."stats";
135-- This script only contains the table creation statements and does not fully represent the table in the database. It's still missing: indices, triggers. Do not use it as a backup.
136
137-- Sequence and defined type
138CREATE SEQUENCE IF NOT EXISTS stats_id_seq;
139
140-- Table Definition
141CREATE TABLE "public"."stats" (
142 "id" int4 NOT NULL DEFAULT nextval('stats_id_seq'::regclass),
143 "username" text NOT NULL,
144 "blackjack_games" int8,
145 "roulette_games" int8,
146 "poker_games" int8,
147 "blackjack_won_games" int8,
148 "roulette_won_games" int8,
149 "poker_won_games" int8,
150 "money_bet" int8,
151 "money_earned" int8
152);
153
154DROP TABLE IF EXISTS "public"."users";
155-- This script only contains the table creation statements and does not fully represent the table in the database. It's still missing: indices, triggers. Do not use it as a backup.
156
157-- Sequence and defined type
158CREATE SEQUENCE IF NOT EXISTS users_id_seq;
159
160-- Table Definition
161CREATE TABLE "public"."users" (
162 "id" int4 NOT NULL DEFAULT nextval('users_id_seq'::regclass),
163 "username" text NOT NULL,
164 "password" text NOT NULL,
165 "salt" text NOT NULL,
166 "email" text NOT NULL,
167 "email_activation_id" text NOT NULL,
168 "activated" text NOT NULL
169);
170
171INSERT INTO "public"."admins" ("id", "username", "password", "salt") VALUES
172(1, 'admin', 'c7258f1d118136a210cbd591a5bf03236226d34e6567bdf4ccc780dcd96a722c4a21b3433eb282220d8d4172d99c2ad6a7c7be1d2ab3b20e090cf8d3c799d578', 'fd67bce156239de46b59f05aaed57435');
173
174
175INSERT INTO "public"."blackjack" ("data", "identifier") VALUES
176('[]', 'blackjack_data');
177
178
179
180
181INSERT INTO "public"."complaints" ("id", "date", "by", "description", "answered", "answer") VALUES
182(1, '2022-07-13T19:22:46.631+02:00', 'simon', 'I have a problem with logging in. It says my name is already taken.', 'true', 'Unfortunately, that means that someone else has already registered with that username before you. Please choose a different a username.');
183
184
185
186
187
188
189INSERT INTO "public"."poker" ("data", "identifier") VALUES
190('[]', 'poker_data');
191
192
193
194
195INSERT INTO "public"."roulette" ("data", "identifier") VALUES
196('{}', 'roulette_data');
197
198
199
200
201INSERT INTO "public"."sessions" ("data", "identifier") VALUES
202('[]', 'sessions_data');
203
204
205
206
207
Note: See TracBrowser for help on using the repository browser.