Feature: Gassi-Hundefotos bei Teilnehmern + Fotos nach dem Treffen (SW by-v878)

This commit is contained in:
rene 2026-05-12 17:04:43 +02:00
parent b6a644ac3a
commit 44ba51cd38
8 changed files with 230 additions and 20 deletions

View file

@ -2210,6 +2210,22 @@ def _migrate(conn_factory):
except Exception:
pass
# Gassi-Treffen Fotos
try:
conn.execute("""
CREATE TABLE IF NOT EXISTS walk_photos (
id INTEGER PRIMARY KEY AUTOINCREMENT,
walk_id INTEGER NOT NULL REFERENCES walks(id) ON DELETE CASCADE,
user_id INTEGER NOT NULL REFERENCES users(id) ON DELETE CASCADE,
url TEXT NOT NULL,
created_at TEXT NOT NULL DEFAULT (datetime('now'))
)
""")
conn.execute("CREATE INDEX IF NOT EXISTS idx_walk_photos_walk ON walk_photos(walk_id)")
logger.info("Migration: walk_photos bereit.")
except Exception as e:
logger.warning(f"Migration walk_photos: {e}")
# Versicherungs-Verwaltung
try:
conn.execute("""