diff --git a/lib/tasks/data_migration.rake b/lib/tasks/data_migration.rake index ff132c4ab..98b3dd3e8 100644 --- a/lib/tasks/data_migration.rake +++ b/lib/tasks/data_migration.rake @@ -19,4 +19,14 @@ namespace :data_migration do NewsBulletinCategory.all.each{|bc| bc.disable=false;bc.save!} end + task :add_search_widget_to_news_and_announcement => :environment do + app = ModuleApp.first({:conditions=>{:title => 'news'}}) + app.widgets << "bulletins_search_block" if app.widgets.include?("bulletins_search_block") + app.save! + app = ModuleApp.first({:conditions=>{:title => 'Announcement'}}) + app.widgets << "news_bulletins_search_block" if app.widgets.include?("news_bulletins_search_block") + app.save! + p "==DO NOT FORGET TO RUN: rake redis_search:index" + end + end \ No newline at end of file