mirror of
				https://github.com/redmine/redmine.git
				synced 2025-10-30 18:06:30 +01:00 
			
		
		
		
	git-svn-id: http://redmine.rubyforge.org/svn/trunk@752 e93f8b46-1217-0410-a6f0-8f06a7374b81
		
			
				
	
	
		
			16 lines
		
	
	
		
			439 B
		
	
	
	
		
			Ruby
		
	
	
	
	
	
			
		
		
	
	
			16 lines
		
	
	
		
			439 B
		
	
	
	
		
			Ruby
		
	
	
	
	
	
| 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
 |