import sys
import os
sys.path.append(os.path.join(os.getcwd(), 'backend'))
import db

def inspect_tables():
    print("--- order_photos table ---")
    columns = db.execute_query("SHOW COLUMNS FROM order_photos")
    for col in columns:
        print(f"{col['Field']}: {col['Type']} (Null: {col['Null']}, Key: {col['Key']})")
    
    print("\n--- orders table ---")
    columns = db.execute_query("SHOW COLUMNS FROM orders")
    for col in columns:
        print(f"{col['Field']}: {col['Type']}")

if __name__ == "__main__":
    inspect_tables()
