X-Git-Url: https://git.sesse.net/?p=ccbs;a=blobdiff_plain;f=sql%2Fccbs.sql;h=374af67217eac9e62c9f1e9142320d6a52b07977;hp=c2482143a9b2e2f10c53e3793faecf2f792018de;hb=503f2b80dd3991ae1c49806117294a820be39e89;hpb=70e82d5f7f2b8cdd9b0d07744eae3c43999653fb diff --git a/sql/ccbs.sql b/sql/ccbs.sql index c248214..374af67 100644 --- a/sql/ccbs.sql +++ b/sql/ccbs.sql @@ -92,6 +92,7 @@ CREATE TABLE rounds ( round INTEGER NOT NULL, randomsongs INTEGER NOT NULL, chosensongs INTEGER NOT NULL, + numqualifying INTEGER, PRIMARY KEY (tournament, round) ); @@ -135,12 +136,12 @@ CREATE TABLE scores ( player INTEGER NOT NULL REFERENCES players, songnumber INTEGER NOT NULL, - song INTEGER NOT NULL REFERENCES songs, + song INTEGER REFERENCES songs, playmode VARCHAR CHECK (playmode IS NULL OR playmode IN ('single','double')), difficulty VARCHAR CHECK (difficulty IS NULL OR difficulty IN ('beginner','standard','difficult','expert','challenge')), - chosen BOOLEAN NOT NULL, - score INTEGER NOT NULL CHECK (score >= 0 AND score <= 10000), + chosen BOOLEAN, + score INTEGER CHECK (score IS NULL OR (score >= 0 AND score <= 10000)), FOREIGN KEY (song) REFERENCES songs (song), FOREIGN KEY (song, playmode, difficulty) REFERENCES songratings (song, playmode, difficulty),