]> git.sesse.net Git - ccbs/blobdiff - sql/ccbs.sql
Read max score for all players in one shot as well, with a new query and an index...
[ccbs] / sql / ccbs.sql
index 97bcd3f1be8c9b2a0e0dbcba2ec285240f785b0a..9f0cdeaa283e933da933674715dd187f51fb7e6d 100644 (file)
@@ -55,6 +55,7 @@ CREATE TABLE songratings (
 
        PRIMARY KEY (song, machine, playmode, difficulty)
 );
+CREATE INDEX songratings_feetrating ON songratings ( feetrating );
 
 CREATE TABLE players (
        player SERIAL PRIMARY KEY,
@@ -175,8 +176,8 @@ CREATE TABLE bigscreen.active_groups (
        tournament INTEGER NOT NULL REFERENCES bigscreen.active_tournament,
        round INTEGER NOT NULL,
        parallel INTEGER NOT NULL,
+       last_updated TIMESTAMP NOT NULL,
 
        PRIMARY KEY ( tournament, round, parallel ),
        FOREIGN KEY ( tournament, round, parallel ) REFERENCES groups
 );
-);