🚀 Patch auto

This commit is contained in:
karim hassan
2025-08-24 23:00:40 +00:00
parent 92e6afff00
commit f1103d67a0
1314 changed files with 2511 additions and 562 deletions

28
backend/sql/schema.sql Normal file
View File

@@ -0,0 +1,28 @@
create table if not exists tournaments(
id serial primary key,
name text not null,
location text,
start_date date,
end_date date,
created_at timestamp default now()
);
create table if not exists participants(
id serial primary key,
tournament_id int not null references tournaments(id) on delete cascade,
full_name text not null,
created_at timestamp default now()
);
create index if not exists idx_participants_t on participants(tournament_id);
create table if not exists matches(
id serial primary key,
tournament_id int not null references tournaments(id) on delete cascade,
court text,
starts_at timestamp,
team_a text,
team_b text,
score_a int default 0,
score_b int default 0,
done boolean default false,
created_at timestamp default now()
);
create index if not exists idx_matches_t on matches(tournament_id);