From 0bf5bdff5cf1840aca5bde3fa36a74a6ce959a80 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Sun, 13 Feb 2005 23:27:02 +0000 Subject: [PATCH] Add a "song number" to the score schema. --- sql/ccbs.sql | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sql/ccbs.sql b/sql/ccbs.sql index b49a47e..e8045a0 100644 --- a/sql/ccbs.sql +++ b/sql/ccbs.sql @@ -115,6 +115,7 @@ CREATE TABLE scores ( round INTEGER NOT NULL, parallel INTEGER NOT NULL, player INTEGER NOT NULL REFERENCES players, + songnumber INTEGER NOT NULL, song INTEGER NOT NULL REFERENCES songs, playmode VARCHAR CHECK (playmode IS NULL OR playmode IN ('single','double')), @@ -126,5 +127,6 @@ CREATE TABLE scores ( 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) ); -- 2.39.2