Closed ajansel closed 6 years ago
I will talk to you more in person about the PhotosAlbums table to decide whether or not it is necessary. The main intention was to have Photos belongs_to an Album(s).
Otherwise, I have edited the proposed changes. Thank you.
Going to wait to close this until we talk but I checked off the things that you have updated sense, great job on the table reformatting! In the meantime here are a few more small things:
photo_id
and body
for a tag, user_id
and name
for album, and photoalbums maybe (we'll discuss in person) that way they can be unique
? photo_id
should be removed from photos
album_id
references So I added a body field for the albums as text to simulate how Flickr has decided their album feature. Otherwise I've added the proposed changes. Talk soon!
I think you're in good shape!
Database Schema
[x] Contains correct datatypes
Description
for photos and albums should probably be texts. Additionally,body
within comments should probably be text as well.[ ] Contains appropriate constraints/details
photo_id
foreign key. They'llhave_many :photos
[x] Contains bullet points after the table that state which foreign keys will reference to which table, or references to the associations which will be made
[x] Correctly formatted
back_ticked
back_ticked
Comments:
I would also add a
username
column for users so that it's nicer to display than email.My recommendation would be to have users have
img_urls
for a profile picture. This will ensure that there are not profiles without pictures that would make the site bare. I can explain more on this when we meet as well if you'd like. There's an easy way to set a default to give you the ability to add increased flexibility later.Do all photos have to have an album? If not, this will be an issue with having the
album_id
foreign key for photo unless you make itoptional
.I don't think you'll need a
PhotosAlbums
join table unless I am misunderstanding some functionality.