File tree Expand file tree Collapse file tree 2 files changed +33
-0
lines changed
Expand file tree Collapse file tree 2 files changed +33
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ set -eu
4+
5+ SCRIPT_DIR=" $( dirname " $( realpath " $0 " ) " ) "
6+ psql -h localhost -p 6432 -d jore4e2e -U dbadmin -f " $SCRIPT_DIR /orphan-removal.sql"
Original file line number Diff line number Diff line change 1+ DELETE FROM journey_pattern .journey_pattern jp
2+ WHERE NOT EXISTS (
3+ SELECT 1
4+ FROM journey_pattern .scheduled_stop_point_in_journey_pattern
5+ WHERE journey_pattern_id = jp .journey_pattern_id
6+ );
7+
8+ DELETE FROM route .route r
9+ WHERE NOT EXISTS (
10+ SELECT 1
11+ FROM route .infrastructure_link_along_route
12+ WHERE route_id = r .route_id
13+ );
14+
15+ DELETE FROM route .route r
16+ WHERE NOT EXISTS (
17+ SELECT 1
18+ FROM journey_pattern .journey_pattern
19+ WHERE on_route_id = r .route_id
20+ );
21+
22+ DELETE FROM route .line l
23+ WHERE NOT EXISTS (
24+ SELECT 1
25+ FROM route .route
26+ WHERE on_line_id = l .line_id
27+ );
You can’t perform that action at this time.
0 commit comments