Sha256: e9d7fdee24015603331642f77f462f1e13823c4d82ec56b9a6089d6cea729d1f

Contents?: true

Size: 1.09 KB

Versions: 15

Compression:

Stored size: 1.09 KB

Contents

class ChangeKatelloWidgetNames < ActiveRecord::Migration
  class Widget < ActiveRecord::Base
    self.table_name = "widgets"
  end

  def up
    Widget.where(:name => 'Errata Widget').update_all(:name => 'Latest Errata')
    Widget.where(:name => 'Content Views Widget').update_all(:name => 'Content Views')
    Widget.where(:name => 'Content Host Subscription Status Widget').update_all(:name => 'Host Subscription Status')
    Widget.where(:name => 'Subscription Status Widget').update_all(:name => 'Subscription Status')
    Widget.where(:name => 'Host Collection Widget').update_all(:name => 'Host Collections')
  end

  def down
    Widget.where(:name => 'Latest Errata').update_all(:name => 'Errata Widget')
    Widget.where(:name => 'Content Views').update_all(:name => 'Content Views Widget')
    Widget.where(:name => 'Host Subscription Status').update_all(:name => 'Content Host Subscription Status Widget')
    Widget.where(:name => 'Subscription Status Widget').update_all(:name => 'Subscription Status')
    Widget.where(:name => 'Host Collections').update_all(:name => 'Host Collection Widget')
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
katello-3.4.5 db/migrate/20160924213020_change_katello_widget_names.rb
katello-3.4.4 db/migrate/20160924213020_change_katello_widget_names.rb
katello-3.4.2 db/migrate/20160924213020_change_katello_widget_names.rb
katello-3.4.1 db/migrate/20160924213020_change_katello_widget_names.rb
katello-3.4.0.2 db/migrate/20160924213020_change_katello_widget_names.rb
katello-3.4.0.1 db/migrate/20160924213020_change_katello_widget_names.rb
katello-3.3.2 db/migrate/20160924213020_change_katello_widget_names.rb
katello-3.4.0 db/migrate/20160924213020_change_katello_widget_names.rb
katello-3.4.0.rc2 db/migrate/20160924213020_change_katello_widget_names.rb
katello-3.4.0.rc1 db/migrate/20160924213020_change_katello_widget_names.rb
katello-3.3.1.1 db/migrate/20160924213020_change_katello_widget_names.rb
katello-3.3.1 db/migrate/20160924213020_change_katello_widget_names.rb
katello-3.3.0.1 db/migrate/20160924213020_change_katello_widget_names.rb
katello-3.3.0 db/migrate/20160924213020_change_katello_widget_names.rb
katello-3.3.0.rc2 db/migrate/20160924213020_change_katello_widget_names.rb