Feature: Admin Outreach — E-Mail-Versand via Hetzner SMTP, Vorlagen, Log, SW by-v567
This commit is contained in:
parent
230455c250
commit
b6258db6bc
6 changed files with 261 additions and 2 deletions
|
|
@ -1509,6 +1509,21 @@ def _migrate(conn_factory):
|
|||
except Exception as e:
|
||||
logger.warning(f"Migration partner_codes: {e}")
|
||||
|
||||
# Outreach-Log (Admin-E-Mail-Versand)
|
||||
try:
|
||||
conn.executescript("""
|
||||
CREATE TABLE IF NOT EXISTS outreach_log (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
sent_by INTEGER REFERENCES users(id),
|
||||
recipient TEXT NOT NULL,
|
||||
subject TEXT NOT NULL,
|
||||
body TEXT NOT NULL,
|
||||
sent_at TEXT NOT NULL DEFAULT (datetime('now'))
|
||||
);
|
||||
""")
|
||||
except Exception as e:
|
||||
logger.warning(f"Migration outreach_log: {e}")
|
||||
|
||||
# js_exercise_id zu training_exercises — verbindet training_exercises mit exercise_progress
|
||||
existing_te = [row[1] for row in conn.execute("PRAGMA table_info(training_exercises)").fetchall()]
|
||||
if 'js_exercise_id' not in existing_te:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue