Add junction between relays and schedules
This commit is contained in:
parent
a90ea25b87
commit
2f51ebf91e
10 changed files with 209 additions and 53 deletions
migrations
|
@ -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
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue