Sha256: d93d143e95db6f96892891ee625fecfd4c791c48cc31f9697a2d906f7d5ef2cc

Contents?: true

Size: 482 Bytes

Versions: 33

Compression:

Stored size: 482 Bytes

Contents

class MoveSubscriptionsToIcal < ActiveRecord::Migration

  def self.up
    Calendar.find(:all).each do |c|
      Ical.create(:ical_url=>c.ical_url, :last_refresh_date=>c.last_refresh_date, :last_refresh_count=>c.last_refresh_count, :calendar_id=>c.id)
    end
  end

  def self.down
    Ical.find(:all).each do |c|
      Calendar.create(:ical_url=>c.ical_url, :last_refresh_date=>c.last_refresh_date, :last_refresh_count=>c.last_refresh_count, :calendar_id=>c.id)
    end
  end

end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
radiant-event_calendar-extension-1.3.6 db/migrate/007_move_subscriptions_to_ical.rb
radiant-event_calendar-extension-1.3.5 db/migrate/007_move_subscriptions_to_ical.rb
radiant-event_calendar-extension-1.3.4 db/migrate/007_move_subscriptions_to_ical.rb
radiant-event_calendar-extension-1.3.3 db/migrate/007_move_subscriptions_to_ical.rb
radiant-event_calendar-extension-1.3.2 db/migrate/007_move_subscriptions_to_ical.rb
radiant-event_calendar-extension-1.3.1 db/migrate/007_move_subscriptions_to_ical.rb
radiant-event_calendar-extension-1.3.0 db/migrate/007_move_subscriptions_to_ical.rb
radiant-event_calendar-extension-1.1.2 db/migrate/007_move_subscriptions_to_ical.rb
radiant-event_calendar-extension-1.1.1 db/migrate/007_move_subscriptions_to_ical.rb
radiant-event_calendar-extension-1.1.0 db/migrate/007_move_subscriptions_to_ical.rb
radiant-event_calendar-extension-1.0.2 db/migrate/007_move_subscriptions_to_ical.rb
radiant-event_calendar-extension-1.0.1 db/migrate/007_move_subscriptions_to_ical.rb
radiant-event_calendar-extension-1.0.0 db/migrate/007_move_subscriptions_to_ical.rb