Add feed provider schema

Open
#1,911 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 2 days

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
python, sql
Domain
database

Research direction

Start by locating the Liquibase changelog and the model generation workflow mentioned in the repository, then inspect the existing agencytxt and feedinfo schemas and shared URL normalizer. Add the requested provider tables, nullable references, index, and normalized URL backfill, then regenerate the models. Done means the acceptance criteria hold and API and function behavior remain unchanged.

Written by the indexing model from the issue text.

Description

Describe the problem

Raw agency.txt and feed_info.txt records have no way to be grouped under a single provider, so TTC and Toronto Transit Commission stay unrelated.

Proposed solution

Liquibase changesets, then regenerate the models:

  • feed_provider: id, name, status (wip, published, not_published), created_at, updated_at
  • feed_provider_name_alias: id, feed_provider_id, value (unique per provider)
  • feed_provider_contact: id, feed_provider_id, contact_type (website, email, phone), value (unique per provider and type)
  • Nullable feed_provider_id on agencytxt and feedinfo, indexed
  • feed_publisher_url_normalized on feedinfo, indexed and backfilled with the shared URL normalizer
  • feed_provider.status defaults to published (auto-created providers mirror the GTFS file values).

Acceptance criteria:

  • A provider can have multiple aliases and contacts.
  • Raw records can reference a provider; existing rows stay unlinked.
  • No behavior changes in the API or functions.
Alternatives you've considered

Linking providers through a join table instead of a column on the raw tables: rejected, a raw record belongs to at most one provider.

Additional context
Dominant language
Python
Stars
34
Forks
7
Avg merge
3d 3h
Merged PRs (30d)
22

Getting set up

  • Ships a Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from MobilityData/mobility-feed-api

All issues in MobilityData/mobility-feed-api

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.