blob: 7a1d07be77e6e5192a919eb7999751965f287153 [file] [log] [blame]
Sergiusz Bazanski1fad2e52019-08-01 20:16:27 +02001CREATE 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);