Social Media Manager: Route, DB, KI-Prompts, Frontend, Rolle; SW by-v338
This commit is contained in:
parent
d90d4f1eeb
commit
0df6d569c1
9 changed files with 784 additions and 6 deletions
|
|
@ -522,6 +522,8 @@ def _migrate(conn_factory):
|
|||
("users", "current_streak", "INTEGER NOT NULL DEFAULT 0"),
|
||||
("users", "max_streak", "INTEGER NOT NULL DEFAULT 0"),
|
||||
("users", "last_activity_date","TEXT"),
|
||||
# Social Media Manager
|
||||
("users", "is_social_media", "INTEGER NOT NULL DEFAULT 0"),
|
||||
]
|
||||
with conn_factory() as conn:
|
||||
for table, column, col_type in migrations:
|
||||
|
|
@ -535,6 +537,36 @@ def _migrate(conn_factory):
|
|||
)
|
||||
logger.info(f"Migration: {table}.{column} hinzugefügt.")
|
||||
|
||||
# Social Media Manager
|
||||
conn.executescript("""
|
||||
CREATE TABLE IF NOT EXISTS social_content (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
created_at TEXT NOT NULL DEFAULT (datetime('now')),
|
||||
created_by INTEGER REFERENCES users(id) ON DELETE SET NULL,
|
||||
platform TEXT NOT NULL DEFAULT 'both',
|
||||
format TEXT NOT NULL DEFAULT 'post',
|
||||
topic TEXT NOT NULL,
|
||||
caption TEXT,
|
||||
hashtags TEXT,
|
||||
visual_brief TEXT,
|
||||
image_prompt TEXT,
|
||||
canva_notes TEXT,
|
||||
script TEXT,
|
||||
hook TEXT,
|
||||
cta TEXT,
|
||||
unsplash_query TEXT,
|
||||
ai_score INTEGER,
|
||||
status TEXT NOT NULL DEFAULT 'idea',
|
||||
scheduled_at TEXT,
|
||||
published_at TEXT,
|
||||
source TEXT NOT NULL DEFAULT 'generated',
|
||||
breed_id INTEGER REFERENCES wiki_rassen(id) ON DELETE SET NULL,
|
||||
notes TEXT
|
||||
);
|
||||
CREATE INDEX IF NOT EXISTS idx_social_content_status
|
||||
ON social_content(status);
|
||||
""")
|
||||
|
||||
# Knigge: Community-Votes
|
||||
conn.executescript("""
|
||||
CREATE TABLE IF NOT EXISTS knigge_votes (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue