Reisen: Wunschliste, Besuche mit Fotos, Zeitleiste und Statistik

- Wunschliste (Spalte travel_cities.wish): eigene Punktform auf der Karte,
  zählt nicht als besucht, für andere Konten unsichtbar; "War ich da ✓"
- Besuche je Stadt (Tabellen travel_visits, travel_visit_photos): Zeitraum,
  Begleitung, Notizen, Fotos (Upload ohne Metadaten); nur für das eigene
  Konto; ein Besuch macht aus einem Wunsch einen Besuch
- Fotos von Besuchen zählen beim Aufräumen verwaister Bilder als benutzt;
  beim Entfernen eines Fotos, Besuchs oder einer Stadt werden die Dateien
  gelöscht
- Zeitleiste "Wann war ich wo?" nach Jahren, Fotos mit Lightbox
- Statistik: Länder (Welt, je Kontinent), Landfläche, äußerste Orte,
  Kilometer entlang der Besuche
- Ansichten unter der Karte als Tabs: Besuchte Orte, Zeitleiste,
  Statistik, Wunschliste
- Migration Schritt 4, Tests für Wunschliste, Besuche, Fotos und Aufräumen

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
guyg1474andClaude Opus 5.5 committed 2026-10-15 19:25:07 +02:00
1 parent 9835f5e69e
commit bbf740603e
16 files changed
+695 -32

No files matched your search

+19
View File
@@ -198,10 +198,29 @@ CREATE TABLE IF NOT EXISTS travel_cities (
elevation REAL,
timezone TEXT,
capital INTEGER, -- Hauptstadt (GeoNames PPLC); NULL = noch nicht abgefragt
wish INTEGER NOT NULL DEFAULT 0, -- 1 = Wunschliste (noch nicht besucht)
created_at TEXT NOT NULL,
UNIQUE (user_id, geoname_id)
);
-- Besuche einer Stadt (nur für das eigene Konto sichtbar): Zeitraum, Begleitung, Notizen, Fotos
CREATE TABLE IF NOT EXISTS travel_visits (
id INTEGER PRIMARY KEY,
city_id INTEGER NOT NULL REFERENCES travel_cities(id) ON DELETE CASCADE,
date_from TEXT NOT NULL, -- JJJJ-MM-TT
date_to TEXT,
companions TEXT NOT NULL DEFAULT '',
notes TEXT NOT NULL DEFAULT '',
created_at TEXT NOT NULL
);
CREATE TABLE IF NOT EXISTS travel_visit_photos (
visit_id INTEGER NOT NULL REFERENCES travel_visits(id) ON DELETE CASCADE,
file TEXT NOT NULL, -- Datei in data/uploads (ohne Metadaten gespeichert)
position INTEGER NOT NULL,
PRIMARY KEY (visit_id, file)
);
CREATE TABLE IF NOT EXISTS travel_countries (
user_id INTEGER NOT NULL REFERENCES users(id) ON DELETE CASCADE,
code TEXT NOT NULL,