Feature: ORS-Wochenlimit (20/Woche), Tages-Cache, Privilegien-Bypass, Datenschutz-Update — SW by-v480, APP_VER 457

This commit is contained in:
rene 2026-04-29 08:23:55 +02:00
parent ca8bb495b0
commit 7048499624
8 changed files with 121 additions and 14 deletions

View file

@ -1411,3 +1411,14 @@ def _migrate(conn_factory):
if col not in existing_h:
conn.execute(f"ALTER TABLE health ADD COLUMN {col} {typedef}")
logger.info(f"Migration: health.{col} hinzugefügt.")
# Route-Suggest Rate-Limiting
conn.executescript("""
CREATE TABLE IF NOT EXISTS route_suggest_usage (
user_id INTEGER NOT NULL REFERENCES users(id) ON DELETE CASCADE,
week TEXT NOT NULL,
count INTEGER NOT NULL DEFAULT 0,
PRIMARY KEY (user_id, week)
);
""")
logger.info("Migration: route_suggest_usage Tabelle bereit.")