X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=sql%2Fccbs.sql;h=c2482143a9b2e2f10c53e3793faecf2f792018de;hb=6e5d70892c667ade86cc03a73339efe6f8c724b1;hp=e0b62840e2a78a63994a78038fc91d0b9aec9812;hpb=aee1f77ca1957086ed876b49e1b5e4f744eef2f2;p=ccbs diff --git a/sql/ccbs.sql b/sql/ccbs.sql index e0b6284..c248214 100644 --- a/sql/ccbs.sql +++ b/sql/ccbs.sql @@ -69,6 +69,24 @@ CREATE TABLE tournaments ( UNIQUE ( season, tournamentname ) ); +CREATE TABLE tournamentparticipation ( + tournament INTEGER NOT NULL REFERENCES tournaments, + player INTEGER NOT NULL REFERENCES players, + paid BOOLEAN NOT NULL, + + PRIMARY KEY ( tournament, player ) +); + +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,