]> git.sesse.net Git - ccbs/commitdiff
Add a table for tournament ranking to the SQL schema.
authorSteinar H. Gunderson <sesse@samfundet.no>
Mon, 14 Feb 2005 02:01:32 +0000 (02:01 +0000)
committerSteinar H. Gunderson <sesse@samfundet.no>
Mon, 14 Feb 2005 02:01:32 +0000 (02:01 +0000)
sql/ccbs.sql

index e0b62840e2a78a63994a78038fc91d0b9aec9812..44dcdf98a6617e01ac5f35a284fce98e218a765b 100644 (file)
@@ -69,6 +69,16 @@ CREATE TABLE tournaments (
        UNIQUE ( season, tournamentname )
 );
 
        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,
 CREATE TABLE rounds (
        tournament INTEGER NOT NULL REFERENCES tournaments,
        round INTEGER NOT NULL,