mirror of
				https://github.com/redmine/redmine.git
				synced 2025-11-04 04:15:53 +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
							 |