"""List persisted ComfyUI SQLite tables and recent rows for capture recovery.""" import sqlite3 connection = sqlite3.connect("/workspace/ComfyUI/user/comfyui-v031.db") tables = connection.execute( "SELECT name FROM sqlite_master WHERE type = 'table' ORDER BY name" ).fetchall() print(tables) for (table,) in tables: count = connection.execute(f'SELECT COUNT(*) FROM "{table}"').fetchone()[0] print(table, count)