From bc8136e3bf730bcb12f91217a551b536a966199c Mon Sep 17 00:00:00 2001 From: Akhil Bansal Date: Tue, 16 Dec 2008 19:17:34 +0530 Subject: [PATCH] added new rake task db:prepare, which actually creates a db and run migrations for a given env. --- railties/lib/tasks/databases.rake | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/railties/lib/tasks/databases.rake b/railties/lib/tasks/databases.rake index 68ffefa..37e05f4 100644 --- a/railties/lib/tasks/databases.rake +++ b/railties/lib/tasks/databases.rake @@ -4,6 +4,9 @@ namespace :db do ActiveRecord::Base.configurations = Rails::Configuration.new.database_configuration end + desc 'Create the database defined in config/database.yml and migrate the database through scripts in db/migrate for the current RAILS_ENV' + task :prepare => ["db:create", "db:migrate"] + namespace :create do desc 'Create all the local databases defined in config/database.yml' task :all => :load_config do -- 1.6.0.1