Skip to content
Browse files

Silence even more noisy rake task docs

  • Loading branch information...
1 parent 29acc17 commit fa15111d30f05edac7e4f63264e25887a5a4ae20 @dhh dhh committed Jun 9, 2010
Showing with 12 additions and 12 deletions.
  1. +12 −12 activerecord/lib/active_record/railties/databases.rake
View
24 activerecord/lib/active_record/railties/databases.rake
@@ -134,15 +134,15 @@ namespace :db do
end
- desc "Migrate the database through scripts in db/migrate and update db/schema.rb by invoking db:schema:dump. Target specific version with VERSION=x. Turn off output with VERBOSE=false."
+ desc "Migrate the database (options: VERSION=x, VERBOSE=false)."
task :migrate => :environment do
ActiveRecord::Migration.verbose = ENV["VERBOSE"] ? ENV["VERBOSE"] == "true" : true
ActiveRecord::Migrator.migrate("db/migrate/", ENV["VERSION"] ? ENV["VERSION"].to_i : nil)
Rake::Task["db:schema:dump"].invoke if ActiveRecord::Base.schema_format == :ruby
end
namespace :migrate do
- desc 'Rollbacks the database one migration and re migrate up. If you want to rollback more than one step, define STEP=x. Target specific version with VERSION=x.'
+ desc 'Rollbacks the database one migration and re migrate up (options: STEP=x, VERSION=x).'
task :redo => :environment do
if ENV["VERSION"]
Rake::Task["db:migrate:down"].invoke
@@ -173,14 +173,14 @@ namespace :db do
end
end
- desc 'Rolls the schema back to the previous version. Specify the number of steps with STEP=n'
+ desc 'Rolls the schema back to the previous version (specify steps w/ STEP=n).'
task :rollback => :environment do
step = ENV['STEP'] ? ENV['STEP'].to_i : 1
ActiveRecord::Migrator.rollback('db/migrate/', step)
Rake::Task["db:schema:dump"].invoke if ActiveRecord::Base.schema_format == :ruby
end
- desc 'Pushes the schema to the next version. Specify the number of steps with STEP=n'
+ # desc 'Pushes the schema to the next version (specify steps w/ STEP=n).'
task :forward => :environment do
step = ENV['STEP'] ? ENV['STEP'].to_i : 1
ActiveRecord::Migrator.forward('db/migrate/', step)
@@ -190,7 +190,7 @@ namespace :db do
desc 'Drops and recreates the database from db/schema.rb for the current environment and loads the seeds.'
task :reset => [ 'db:drop', 'db:setup' ]
- desc "Retrieves the charset for the current environment's database"
+ # desc "Retrieves the charset for the current environment's database"
task :charset => :environment do
config = ActiveRecord::Base.configurations[Rails.env || 'development']
case config['adapter']
@@ -208,7 +208,7 @@ namespace :db do
end
end
- desc "Retrieves the collation for the current environment's database"
+ # desc "Retrieves the collation for the current environment's database"
task :collation => :environment do
config = ActiveRecord::Base.configurations[Rails.env || 'development']
case config['adapter']
@@ -225,7 +225,7 @@ namespace :db do
puts "Current version: #{ActiveRecord::Migrator.current_version}"
end
- desc "Raises an error if there are pending migrations"
+ # desc "Raises an error if there are pending migrations"
task :abort_if_pending_migrations => :environment do
if defined? ActiveRecord
pending_migrations = ActiveRecord::Migrator.new(:up, 'db/migrate').pending_migrations
@@ -354,10 +354,10 @@ namespace :db do
Rake::Task["db:schema:load"].invoke
end
- desc "Recreate the test database from the current environment's database schema"
+ # desc "Recreate the test database from the current environment's database schema"
task :clone => %w(db:schema:dump db:test:load)
- desc "Recreate the test databases from the development structure"
+ # desc "Recreate the test databases from the development structure"
task :clone_structure => [ "db:structure:dump", "db:test:purge" ] do
abcs = ActiveRecord::Base.configurations
case abcs["test"]["adapter"]
@@ -422,7 +422,7 @@ namespace :db do
end
end
- desc 'Check for pending migrations and load the test schema'
+ # desc 'Check for pending migrations and load the test schema'
@mdiniz
mdiniz added a note Jan 12, 2012

Issue #2560 is open with people wondering why some tasks don't show up in rake -T. Would you please drop a line there and possibly close the issue? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
task :prepare => 'db:abort_if_pending_migrations' do
if defined?(ActiveRecord) && !ActiveRecord::Base.configurations.blank?
Rake::Task[{ :sql => "db:test:clone_structure", :ruby => "db:test:load" }[ActiveRecord::Base.schema_format]].invoke
@@ -431,7 +431,7 @@ namespace :db do
end
namespace :sessions do
- desc "Creates a sessions migration for use with ActiveRecord::SessionStore"
+ # desc "Creates a sessions migration for use with ActiveRecord::SessionStore"
task :create => :environment do
raise "Task unavailable to this database (no migration support)" unless ActiveRecord::Base.connection.supports_migrations?
require 'rails/generators'
@@ -440,7 +440,7 @@ namespace :db do
Rails::Generators::SessionMigrationGenerator.start [ ENV["MIGRATION"] || "add_sessions_table" ]
end
- desc "Clear the sessions table"
+ # desc "Clear the sessions table"
task :clear => :environment do
ActiveRecord::Base.connection.execute "DELETE FROM #{session_table_name}"
end

0 comments on commit fa15111

Please sign in to comment.
Something went wrong with that request. Please try again.