Trek_CN/server/src
jubnl 71aa8f8051
feat: journey gallery 1-to-N model with M:N entry-photo junction table
Replaces the old model where journey_photos was keyed per-entry with a
per-journey gallery table (one row per unique photo per journey) and a new
junction table journey_entry_photos that links gallery photos to entries.

Key changes:
- Migration 121: renames old journey_photos to journey_photos_old, creates the
  new gallery table + junction table, backfills both from existing data, drops
  the backup, removes synthetic 'Gallery' / '[Trip Photos]' wrapper entries
- journeyService: rewrites photo helpers (JP_SELECT/JOIN now joins via
  journey_entry_photos → journey_photos → trek_photos); adds uploadGalleryPhotos,
  addProviderPhotoToGallery, unlinkPhotoFromEntry, deleteGalleryPhoto; simplifies
  deletePhoto and linkPhotoToEntry against the new schema; syncTripPhotos inserts
  directly into the gallery instead of a wrapper entry
- journeyShareService: updates public photo and asset validation queries to join
  through the gallery table instead of entry_id; getPublicJourney now returns a
  dedicated gallery array alongside per-entry photos
- journey routes: adds gallery upload, provider-photo, and delete endpoints
  (POST/DELETE /:id/gallery/*); adds unlink-from-entry route
  (DELETE /entries/:entryId/photos/:journeyPhotoId); updates link-photo to
  accept journey_photo_id with a backwards-compat photo_id alias
- types: adds GalleryPhoto interface
- client api: adds uploadGalleryPhotos, addProviderPhotosToGallery, unlinkPhoto,
  deleteGalleryPhoto; updates linkPhoto param name to journeyPhotoId
- journeyStore: adds GalleryPhoto type, gallery field on JourneyDetail,
  uploadGalleryPhotos / unlinkPhoto / deleteGalleryPhoto store actions
- JourneyDetailPage + tests: updated to work with the new gallery model
2026-04-22 15:58:31 +02:00
..
db feat: journey gallery 1-to-N model with M:N entry-photo junction table 2026-04-22 15:58:31 +02:00
demo v2.6.2 — TREK Rebrand, OSM Enrichment, File Management, Hotel Bookings & Bug Fixes 2026-03-28 16:38:08 +01:00
mcp security: close SEC-H4/H6 gaps from second-pass review 2026-04-20 21:35:30 +02:00
middleware security: address silent-failure review findings on top of batch 1 2026-04-20 20:44:57 +02:00
routes feat: journey gallery 1-to-N model with M:N entry-photo junction table 2026-04-22 15:58:31 +02:00
services feat: journey gallery 1-to-N model with M:N entry-photo junction table 2026-04-22 15:58:31 +02:00
systemNotices feat(system-notices): apply version gates to v3 upgrade notices 2026-04-17 20:04:54 +02:00
utils feat: enhance Synology Photos integration with OTP, SSL skip, and better UX 2026-04-11 18:25:42 +02:00
addons.ts feat(notices): add system notice infrastructure 2026-04-16 14:36:33 +02:00
app.ts security: address second-pass audit findings 2026-04-20 21:04:09 +02:00
config.ts fix(login): address review feedback on language dropdown PR 2026-04-15 03:04:25 +02:00
index.ts feat(notifications): reminders for todos with upcoming due dates 2026-04-20 17:31:25 +02:00
scheduler.ts feat(notifications): reminders for todos with upcoming due dates 2026-04-20 17:31:25 +02:00
types.ts feat: journey gallery 1-to-N model with M:N entry-photo junction table 2026-04-22 15:58:31 +02:00
websocket.ts Add comprehensive backend test suite (#339) 2026-04-03 13:17:53 +02:00