Changeset 1df3fde


Ignore:
Timestamp:
07/13/22 14:50:17 (23 months ago)
Author:
anastasovv <simon@…>
Branches:
main
Children:
433e0c5
Parents:
e9f11ac
Message:

Changed database file

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • dummy_database.sql

    re9f11ac r1df3fde  
     1DROP TABLE IF EXISTS "public"."blackjack";
     2-- This script only contains the table creation statements and does not fully represent the table in database. It's still missing: indices, triggers. Do not use it as backup.
     3
     4-- Table Definition
     5CREATE TABLE "public"."blackjack" (
     6    "data" text,
     7    "identifier" text DEFAULT 'blackjack_data'::text
     8);
     9
    110DROP TABLE IF EXISTS "public"."players";
    211-- This script only contains the table creation statements and does not fully represent the table in database. It's still missing: indices, triggers. Do not use it as backup.
    312
    413-- Squences
    5 CREATE SEQUENCE IF NOT EXISTS players_id_seq;
     14CREATE SEQUENCE IF NOT EXISTS players_id_seq
    615
    716-- Table Definition
     
    1322);
    1423
     24DROP TABLE IF EXISTS "public"."poker";
     25-- This script only contains the table creation statements and does not fully represent the table in database. It's still missing: indices, triggers. Do not use it as backup.
     26
     27-- Table Definition
     28CREATE TABLE "public"."poker" (
     29    "data" text,
     30    "identifier" text DEFAULT 'poker_data'::text
     31);
     32
     33DROP TABLE IF EXISTS "public"."roulette";
     34-- This script only contains the table creation statements and does not fully represent the table in database. It's still missing: indices, triggers. Do not use it as backup.
     35
     36-- Table Definition
     37CREATE TABLE "public"."roulette" (
     38    "data" text,
     39    "identifier" text DEFAULT 'roulette_data'::text
     40);
     41
     42DROP TABLE IF EXISTS "public"."sessions";
     43-- This script only contains the table creation statements and does not fully represent the table in database. It's still missing: indices, triggers. Do not use it as backup.
     44
     45-- Table Definition
     46CREATE TABLE "public"."sessions" (
     47    "data" text,
     48    "identifier" text DEFAULT 'sessions_data'::text
     49);
     50
    1551DROP TABLE IF EXISTS "public"."stats";
    1652-- This script only contains the table creation statements and does not fully represent the table in database. It's still missing: indices, triggers. Do not use it as backup.
    1753
    1854-- Squences
    19 CREATE SEQUENCE IF NOT EXISTS stats_id_seq;
     55CREATE SEQUENCE IF NOT EXISTS stats_id_seq
    2056
    2157-- Table Definition
     
    2864    "blackjack_won_games" int8,
    2965    "roulette_won_games" int8,
    30     "poker_won_games" int8, 
     66    "poker_won_games" int8,
    3167    "money_bet" int8,
    3268    "money_earned" int8
     
    3773
    3874-- Squences
    39 CREATE SEQUENCE IF NOT EXISTS users_id_seq;
     75CREATE SEQUENCE IF NOT EXISTS users_id_seq
    4076
    4177-- Table Definition
     
    4783);
    4884
     85INSERT INTO "public"."blackjack" ("data", "identifier") VALUES
     86('[]', 'blackjack_data');
     87
     88
    4989INSERT INTO "public"."players" ("id", "username", "display_name", "credits") VALUES
    50 (9, 'david', 'Dvd', 1000);
     90(8, 'gis', 'Gis', 1147);
    5191INSERT INTO "public"."players" ("id", "username", "display_name", "credits") VALUES
    52 (6, 'simon', 'Simon', 3553);
     92(10, 'test', 'Tester', 1000);
    5393INSERT INTO "public"."players" ("id", "username", "display_name", "credits") VALUES
    54 (8, 'gis', 'Gis', 1003);
     94(11, 'guest', 'guester', 1000);
    5595INSERT INTO "public"."players" ("id", "username", "display_name", "credits") VALUES
    56 (12, 'gigi', 'GG', 435),
    57 (10, 'test', 'Tester', 1000),
    58 (11, 'guest', 'guester', 1000);
     96(9, 'david', 'Dvd', 2650),
     97(6, 'simon', 'Simon', 10206);
     98
     99INSERT INTO "public"."poker" ("data", "identifier") VALUES
     100('[]', 'poker_data');
     101
     102
     103INSERT INTO "public"."roulette" ("data", "identifier") VALUES
     104('{}', 'roulette_data');
     105
     106
     107INSERT INTO "public"."sessions" ("data", "identifier") VALUES
     108('[{"id":"8fc8ea87-94a2-4e20-a315-bef5795b4b99","displayName":"Evgi","username":"evgi","credits":10506,"lastActivity":1657280778431},{"id":"d1abae2c-e9b2-4df9-bb92-f7dc9e88d374","displayName":"a","username":"a","credits":5340,"lastActivity":1657640369530},{"id":"d52e06f3-694b-4552-bd4d-58c0062ddead","displayName":"asdasd","username":"asdasd","credits":3593,"lastActivity":1657577539897},{"id":"7cb0abcc-fd94-425a-abaf-be6c67122e9d","displayName":"Gis","username":"gis","credits":1147,"lastActivity":1657640369532},{"id":"7e49c3ae-818e-4a49-ba46-a1980ef33ca6","displayName":"Dvd","username":"david","credits":2650,"lastActivity":1657640499011},{"id":"879c0abd-cfcb-400b-b042-b15f5b59a971","displayName":"Simon","username":"simon","credits":10206,"lastActivity":1657641589917}]', 'sessions_data');
     109
    59110
    60111INSERT INTO "public"."stats" ("id", "username", "blackjack_games", "roulette_games", "poker_games", "blackjack_won_games", "roulette_won_games", "poker_won_games", "money_bet", "money_earned") VALUES
    61 (6, 'gis', 0, 0, 0, 0, 0, 0, 0, 0);
     112(6, 'gis', 0, 4, 0, 0, 1, 0, 72, 216);
    62113INSERT INTO "public"."stats" ("id", "username", "blackjack_games", "roulette_games", "poker_games", "blackjack_won_games", "roulette_won_games", "poker_won_games", "money_bet", "money_earned") VALUES
    63 (7, 'david', 0, 0, 0, 0, 0, 0, 0, 0);
     114(8, 'test', 0, 0, 0, 0, 0, 0, 0, 0);
    64115INSERT INTO "public"."stats" ("id", "username", "blackjack_games", "roulette_games", "poker_games", "blackjack_won_games", "roulette_won_games", "poker_won_games", "money_bet", "money_earned") VALUES
    65 (10, 'gigi', 7, 0, 0, 3, 0, 0, 4187, 3122);
     116(9, 'guest', 0, 0, 0, 0, 0, 0, 0, 0);
    66117INSERT INTO "public"."stats" ("id", "username", "blackjack_games", "roulette_games", "poker_games", "blackjack_won_games", "roulette_won_games", "poker_won_games", "money_bet", "money_earned") VALUES
    67 (8, 'test', 0, 0, 0, 0, 0, 0, 0, 0),
    68 (9, 'guest', 0, 0, 0, 0, 0, 0, 0, 0),
    69 (4, 'simon', 10, 0, 0, 5, 0, 0, 5180, 3899);
     118(7, 'david', 0, 2, 2, 0, 2, 1, 1768, 3418),
     119(4, 'simon', 28, 18, 43, 12, 2, 17, 47175, 33530);
    70120
    71121INSERT INTO "public"."users" ("id", "username", "password", "salt") VALUES
     
    77127INSERT INTO "public"."users" ("id", "username", "password", "salt") VALUES
    78128(14, 'test', '3b28f1d5ad3633ff23fbde106500e3ab6837779cad55092f83b9607294364177aa4eceb2e69f00bdd6f81cc6f062804a373d74503048dca1eceeb9de22425eab', '65ecbfcc453081ad8ae65470f7e50056'),
    79 (15, 'guest', 'a67c607687003434a04f89d805cc95b0a59bd310dfef6358b7e17c2a3c7b216f8c0c91d919fbfeea3c45635682b241b19d5a9841d83da43f164287c526efb924', '59eb67f0023c9b6fd246ff33382f739d'),
    80 (16, 'gigi', '690aa3232c85602d15fcaaf761ec0f7a14958df2c3054a177b5ac0a05584c959cde01015b009d95111798533add6bdf578867f5c58ebab8121a08b55b32c810c', '353a2adee3a03d28a7118ea138a76aac');
     129(15, 'guest', 'a67c607687003434a04f89d805cc95b0a59bd310dfef6358b7e17c2a3c7b216f8c0c91d919fbfeea3c45635682b241b19d5a9841d83da43f164287c526efb924', '59eb67f0023c9b6fd246ff33382f739d');
  • pages/api/postgre/index.js

    re9f11ac r1df3fde  
    536536
    537537    game.loaded = true;
    538     console.log(game);
    539538  });
    540539}
Note: See TracChangeset for help on using the changeset viewer.