diff options
author | José Valim <jose.valim@plataformatec.com.br> | 2013-12-23 20:15:52 +0100 |
---|---|---|
committer | José Valim <jose.valim@plataformatec.com.br> | 2013-12-23 20:15:52 +0100 |
commit | c390e60811b2e11bfd5d79b15bfb43690c1a1339 (patch) | |
tree | acac77d1a71e5e2091b6abdd3a1c7146a6832960 /activerecord/lib/active_record/railties | |
parent | d22a359a18d4ff0e31cb96293f03687e5db719ba (diff) | |
download | rails-c390e60811b2e11bfd5d79b15bfb43690c1a1339.tar.gz rails-c390e60811b2e11bfd5d79b15bfb43690c1a1339.tar.bz2 rails-c390e60811b2e11bfd5d79b15bfb43690c1a1339.zip |
Guarantee the connection resolver handles string values
This commit also cleans up the rake tasks that were checking
for DATABASE_URL in different places.
In fact, it would be nice to deprecate DATABASE_URL usage in the long
term, considering the direction we are moving of allowing those in .yml
files.
Diffstat (limited to 'activerecord/lib/active_record/railties')
-rw-r--r-- | activerecord/lib/active_record/railties/databases.rake | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/activerecord/lib/active_record/railties/databases.rake b/activerecord/lib/active_record/railties/databases.rake index 0fdfed991c..90dfc177e5 100644 --- a/activerecord/lib/active_record/railties/databases.rake +++ b/activerecord/lib/active_record/railties/databases.rake @@ -14,11 +14,7 @@ db_namespace = namespace :db do desc 'Create the database from DATABASE_URL or config/database.yml for the current Rails.env (use db:create:all to create all databases in the config)' task :create => [:load_config] do - if ENV['DATABASE_URL'] - ActiveRecord::Tasks::DatabaseTasks.create_database_url - else - ActiveRecord::Tasks::DatabaseTasks.create_current - end + ActiveRecord::Tasks::DatabaseTasks.create_current end namespace :drop do @@ -29,11 +25,7 @@ db_namespace = namespace :db do desc 'Drops the database using DATABASE_URL or the current Rails.env (use db:drop:all to drop all databases)' task :drop => [:load_config] do - if ENV['DATABASE_URL'] - ActiveRecord::Tasks::DatabaseTasks.drop_database_url - else - ActiveRecord::Tasks::DatabaseTasks.drop_current - end + ActiveRecord::Tasks::DatabaseTasks.drop_current end desc "Migrate the database (options: VERSION=x, VERBOSE=false, SCOPE=blog)." |