X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;ds=sidebyside;f=sql%2Fccbs.sql;h=45897b336befe8d0435c231854eeb47b00475d9d;hb=81edbdf60931cc5343964a86e95a43a4dfd6d103;hp=374af67217eac9e62c9f1e9142320d6a52b07977;hpb=503f2b80dd3991ae1c49806117294a820be39e89;p=ccbs diff --git a/sql/ccbs.sql b/sql/ccbs.sql index 374af67..45897b3 100644 --- a/sql/ccbs.sql +++ b/sql/ccbs.sql @@ -143,9 +143,7 @@ CREATE TABLE scores ( 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), FOREIGN KEY (tournament, round, parallel, player) REFERENCES roundparticipation (tournament, round, parallel, player), - UNIQUE (tournament, round, parallel, player, songnumber), - PRIMARY KEY (tournament, round, parallel, player, song) + PRIMARY KEY (tournament, round, parallel, player, songnumber) );