This repository has been archived on 2024-03-16. You can view files and clone it, but cannot push or open issues or pull requests.
orbit-4-1/lib/tasks/data_migration.rake

22 lines
794 B
Ruby
Raw Normal View History

2012-07-03 07:47:28 +00:00
require 'resque_scheduler/tasks'
# encoding: utf-8
namespace :data_migration do
task :add_order_to_announcement_tag_0703 => :environment do
AnnouncementTag.first({conditions:{ key: 'students' }}).update_attributes(:order=>1)
AnnouncementTag.first({conditions:{ key: 'alumni' }}).update_attributes(:order=>2)
AnnouncementTag.first({conditions:{ key: 'employee' }}).update_attributes(:order=>3)
AnnouncementTag.first({conditions:{ key: 'guest' }}).update_attributes(:order=>4)
end
2012-07-04 09:56:51 +00:00
task :add_archive_func_to_bulletin_category_0704 => :environment do
BulletinCategory.all.each{|bc| bc.disable=false;bc.save!}
end
task :add_archive_func_to_news_bulletin_category_0704 => :environment do
NewsBulletinCategory.all.each{|bc| bc.disable=false;bc.save!}
end
2012-07-03 07:47:28 +00:00
end