]> git.sesse.net Git - ccbs/commitdiff
Removed NOT NULL from score in the SQL schema.
authorSteinar H. Gunderson <sesse@samfundet.no>
Mon, 14 Feb 2005 21:20:19 +0000 (21:20 +0000)
committerSteinar H. Gunderson <sesse@samfundet.no>
Mon, 14 Feb 2005 21:20:19 +0000 (21:20 +0000)
html/show-tournament.pl
sql/ccbs.sql

index 55bd2b4a4e9a6f85f8b695adf5e67093e656241c..8ff04c347c9e22a703691f79167e6b2495a28143 100755 (executable)
@@ -50,7 +50,6 @@ for my $score (@$scores) {
        if ($score->{'nick'} ne $player) {
                $player = $score->{'nick'};
                push @$pl, { nick => $player, songs => [], total => 0 };
-
        }
        
        push @{$pl->[$#$pl]->{'songs'}}, {
index c13c666774d872d199351fe59b01ba43fa468f3d..374af67217eac9e62c9f1e9142320d6a52b07977 100644 (file)
@@ -136,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),