]> git.sesse.net Git - ccbs/blobdiff - sql/ccbs.sql
Added a machinesongs table, and a small snippet to insert all songs as EM2 machine...
[ccbs] / sql / ccbs.sql
index 45897b336befe8d0435c231854eeb47b00475d9d..19eeb0e98ae55e5d70a941f8327fd0a2409e6640 100644 (file)
@@ -24,7 +24,12 @@ CREATE TABLE songs (
        UNIQUE ( title )
 );
 
--- CREATE TABLE machinesongs etc.
+CREATE TABLE machinesongs (
+       song INTEGER NOT NULL REFERENCES songs,
+       machine INTEGER NOT NULL REFERENCES machines,
+
+       PRIMARY KEY ( song, machine )
+);
 
 CREATE TABLE scoringsystems (
        scoringsystem SERIAL PRIMARY KEY,