X-Git-Url: https://git.sesse.net/?p=ccbs;a=blobdiff_plain;f=sql%2Fccbs.sql;h=0140141c4e029195e2ad77254b105ac439a87350;hp=5125fdbbfd87cacb06f4596e893ad7795317c230;hb=3200c9792d41a6a7a5edea7747fd613fae609798;hpb=69ab9938b426523f5bbcc90dcda5f097d7c9b76a diff --git a/sql/ccbs.sql b/sql/ccbs.sql index 5125fdb..0140141 100644 --- a/sql/ccbs.sql +++ b/sql/ccbs.sql @@ -161,5 +161,13 @@ CREATE TABLE randomsongsused ( CREATE SCHEMA bigscreen; CREATE TABLE bigscreen.active_tournament ( - tournament INTEGER NOT NULL REFERENCES tournaments + tournament INTEGER NOT NULL PRIMARY KEY REFERENCES tournaments +); +CREATE TABLE bigscreen.active_rounds ( + tournament INTEGER NOT NULL REFERENCES bigscreen.active_tournament, + round INTEGER NOT NULL, + + PRIMARY KEY ( tournament, round ), + FOREIGN KEY ( tournament, round ) REFERENCES rounds +); );