]> git.sesse.net Git - ccbs/blobdiff - sql/ccbs.sql
Let the font system take in a physical resolution, instead of #define-ing it (quite...
[ccbs] / sql / ccbs.sql
index e9b3d321e91a682f6f15907f7ee54046c91dcd99..c1848f79d6af846aba13c6f9775ba2591f69d592 100644 (file)
@@ -25,7 +25,7 @@ CREATE TABLE songs (
 );
 
 CREATE TABLE songshorttitles (
-       song INTEGER NOT NULL REFERENCES song,
+       song INTEGER NOT NULL REFERENCES songs,
        shorttitle VARCHAR NOT NULL,
 
        PRIMARY KEY ( song, shorttitle ),
@@ -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,12 @@ CREATE TABLE bigscreen.active_groups (
        tournament INTEGER NOT NULL REFERENCES bigscreen.active_tournament,
        round INTEGER NOT NULL,
        parallel INTEGER NOT NULL,
+       num_machines INTEGER NOT NULL,
+       last_updated TIMESTAMP NOT NULL,
 
        PRIMARY KEY ( tournament, round, parallel ),
        FOREIGN KEY ( tournament, round, parallel ) REFERENCES groups
 );
+CREATE TABLE bigscreen.active_screens (
+       id VARCHAR NOT NULL PRIMARY KEY
 );