title: Rake - how to use to modify database.yml config prior to invoking task?
body: <p>I have a database with a public schema where we keep login/account information and multiple client schemas for client data.  I've successfully used yaml_db to dump/load test data into a client schema, but this requires constantly modifying the schema_search_path between the public schema and client specific one each time I want to reload data.</p>
  
  <p>I'm trying to build a rake task to automate this, but am unsure how to modify schema_search_path in prior to invoking the db:data:load task.  </p>
  
  <p>I can view the current values in database.yml by doing this:</p>
  
  <p><code>env = "#{RAILS_ENV}"</code> <br>
  <code>config = YAML::load(File.open('config/database.yml'))</code><br>
  <code>puts config[env]["schema_search_path"]</code></p>
  
  <p>But I'm unclear how to modify that value to be used when i call</p>
  
  <p><code>Rake::Task['db:data:load'].invoke</code></p>
  
  <p>I've tried just assigning a new value to the <br><br>
  <code>config[env]["schema_search_path"] = "test_data_schema"</code></p>
  
  <p>but that doesn't appear to work</p>