#!/usr/bin/env python3 import sqlite3 from pathlib import Path db_path = Path('src/quant_engine/snapshot_admin.db') conn = sqlite3.connect(db_path) cursor = conn.cursor() # 테이블 목록 cursor.execute("SELECT name FROM sqlite_master WHERE type='table'") tables = [row[0] for row in cursor.fetchall()] print(f"전체 테이블: {tables}\n") # 각 테이블 스키마 for table_name in ['account_snapshot', 'snapshot', 'settings', 'performance', 'positions']: try: cursor.execute(f"PRAGMA table_info({table_name})") cols = cursor.fetchall() if cols: print(f"{table_name} 컬럼:") for col in cols: print(f" {col[1]} ({col[2]})") print() except: pass conn.close()