gtfs-validator
gtfs-validator copied to clipboard
Only raise a foreign key violation error when network_id is missing from both networks.txt and routes.txt
Describe the problem
The network_id field of GtfsFareLegRule is a foreign key that references routes.txt. If should reference both routes.txt and networks.txt. cc @tzujenchanmbd
Proposed solution
networkId is declared as a foreign key that references the network_id field in both the routes.txt and networks.txt tables.
Logic:
IF network_id exists in fare_leg_rules.txt but not in routes.txt OR networks.txt, generate a foreign_key_violation notice.
Alternatives you've considered
No response
Additional context
No response