Fix database stuff

by removing attr_accessor in photograph.rb