Skip to content

Phase 3.2 [Backend]: Drop v2.event_photos once posters and photos are switched over #307

Done

Description

@Flapjacck

Overview

Finish the v2 photo migration. v2.event_photos only exists because the admin and the site read covers from it. Once the admin writes events.poster_path (1.3, 2.1 and 2.2) and uses v2.photos (2.4), and the site reads posters from poster_path, drop it, as planned in supabase/v2/README.md.

Part of #201.

What to do

  • Check that nothing reads event_photos any more: run git grep event_photos across apps/admin, apps/site and supabase. The site's poster rows (apps/site) have to read poster_path first. Coordinate that with whoever owns the site, or open a site issue.
  • Remove the admin's lib/data/event-photos.ts, hooks/useEventPhotos.ts, types/event-photo.ts and their tests.
  • New step in supabase/v2/: drop table v2.event_photos. Check first that every event with a cover has a matching poster_path.
  • 03_populate.sql: write poster_path directly instead of creating cover rows. 05_verify.sql: check posters instead of covers.
  • Update supabase/v2/README.md (steps table and the "later" list) and the regenerated types.

Done when

  • No code reads or writes v2.event_photos
  • The table is dropped on the live project, and the populate and verify scripts use poster_path
  • Admin and site tests and builds pass

Activity

  1. added
    admin
    backend
    v2-migration
    phase-3
    data-layer
    on Nov 28, 2026
  2. Flapjacck commented on Nov 28, 2026

    @Flapjacck
    MemberAuthor

    Progress from the admin stack (#311 to #314): the admin's photo library now uses v2.photos and v2.photo_guests only (upload, edit, tag, reorder and delete). Nothing new reads or writes v2.event_photos.

    Still blocking the drop

  3. Flapjacck commented on Nov 30, 2026

    @Flapjacck
    MemberAuthor

    Progress check: the admin no longer uses v2.event_photos at runtime (posters save to poster_path), and apps/site doesn't read it any more.

    Still to do:

    • Delete lib/data/event-photos.ts, hooks/useEventPhotos.ts, types/event-photo.ts and tests/lib/data/event-photos.test.ts (nothing imports the hook now)
    • Rename coverPath to posterPath in types/event.ts and lib/data/events.ts
    • Check every cover has a matching poster_path, then add a supabase/v2 step to drop the table, update 03_populate.sql and 05_verify.sql, and regenerate the types
  4. self-assigned this
    on Nov 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

adminbackenddata-layerphase-3v2-migration

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions