Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary:
Relates to #1463
This pull request introduces improvements to how the operational status and external IDs are managed for transitfeeds in the data import process, and ensures database consistency for existing feeds. The main changes are focused on updating feed metadata and maintaining accurate external ID associations.
Feed metadata management:
sync_transitfeeds.py, the code now sets theoperational_statusof each feed to"published"during processing, ensuring all imported feeds reflect their correct status.transitfeedsexternal ID already exists for a feed. If it does, a debug message is logged; if not, the external ID is added to the feed.Database consistency:
feat_1249-3.sql) updates all feeds with astable_idstarting withtfs-to set theiroperational_statusto"published", ensuring existing records are consistent with the new import logic.Please make sure these boxes are checked before submitting your pull request - thanks!
./scripts/api-tests.shto make sure you didn't break anything