aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2010-06-09 16:39:01 -0400
committerDavid Heinemeier Hansson <david@loudthinking.com>2010-06-09 16:39:01 -0400
commitfa15111d30f05edac7e4f63264e25887a5a4ae20 (patch)
treef08eb2aee7155e1dda54dc8f3648fece0b8dc149 /activerecord/lib/active_record
parent29acc17c0f3c6697f174b228a738819024f81c87 (diff)
downloadrails-fa15111d30f05edac7e4f63264e25887a5a4ae20.tar.gz
rails-fa15111d30f05edac7e4f63264e25887a5a4ae20.tar.bz2
rails-fa15111d30f05edac7e4f63264e25887a5a4ae20.zip
Silence even more noisy rake task docs
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r--activerecord/lib/active_record/railties/databases.rake24
1 files changed, 12 insertions, 12 deletions
diff --git a/activerecord/lib/active_record/railties/databases.rake b/activerecord/lib/active_record/railties/databases.rake
index 952f2a3070..6f7e71bfe6 100644
--- a/activerecord/lib/active_record/railties/databases.rake
+++ b/activerecord/lib/active_record/railties/databases.rake
@@ -134,7 +134,7 @@ 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)
@@ -142,7 +142,7 @@ namespace :db do
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'
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