Sha256: 08b7e8e803ee89be0b3afd8007fd20644f5043fa2c38cf39872d89062da3f7b9
Contents?: true
Size: 1.02 KB
Versions: 82
Compression:
Stored size: 1.02 KB
Contents
class UpdateEventPerformancesViewWithSite < ActiveRecord::Migration def up execute <<-SQL CREATE OR REPLACE VIEW festivity_event_performances AS SELECT performance.id AS performance_id, performance.start_date, performance.end_date, event.id AS event_id, event.title AS event_title, event.short_description, event.buy_url, event.featured_item, event.header, event.sub_header, event.site_id, location.id as location_id, location.slug AS location_slug, location.title AS location_title, location.festivity_directions_url, area.id AS area_id, area.slug as area_slug, area.title AS area_title FROM festivity_performances performance INNER JOIN pages event ON event.id = performance.event_page_id INNER JOIN pages location ON location.id = performance.location_page_id INNER JOIN pages area ON area.id = location.parent_id SQL end def down execute 'DROP VIEW festivity_event_performances' end end
Version data entries
82 entries across 82 versions & 1 rubygems