Fixed RPG

This commit is contained in:
2026-06-01 07:44:38 +03:00
parent 600ad78f05
commit d4cd8f02f4
30 changed files with 1516 additions and 816 deletions
+6 -1
View File
@@ -103,6 +103,8 @@ async def _migrate_personas_columns(db):
await db.execute("ALTER TABLE personas ADD COLUMN lorebook_json TEXT DEFAULT '[]'")
if "avatar_path" not in cols:
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 '[]'")
async def _migrate_sessions_columns(db):
@@ -126,7 +128,8 @@ async def _migrate_sessions_columns(db):
await db.execute("ALTER TABLE sessions ADD COLUMN genre TEXT DEFAULT 'adventure'")
if "rpg_settings_json" not in cols:
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 '[]'")
async def _migrate_rpg_quests(db):
await db.executescript("""
@@ -165,3 +168,5 @@ async def _migrate_characters_columns(db):
cols = {row[1] for row in await cur.fetchall()}
if "avatar_path" not in cols:
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 '[]'")