diff --git a/CLAUDE.md b/CLAUDE.md
index 4f7a888..abca6e6 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -4,7 +4,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
## Project Overview
-stammtisch-hersbruck.de is a SvelteKit 5 application using Svelte 5's new runes syntax ($state, $props, etc.) with PocketBase as the backend. The app manages events, runs, riders, times and teams for a motorsport/cycling event organization.
+stammtisch-hersbruck.de is a SvelteKit 5 application using Svelte 5's new runes syntax ($state, $props, etc.) with PocketBase as the backend. The app manages events, stages, riders, times and teams for a motorsport/cycling event organization.
The repository is a monorepo: the SvelteKit app lives in `frontend/`, the PocketBase instance in `backend/`.
@@ -60,7 +60,7 @@ docker compose down
Container und müssen mit `docker compose cp` ins Repo geholt werden; siehe
`backend/README.md`.
- **Type-safe client**: The PocketBase client is typed using auto-generated types in `frontend/src/lib/types.d.ts`
-- **Collections**: users, teams, team_invites, events, runs, riders, times,
+- **Collections**: users, teams, team_invites, events, stages, riders, times,
trails, trail_versions, trail_flags, trail_markers, trail_comments,
event_participants, event_series
- **Regeln**: Jede Zugriffsregel, die `@request.auth.id` erwähnt, beginnt mit
diff --git a/backend/README.md b/backend/README.md
index d60c210..e1a1519 100644
--- a/backend/README.md
+++ b/backend/README.md
@@ -21,7 +21,7 @@ Damit das Frontend gegen diese Instanz läuft, in `../frontend/.env`
Das Schema liegt als versionierte Migration in `pb_migrations/` und wird beim
Start automatisch angewendet. Es enthält die sechs fachlichen Collections
-`users`, `teams`, `events`, `runs`, `riders`, `times`.
+`users`, `teams`, `events`, `stages`, `riders`, `times`.
`1754400000_init_schema.js` ist ein Snapshot der produktiven Instanz. Er wurde
per `GET /api/collections` abgezogen und ruft `importCollections` mit
diff --git a/backend/pb_migrations/1754400000_init_schema.js b/backend/pb_migrations/1754400000_init_schema.js
index efe36c8..3c4d8c9 100644
--- a/backend/pb_migrations/1754400000_init_schema.js
+++ b/backend/pb_migrations/1754400000_init_schema.js
@@ -588,7 +588,7 @@ migrate((app) => {
"createRule": "team.users.id ?= @request.auth.id",
"updateRule": "team.users.id ?= @request.auth.id",
"deleteRule": "team.users.id ?= @request.auth.id",
- "name": "runs",
+ "name": "stages",
"type": "base",
"fields": [
{
@@ -916,7 +916,7 @@ migrate((app) => {
"id": "ltfephwe",
"maxSelect": 1,
"minSelect": 0,
- "name": "run",
+ "name": "stage",
"presentable": false,
"required": false,
"system": false,
diff --git a/backend/pb_migrations/1754502000_runs_become_stages.js b/backend/pb_migrations/1754502000_runs_become_stages.js
new file mode 100644
index 0000000..a01ea26
--- /dev/null
+++ b/backend/pb_migrations/1754502000_runs_become_stages.js
@@ -0,0 +1,45 @@
+///
{riderLabel(t.rider, t.run)}
+{riderLabel(t.rider, t.stage)}
{#if path} - {runLabel(t.run)} + {stageLabel(t.stage)} {:else} - {runLabel(t.run)} + {stageLabel(t.stage)} {/if}
Run nicht gefunden
+Stage nicht gefunden
Vermutlich gehört er nicht zum aktiven Team oder wurde gelöscht.
@@ -109,7 +109,7 @@{running.length} laufend · {leaderboard.length} gewertet · {starters.length} am Start
@@ -249,4 +249,4 @@