Remove db:migrate_plugins task.

Use the equivalent db:migrate:plugins instead that is provided by the
engines plugin directly.
This commit is contained in:
Holger Just 2011-07-27 15:19:00 +02:00
parent c63954a4c7
commit 06076e5ac1
5 changed files with 4 additions and 31 deletions

View File

@ -7,7 +7,7 @@ This is a sample plugin for Redmine
1. Copy the plugin directory into the vendor/plugins directory
2. Migrate plugin:
rake db:migrate_plugins
rake db:migrate:plugins
3. Start Redmine

View File

@ -12,7 +12,7 @@
#++
# Sample plugin migration
# Use rake db:migrate_plugins to migrate installed plugins
# Use rake db:migrate:plugins to migrate installed plugins
class CreateMeetings < ActiveRecord::Migration
def self.up
create_table :meetings do |t|

View File

@ -29,7 +29,7 @@ namespace :ci do
Rake::Task["db:drop"].invoke
Rake::Task["db:create"].invoke
Rake::Task["db:migrate"].invoke
Rake::Task["db:migrate_plugins"].invoke
Rake::Task["db:migrate:plugins"].invoke
Rake::Task["db:schema:dump"].invoke
Rake::Task["test:scm:update"].invoke
end

View File

@ -20,3 +20,4 @@ end
deprecated_task :load_default_data, "redmine:load_default_data"
deprecated_task :migrate_from_mantis, "redmine:migrate_from_mantis"
deprecated_task :migrate_from_trac, "redmine:migrate_from_trac"
deprecated_task "db:migrate_plugins", "db:migrate:plugins"

View File

@ -1,28 +0,0 @@
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2011 the ChiliProject Team
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
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