carlsednaoui / nycio

NYC Tech Volunteer Database
6 stars 2 forks source link

Location #27

Closed mattjstar closed 10 years ago

mattjstar commented 10 years ago

I imagine we'll want to attach location to the Occurrence model. Would it be better for us to create a Location model to handle this?

So for example, an Occurrence has_one Location while a Location could theoretically have many events? So the Brooklyn Public Library might have many events at it?

I know the easy way out is to add location_name and address text columns to the Occurrences table, but it might be better to do this Location model idea to keep things DRY and more extendable.

carlsednaoui commented 10 years ago

@mattjstar / @miclovich your pick. You know that my answer would be "keep it simple for now and add it as an occurrence field" :smiley:

miclovich commented 10 years ago

make it location agnostic with a default field of New York (so, in the future, if your city is missing, all you have to do is "add it" lol)

mattjstar commented 10 years ago

The problem we're going to run into is we can't have any default values except USA, what if an event is in Brooklyn, or Hoboken? So we can't have default state: NY nor default city: New York.

I think creating a location table is the way to go even though it's slightly more complicated. Would definitely solve a few headaches down the road. What do you think @miclovich?