Fixed SD RPG

This commit is contained in:
2026-06-04 08:05:06 +03:00
parent d4cd8f02f4
commit 6189a5fb74
62 changed files with 6969 additions and 552 deletions
+17
View File
@@ -86,6 +86,12 @@ async def _migrate_messages_columns(db):
await db.execute("ALTER TABLE messages ADD COLUMN image_prompt TEXT")
if "image_path" not in cols:
await db.execute("ALTER TABLE messages ADD COLUMN image_path TEXT")
if "image_prompt_alt" not in cols:
await db.execute("ALTER TABLE messages ADD COLUMN image_prompt_alt TEXT")
if "image_path_alt" not in cols:
await db.execute("ALTER TABLE messages ADD COLUMN image_path_alt TEXT")
if "choices_json" not in cols:
await db.execute("ALTER TABLE messages ADD COLUMN choices_json TEXT")
async def _migrate_personas_columns(db):
@@ -105,6 +111,8 @@ async def _migrate_personas_columns(db):
await db.execute("ALTER TABLE personas ADD COLUMN avatar_path TEXT DEFAULT ''")
if "alternate_greetings_json" not in cols:
await db.execute("ALTER TABLE personas ADD COLUMN alternate_greetings_json TEXT DEFAULT '[]'")
if "appearance_prose" not in cols:
await db.execute("ALTER TABLE personas ADD COLUMN appearance_prose TEXT DEFAULT ''")
async def _migrate_sessions_columns(db):
@@ -130,6 +138,13 @@ async def _migrate_sessions_columns(db):
await db.execute("ALTER TABLE sessions ADD COLUMN rpg_settings_json TEXT DEFAULT '{}'")
if "outfit_json" not in cols:
await db.execute("ALTER TABLE sessions ADD COLUMN outfit_json TEXT DEFAULT '[]'")
if "scene_json" not in cols:
await db.execute("ALTER TABLE sessions ADD COLUMN scene_json TEXT DEFAULT '{}'")
if "narrative_stats_json" not in cols:
await db.execute(
"ALTER TABLE sessions ADD COLUMN narrative_stats_json TEXT DEFAULT "
"'{\"lust\":0,\"stamina\":10,\"tension\":0}'"
)
async def _migrate_rpg_quests(db):
await db.executescript("""
@@ -170,3 +185,5 @@ async def _migrate_characters_columns(db):
await db.execute("ALTER TABLE characters ADD COLUMN avatar_path TEXT DEFAULT ''")
if "alternate_greetings_json" not in cols:
await db.execute("ALTER TABLE characters ADD COLUMN alternate_greetings_json TEXT DEFAULT '[]'")
if "appearance_prose" not in cols:
await db.execute("ALTER TABLE characters ADD COLUMN appearance_prose TEXT DEFAULT ''")