From 93ebfd8b6bd2d211379266f303ec858134a0ae0d Mon Sep 17 00:00:00 2001 From: Russell Quinn Date: Fri, 6 Aug 2010 09:47:20 +0200 Subject: [PATCH] Rake db:create no longer creates the test database automatically to make behaviour clear and consistent with db:drop [#5313 state:resolved] --- .../lib/active_record/railties/databases.rake | 6 +----- railties/guides/source/getting_started.textile | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/activerecord/lib/active_record/railties/databases.rake b/activerecord/lib/active_record/railties/databases.rake index ae605d3..3df4619 100644 --- a/activerecord/lib/active_record/railties/databases.rake +++ b/activerecord/lib/active_record/railties/databases.rake @@ -28,11 +28,7 @@ namespace :db do 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 do - # Make the test database at the same time as the development one, if it exists - if Rails.env.development? && ActiveRecord::Base.configurations['test'] - create_database(ActiveRecord::Base.configurations['test']) - end - create_database(ActiveRecord::Base.configurations[Rails.env]) + create_database(ActiveRecord::Base.configurations[Rails.env || 'development']) end def create_database(config) diff --git a/railties/guides/source/getting_started.textile b/railties/guides/source/getting_started.textile index ffb0310..faaef70 100644 --- a/railties/guides/source/getting_started.textile +++ b/railties/guides/source/getting_started.textile @@ -270,7 +270,7 @@ Now that you have your database configured, it's time to have Rails create an em $ rake db:create -This will create your development and test SQLite3 databases inside the db/ folder. +This will create your development database inside the db/ folder. TIP: Rake is a general-purpose command-runner that Rails uses for many things. You can see the list of available rake commands in your application by running +rake -T+. -- 1.7.1