import sqlite3
import json
conn = sqlite3.connect(r'c:\Projects\FreeExile\data\game_design_matrix.db')
tables = [r[0] for r in conn.execute('SELECT name FROM sqlite_master WHERE type="table"')]
res = {}
for t in tables:
    cols = conn.execute(f'PRAGMA table_info({t})').fetchall()
    pks = [c[1] for c in cols if c[5] > 0]
    res[t] = pks
print(json.dumps(res, indent=2))
