Retire legacy v1 venue_id from venue metadata after timetable-v2 switchover

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

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Active
Tech stack
python
Domain
backend, database

Research direction

Start by searching the codebase for metadata.venue_id and any v1 venue-code resolution, especially in timetable v2 and venue_bookings, before changing data. The seed path is nyxchange-timetable-v2/scripts/seed_venues.py reading fixtures/venues.csv; removal is a bulk read-merge-PATCH through the venues API for dev and prod. Done means no consumer reads the key, the seed script stops writing it, and the field is absent from all seeded venue documents.

Written by the indexing model from the issue text.

Description

Context

The venue seed from nyxchange-timetable-v2/fixtures/venues.csv (seeded to prod 2026-11-23) stores each venue document with metadata.venue_id — the timetable v1 venue code (e.g. 3-27, Basketball1) — alongside the regenerated campus id (venue-xxxxxxxx). The legacy code is the join key while timetable v2 (and any v1-era data) still references venues by v1 code; campus venue ids are the stable long-term key.

This issue tracks the one-way retirement of the legacy key once consumers stop using it. Filed as an explicit condition of the seed approval.

Why retire

Once timetable v2 and the booking domain resolve venues exclusively by campus venue id, the legacy key is dead weight: it invites code-based joins, can drift from the truth, and keeps v1 naming alive in the data model.

Scope

  • Timetable v2 resolves venues by campus venue id (no metadata.venue_id lookups)
  • Booking domain (venue_bookings) references campus venue ids only
  • Drop metadata.venue_id from all seeded venue documents (dev + prod) — bulk read-merge-PATCH via the venues API
  • Update or remove nyxchange-timetable-v2/scripts/seed_venues.py so the key is no longer written
  • If v1 booking data is ever migrated, map legacy codes → campus ids at import time (do not persist the code)

Notes

  • Codes are not recoverable from names (e.g. code Basketball1 → name "Sheltered Netball Court"), so this is one-way: verify no consumer reads the key before deleting it.
  • The CSV's invisible alias/label venues (group labels like "Bio Labs", "Home", "LT") exist for legacy-code resolution; consider deleting them in the same sweep once nothing resolves by code.
Dominant language
Python
Stars
0
Forks
2
Avg merge
39m
Merged PRs (30d)
235

Getting set up

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 nyjc-computing/campus

All issues in nyjc-computing/campus

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.