I'm building an app where each user can have multiple profiles. Users can upload multiple photos for each profile, etc.
The folder structure will be something like
public_html/
upload/
user-123/
profile-199/
profile-321/
images/
123423.png
I'm going to have a one to many relationship between each profile and each photo, but I'm trying to see how I should flag a photo as special and the users "profile photo".
My proposed table structure is something like this
id
profile_id
filename (or maybe extension only, since filename will most likely just be the primary id for that photo)
profile (boolean field of whether this a profile pic or not)
date_added
How should I treat special images, like profile pictures?
Edit: Sorry if I wasnt clear. I want each user to be able to have multiple profiles, each profile to have many photos. Just like for Facebook, you can have many photos, but only one profile pic at any time.