from django.db import connection

with connection.cursor() as cursor:
    cursor.execute("SHOW TABLES LIKE '%mpesa%';")
    tables = cursor.fetchall()
    print("Tables with 'mpesa' in name:")
    for table in tables:
        print(f"  - {table[0]}")
    
    print("\nAll tables:")
    cursor.execute("SHOW TABLES;")
    all_tables = cursor.fetchall()
    for table in all_tables:
        if 'transaction' in table[0].lower() or 'mpesa' in table[0].lower():
            print(f"  - {table[0]}")
