Add junction between relays and schedules

This commit is contained in:
Tobias Reisinger 2023-11-30 00:57:03 +01:00
parent a90ea25b87
commit 2f51ebf91e
Signed by: serguzim
GPG key ID: 13AD60C237A28DFE
10 changed files with 209 additions and 53 deletions

View file

@ -107,11 +107,12 @@ CREATE TABLE junction_relay_schedule
NOT NULL,
relay_id
INTEGER
NOT NULL
REFERENCES relays (id)
ON DELETE CASCADE,
schedule_id
INTEGER
DEFAULT 1
NOT NULL
REFERENCES schedules (id)
ON DELETE SET DEFAULT
);