Converted raw SQL create view statements to Sequel so they will run on Postgres