import sqlite3

conn = sqlite3.connect('vfx_project_management.db')
cursor = conn.cursor()

# Check all users
cursor.execute('SELECT id, email, role, is_admin FROM users')
users = cursor.fetchall()
print("All users:")
for user in users:
    print(f"  ID: {user[0]}, Email: {user[1]}, Role: {user[2]}, Is Admin: {user[3]}")

# Check admin user specifically
cursor.execute('SELECT id, email, role, is_admin FROM users WHERE email = "admin@vfx.com"')
result = cursor.fetchone()
if result:
    print(f"\nAdmin user: Email: {result[1]}, Role: {result[2]}, Is Admin: {result[3]}")
    
    # Check project membership
    cursor.execute('SELECT project_id FROM project_members WHERE user_id = ?', (result[0],))
    projects = cursor.fetchall()
    print(f"Project memberships: {[p[0] for p in projects]}")
else:
    print("Admin user not found")

conn.close()