updated structure_with_views.sql and rake task to generate it