mirror of
				https://github.com/redmine/redmine.git
				synced 2025-10-31 10:25:55 +01:00 
			
		
		
		
	
		
			
	
	
		
			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 |