diff --git a/backend/database.py b/backend/database.py index 3961a8a..822319a 100644 --- a/backend/database.py +++ b/backend/database.py @@ -524,6 +524,10 @@ def _migrate(conn_factory): ("users", "last_activity_date","TEXT"), # Social Media Manager ("users", "is_social_media", "INTEGER NOT NULL DEFAULT 0"), + ("social_content", "coaching", "TEXT"), + ("social_content", "media_url", "TEXT"), + ("social_content", "category", "TEXT"), + ("social_content", "exercise_id", "TEXT"), ] with conn_factory() as conn: for table, column, col_type in migrations: @@ -590,6 +594,27 @@ def _migrate(conn_factory): ON training_exercises(kategorie); """) + # Pflege-Tipps (für Social Media + User-spezifisch) + conn.executescript(""" + CREATE TABLE IF NOT EXISTS pflege_tipps ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + tipp_id TEXT NOT NULL UNIQUE, + titel TEXT NOT NULL, + kategorie TEXT NOT NULL, + beschreibung TEXT, + schritte TEXT, + materialien TEXT, + haeufigkeit TEXT, + fell_typ TEXT, + saison TEXT, + rassengruppe TEXT, + tipp TEXT, + created_at TEXT NOT NULL DEFAULT (datetime('now')) + ); + CREATE INDEX IF NOT EXISTS idx_pflege_tipps_kat + ON pflege_tipps(kategorie); + """) + # Knigge: Community-Votes conn.executescript(""" CREATE TABLE IF NOT EXISTS knigge_votes (