shadowbrain / shadow_brain_core /check_schema_multi.py
taemin1980's picture
🔱 Imperial Deployment: Shadow Brain Core ignition
d50a68d verified
Raw
History Blame Contribute Delete
713 Bytes
import psycopg2
from sovereign_memory import DB_URL
def check_schema():
try:
conn = psycopg2.connect(DB_URL)
cur = conn.cursor()
tables = ['chat_history', 'guardian_announcements']
for table in tables:
print(f"\n--- {table} Schema ---")
cur.execute(f"SELECT column_name, data_type FROM information_schema.columns WHERE table_schema = 'taemingames' AND table_name = '{table}'")
cols = cur.fetchall()
for c in cols:
print(f" - {c[0]}: {c[1]}")
cur.close()
conn.close()
except Exception as e:
print(f"Error: {e}")
if __name__ == "__main__":
check_schema()