Merge dev into feat/tours and port Tours onto MikroORM

dev now runs on MikroORM, so the positional migrations, seeds.ts and
DatabaseService the Tours server side was built on are gone. Behaviour
is unchanged; persistence moves onto dev's architecture:

- one MikroORM migration for tour_types, tours and tour_waypoints,
  idempotent so instances that ran the old positional steps keep
  their data; the hike tour type is seeded inside it, the addon row
  in the AddonSeeder
- entities and repositories for the three tables, tours domain on
  repositories and UnitOfWork
- tour facet joins in places, assignments and days re-applied on the
  repository code

Fixes found while porting:

- GPX import checks addon, trip access and permission in the handler
  instead of guards, so a refused upload gets a 403/404 instead of a
  connection reset
- copying a trip copies its tours and waypoints
- a tour cannot be moved onto a day that already has it
- updateTour checks existence inside its transaction

Adds tours e2e tests and rewrites the tours unit tests onto the
migrated test database.
This commit is contained in:
Maurice
2026-10-06 22:43:09 +02:00
1638 changed files with 140813 additions and 45013 deletions
+8 -1
View File
@@ -223,7 +223,14 @@ export interface Reservation {
notes?: string | null;
status: string;
type: string;
accommodation_id?: number | null;
/**
* TEXT at the DB, not INTEGER (Plan 3d inventory §18.1 — no FK, some rows
* read back as `"14.0"`): every reader normalises it, so this stays a
* string here rather than the `DayAssignment.accommodation_id` field
* above's genuine INTEGER shape. Do not "fix" this to `number` — that
* field is a different column on a different table.
*/
accommodation_id?: string | null;
metadata?: string | null;
needs_review?: number;
endpoints?: ReservationEndpoint[];