Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

foreign key changes for Fares changes #1950

Open
emmambd opened this issue Jan 27, 2025 · 0 comments
Open

foreign key changes for Fares changes #1950

emmambd opened this issue Jan 27, 2025 · 0 comments
Labels
enhancement New feature request or improvement on an existing feature status: Ready An issue that is ready to be worked on.

Comments

@emmambd
Copy link
Contributor

emmambd commented Jan 27, 2025

Describe the problem

From spec update for Fares

Proposed solution

NEW RULE DETAILS

Describe the new validation rules

Related spec language Rationale for rule Notice name to update or add Pseudologic Notice table columns Severity Notice description
networks.network_id, fare_leg_join_rules.from_network_id, fare_leg_join_rules.to_network_id from_network_id and to_network_id should exist in networks.txt foreign_key_violation

If the value for from_network_id does not exist in networks.network_id or routes.network_id) or the value for to_network_id does not exist in (networks.txt or routes.txt):

Trigger Notice

childFieldName,

childFilename,

csvRowNumber,

fieldValue,

parentFieldName,

parentFilename

ERROR Wrong foreign key.

A foreign key references the primary key of another file. A foreign key violation means that the foreign key referenced from a given row (the child file) cannot be found in the corresponding file (the parent file). The Foreign keys are defined in the specification under "Type" for each file.

stops.stop_id, fare_leg_join_rules.from_stop_id, fare_leg_join_rules.to_stop_id from_stop_id and to_stop_id should exist in stops.txt foreign_key_violation

If from_stop_id value does not exist in stops.txt or to_stop_id value does not exist in stops.txt:

Trigger Notice

childFieldName,

childFilename,

csvRowNumber,

fieldValue,

parentFieldName,

parentFilename

ERROR Wrong foreign key.

A foreign key references the primary key of another file. A foreign key violation means that the foreign key referenced from a given row (the child file) cannot be found in the corresponding file (the parent file). The Foreign keys are defined in the specification under "Type" for each file.

Sample GTFS datasets

Severity

ERROR

Additional context

Alternatives you've considered

No response

Additional context

No response

@emmambd emmambd added enhancement New feature request or improvement on an existing feature status: Needs triage Applied to all new issues status: Ready An issue that is ready to be worked on. and removed status: Needs triage Applied to all new issues labels Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature request or improvement on an existing feature status: Ready An issue that is ready to be worked on.
Projects
None yet
Development

No branches or pull requests

1 participant