import pymysql

DB_CONFIG = {
    'host': 'localhost',
    'database': 'xygbfpsg_loans',
    'user': 'xygbfpsg_graz',
    'password': 'j.ez-xy6##y.rllB'
}

conn = pymysql.connect(**DB_CONFIG)
cursor = conn.cursor()

print("Checking loans table columns:")
cursor.execute("DESCRIBE loans")
for row in cursor.fetchall():
    print(f"  {row[0]} - {row[1]}")

print("\nChecking borrowers table columns:")
cursor.execute("DESCRIBE borrowers")
for row in cursor.fetchall():
    print(f"  {row[0]} - {row[1]}")

print("\nChecking rollover_requests table columns:")
cursor.execute("DESCRIBE rollover_requests")
for row in cursor.fetchall():
    print(f"  {row[0]} - {row[1]}")

cursor.close()
conn.close()
