aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2012-08-02 19:41:20 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2012-08-02 19:41:55 -0300
commit9abf589051006b62a2c7f8cf614eff629a083fd5 (patch)
tree8427eb45000c3e8cd9f253d3773a310f51e10afb /activerecord/lib
parent6e523766d8a64bf18ac6d0e261c6bd962bc6c0a9 (diff)
downloadrails-9abf589051006b62a2c7f8cf614eff629a083fd5.tar.gz
rails-9abf589051006b62a2c7f8cf614eff629a083fd5.tar.bz2
rails-9abf589051006b62a2c7f8cf614eff629a083fd5.zip
Remove `:rails_env` task since it is not needed anymore.
Diffstat (limited to 'activerecord/lib')
-rw-r--r--activerecord/lib/active_record/railties/databases.rake18
1 files changed, 9 insertions, 9 deletions
diff --git a/activerecord/lib/active_record/railties/databases.rake b/activerecord/lib/active_record/railties/databases.rake
index f5991e893c..6bb0c39b79 100644
--- a/activerecord/lib/active_record/railties/databases.rake
+++ b/activerecord/lib/active_record/railties/databases.rake
@@ -20,7 +20,7 @@ db_namespace = namespace :db do
end
desc 'Create the database from config/database.yml for the current Rails.env (use db:create:all to create all dbs in the config)'
- task :create => [:load_config, :rails_env] do
+ task :create => [:load_config] do
ActiveRecord::Tasks::DatabaseTasks.create_current
end
@@ -31,7 +31,7 @@ db_namespace = namespace :db do
end
desc 'Drops the database for the current Rails.env (use db:drop:all to drop all databases)'
- task :drop => [:load_config, :rails_env] do
+ task :drop => [:load_config] do
ActiveRecord::Tasks::DatabaseTasks.drop_current
end
@@ -88,7 +88,7 @@ db_namespace = namespace :db do
end
desc 'Display status of migrations'
- task :status => [:environment, :load_config, :rails_env] do
+ task :status => [:environment, :load_config] do
config = ActiveRecord::Base.configurations[Rails.env]
ActiveRecord::Base.establish_connection(config)
unless ActiveRecord::Base.connection.table_exists?(ActiveRecord::Migrator.schema_migrations_table_name)
@@ -142,12 +142,12 @@ db_namespace = namespace :db do
end
# desc "Retrieves the charset for the current environment's database"
- task :charset => [:environment, :load_config, :rails_env] do
+ task :charset => [:environment, :load_config] do
puts ActiveRecord::Tasks::DatabaseTasks.charset_current
end
# desc "Retrieves the collation for the current environment's database"
- task :collation => [:environment, :load_config, :rails_env] do
+ task :collation => [:environment, :load_config] do
begin
puts ActiveRecord::Tasks::DatabaseTasks.collation_current
rescue NoMethodError
@@ -184,7 +184,7 @@ db_namespace = namespace :db do
namespace :fixtures do
desc "Load fixtures into the current environment's database. Load specific fixtures using FIXTURES=x,y. Load from subdirectory in test/fixtures using FIXTURES_DIR=z. Specify an alternative path (eg. spec/fixtures) using FIXTURES_PATH=spec/fixtures."
- task :load => [:environment, :load_config, :rails_env] do
+ task :load => [:environment, :load_config] do
require 'active_record/fixtures'
ActiveRecord::Base.establish_connection(Rails.env)
@@ -222,7 +222,7 @@ db_namespace = namespace :db do
namespace :schema do
desc 'Create a db/schema.rb file that can be portably used against any DB supported by AR'
- task :dump => [:environment, :load_config, :rails_env] do
+ task :dump => [:environment, :load_config] do
require 'active_record/schema_dumper'
filename = ENV['SCHEMA'] || "#{Rails.root}/db/schema.rb"
File.open(filename, "w:utf-8") do |file|
@@ -248,7 +248,7 @@ db_namespace = namespace :db do
namespace :cache do
desc 'Create a db/schema_cache.dump file.'
- task :dump => [:environment, :load_config, :rails_env] do
+ task :dump => [:environment, :load_config] do
con = ActiveRecord::Base.connection
filename = File.join(Rails.application.config.paths["db"].first, "schema_cache.dump")
@@ -277,7 +277,7 @@ db_namespace = namespace :db do
end
desc 'Dump the database structure to db/structure.sql. Specify another file with DB_STRUCTURE=db/my_structure.sql'
- task :dump => [:environment, :load_config, :rails_env] do
+ task :dump => [:environment, :load_config] do
abcs = ActiveRecord::Base.configurations
filename = ENV['DB_STRUCTURE'] || File.join(Rails.root, "db", "structure.sql")
case abcs[Rails.env]['adapter']