Sergiusz Bazanski | 1fad2e5 | 2019-08-01 20:16:27 +0200 | [diff] [blame] | 1 | CREATE TABLE session_configs ( |
2 | peer_id UUID NOT NULL, | ||||
3 | peer_router_id UUID NOT NULL, | ||||
4 | id UUID DEFAULT gen_random_uuid(), | ||||
5 | |||||
6 | bgp_secret STRING NOT NULL, | ||||
7 | |||||
8 | UNIQUE (peer_router_id), | ||||
9 | PRIMARY KEY (peer_id, peer_router_id, id), | ||||
10 | CONSTRAINT fk_peer_router FOREIGN KEY (peer_id, peer_router_id) REFERENCES peer_routers ON DELETE CASCADE | ||||
11 | ) INTERLEAVE IN PARENT peer_routers (peer_id, peer_router_id); |