Part 1 of Yadda exercise

Created some yadda tables
Add Delete cascades and unique constraints

Added unique constraints to avoid having duplicate users, beers, beer
styles, breweries and ratings. Also added deletes on cascades to remove
child entries when parent entries are removed to keep data integrity.
For part 2 of exercise do few query insertions.

Did a few insertions, an update and delete to realize the futility of
all this. Off to go write a script that will do this for me.
Added Faker gem to assist with the fakeness
Use pg gem and set ruby to 1.9.3

need to make ruby script to populate db
Yadda DB populator.

This will populate the database with a bunch of stuff. Due to collisions
the query calls are within begin's.
Entries into ratings have different create dates.

Create dates now range from a couple of years ago to now.
Views created.

Views for top rated beers per brewery and recent average scores have
been made.
Added new view for beers you might enjoy.

New view added for beers you might enjoy as well as a view for
avg_beer_scores.
Drop views if they already exist.

Ensure that potential conflicts with view names do not happen.
Semicolons!

Semicolons! My Kingdom for a few semicolons!
Changed order that views would be dropped

Views are dropped if they already exist. The order in which they are
dropped has also been changed to avoid dependency issues
Add pry gem
Fix DB schema for yadda.

created at and updated at fields are now timestamp with tz. Also
timestamps that are entered should be in UTC
Timestamps inserted in UTC timezone
Fixed you might enjoy view

View displays a single beer style and orders randomly
Top rated beers query improved.

Query has one layer removed and has the rank and order portion moved
down a level.
Made improvement to you might also enjoy query

Also changed the subquery for the average ratings to give the top
average ratings which are scores of 4 or above.
Corrected drop view statement.

Had changed a view name and just now corrected the drop view statement
in case it exists.
Correcting styling thanks to rubocop

Rubocop told me to be better person.