Feature: Fell-Typ Einstellung am Hundeprofil — personalisierte Wetter-Hinweise (SW by-v693)
- DB-Migration: dogs.fell_typ (kurz|mittel|lang|drahtaar|doppel|nackt)
- Hund-Profil Formular: Dropdown "Felltyp" mit 6 Optionen, wird via PATCH /api/dogs/{id} gespeichert
- Wetter: _dogWeatherLabel(d, felltyp) mit fell-spezifischen Hitze-/Kälteschwellen
- Wetter: Fell-spezifische Hinweise (doppel + Hitze, nackt + Kälte, kurz + Frost)
This commit is contained in:
parent
471633867c
commit
af1508c0de
6 changed files with 80 additions and 12 deletions
|
|
@ -540,6 +540,9 @@ def _migrate(conn_factory):
|
|||
("pflege_tipps", "fell_pflege_art", "TEXT"),
|
||||
# Wiki-Foto-Einreichungen: Bildrechte-Bestätigung
|
||||
("wiki_foto_submissions", "rights_confirmed", "INTEGER NOT NULL DEFAULT 0"),
|
||||
# Tagebuch-Medien: Bildmaße für Querformat-Filter
|
||||
("diary_media", "img_width", "INTEGER"),
|
||||
("diary_media", "img_height", "INTEGER"),
|
||||
# Tagebuch: Wetter + POI-Metadaten beim Eintrag
|
||||
("diary", "weather_json", "TEXT"),
|
||||
("diary", "poi_json", "TEXT"),
|
||||
|
|
@ -568,6 +571,8 @@ def _migrate(conn_factory):
|
|||
# Passwort-Zurücksetzen
|
||||
("users", "password_reset_token", "TEXT"),
|
||||
("users", "password_reset_expires", "TEXT"),
|
||||
# Fell-Typ für personalisierte Wetter-Hinweise
|
||||
("dogs", "fell_typ", "TEXT"), # kurz|mittel|lang|drahtaar|doppel|nackt
|
||||
]
|
||||
with conn_factory() as conn:
|
||||
for table, column, col_type in migrations:
|
||||
|
|
@ -1940,6 +1945,12 @@ def _migrate(conn_factory):
|
|||
CREATE INDEX IF NOT EXISTS idx_dq_kategorie ON daily_quotes(kategorie);
|
||||
""")
|
||||
|
||||
# Goldene Gassi-Stunde: User-Einstellung
|
||||
existing_u = [row[1] for row in conn.execute("PRAGMA table_info(users)").fetchall()]
|
||||
if 'gassi_stunde_push' not in existing_u:
|
||||
conn.execute("ALTER TABLE users ADD COLUMN gassi_stunde_push INTEGER NOT NULL DEFAULT 0")
|
||||
logger.info("Migration: users.gassi_stunde_push bereit.")
|
||||
|
||||
# Wiederkehrende Ausgaben (Daueraufträge)
|
||||
conn.executescript("""
|
||||
CREATE TABLE IF NOT EXISTS recurring_expenses (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue