From: Steinar H. Gunderson Date: Mon, 14 Feb 2005 02:01:32 +0000 (+0000) Subject: Add a table for tournament ranking to the SQL schema. X-Git-Url: https://git.sesse.net/?p=ccbs;a=commitdiff_plain;h=8bf395371926b3686c6ba3f1dd549c7ce9a7c2fb Add a table for tournament ranking to the SQL schema. --- diff --git a/sql/ccbs.sql b/sql/ccbs.sql index e0b6284..44dcdf9 100644 --- a/sql/ccbs.sql +++ b/sql/ccbs.sql @@ -69,6 +69,16 @@ CREATE TABLE tournaments ( UNIQUE ( season, tournamentname ) ); +CREATE TABLE tournamentrankings ( + tournament INTEGER NOT NULL REFERENCES tournaments, + ranking INTEGER NOT NULL, + player INTEGER NOT NULL REFERENCES players, + points INTEGER + + UNIQUE (tournament, player), + PRIMARY KEY (tournament, ranking) +); + CREATE TABLE rounds ( tournament INTEGER NOT NULL REFERENCES tournaments, round INTEGER NOT NULL,