Fixed RPG
This commit is contained in:
+6
-1
@@ -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 '[]'")
|
||||
|
||||
Reference in New Issue
Block a user