imprvd
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
create table public.matches (
|
||||
id bigint generated by default as identity not null,
|
||||
created_at timestamp with time zone not null default now(),
|
||||
user_red bigint null,
|
||||
user_blue bigint null,
|
||||
entry_fee bigint null default '34'::bigint,
|
||||
prize_cc bigint null default '100'::bigint,
|
||||
red_joined_at timestamp with time zone null,
|
||||
blue_joined_at timestamp with time zone null,
|
||||
status smallint null default '0'::smallint,
|
||||
winner_id bigint null,
|
||||
constraint matches_pkey primary key (id),
|
||||
constraint matches_user_blue_fkey foreign KEY (user_blue) references users (id),
|
||||
constraint matches_user_red_fkey foreign KEY (user_red) references users (id),
|
||||
constraint matches_winner_id_fkey foreign KEY (winner_id) references users (id)
|
||||
) TABLESPACE pg_default;
|
||||
@@ -0,0 +1,10 @@
|
||||
create table public.users (
|
||||
id bigint generated by default as identity not null,
|
||||
created_at timestamp with time zone not null default now(),
|
||||
username text null,
|
||||
password text null,
|
||||
cc real null default '0'::real,
|
||||
rc real null default '0'::real,
|
||||
last_logged_at timestamp with time zone null default now(),
|
||||
constraint users_pkey primary key (id)
|
||||
) TABLESPACE pg_default;
|
||||
Reference in New Issue
Block a user