DB Migration: social_content fehlende Spalten (coaching, media_url, category, exercise_id)
This commit is contained in:
parent
548210b908
commit
75615140c4
1 changed files with 25 additions and 0 deletions
|
|
@ -524,6 +524,10 @@ def _migrate(conn_factory):
|
||||||
("users", "last_activity_date","TEXT"),
|
("users", "last_activity_date","TEXT"),
|
||||||
# Social Media Manager
|
# Social Media Manager
|
||||||
("users", "is_social_media", "INTEGER NOT NULL DEFAULT 0"),
|
("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:
|
with conn_factory() as conn:
|
||||||
for table, column, col_type in migrations:
|
for table, column, col_type in migrations:
|
||||||
|
|
@ -590,6 +594,27 @@ def _migrate(conn_factory):
|
||||||
ON training_exercises(kategorie);
|
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
|
# Knigge: Community-Votes
|
||||||
conn.executescript("""
|
conn.executescript("""
|
||||||
CREATE TABLE IF NOT EXISTS knigge_votes (
|
CREATE TABLE IF NOT EXISTS knigge_votes (
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue