Added a machinesongs table, and a small snippet to insert all songs as EM2 machine...
authorSteinar H. Gunderson <sesse@samfundet.no>
Mon, 14 Feb 2005 21:56:28 +0000 (21:56 +0000)
committerSteinar H. Gunderson <sesse@samfundet.no>
Mon, 14 Feb 2005 21:56:28 +0000 (21:56 +0000)
sql/ccbs.sql
sql/em2-machinesongs.sql [new file with mode: 0644]

index 45897b3..19eeb0e 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,
diff --git a/sql/em2-machinesongs.sql b/sql/em2-machinesongs.sql
new file mode 100644 (file)
index 0000000..bc47d84
--- /dev/null
@@ -0,0 +1 @@
+INSERT INTO machinesongs SELECT song,(SELECT machine FROM machines WHERE machinename='Dancing Stage EuroMix 2') FROM songs;