Mercurial > hg > soundsoftware-site
diff lib/tasks/migrate_plugins.rake @ 0:513646585e45
* Import Redmine trunk SVN rev 3859
author | Chris Cannam |
---|---|
date | Fri, 23 Jul 2010 15:52:44 +0100 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/tasks/migrate_plugins.rake Fri Jul 23 15:52:44 2010 +0100 @@ -0,0 +1,15 @@ +namespace :db do + desc 'Migrates installed plugins.' + task :migrate_plugins => :environment do + if Rails.respond_to?('plugins') + Rails.plugins.each do |plugin| + next unless plugin.respond_to?('migrate') + puts "Migrating #{plugin.name}..." + plugin.migrate + end + else + puts "Undefined method plugins for Rails!" + puts "Make sure engines plugin is installed." + end + end +end