diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2012-05-25 17:03:21 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2012-05-25 17:03:21 -0700 |
commit | 1ca31331ba1234132ea6f91204059b8660c44b69 (patch) | |
tree | 8e92bdec488e3a0797ad87d40a7056ec6bfb1b5b /activerecord | |
parent | 85c56b018fc7a693acbf265db871a9d96b537a86 (diff) | |
parent | 5662ea511225b34d3b533d03614c496c007215b0 (diff) | |
download | rails-1ca31331ba1234132ea6f91204059b8660c44b69.tar.gz rails-1ca31331ba1234132ea6f91204059b8660c44b69.tar.bz2 rails-1ca31331ba1234132ea6f91204059b8660c44b69.zip |
Merge pull request #4132 from Juanmcuello/clone_structure
Reset postgreSQL search path in db:test:clone_structure.
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/railties/databases.rake | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/railties/databases.rake b/activerecord/lib/active_record/railties/databases.rake index 791a22958c..d8d4834d22 100644 --- a/activerecord/lib/active_record/railties/databases.rake +++ b/activerecord/lib/active_record/railties/databases.rake @@ -410,6 +410,7 @@ db_namespace = namespace :db do end `pg_dump -i -s -x -O -f #{Shellwords.escape(filename)} #{search_path} #{Shellwords.escape(abcs[Rails.env]['database'])}` raise 'Error dumping database' if $?.exitstatus == 1 + File.open(filename, "a") { |f| f << "SET search_path TO #{ActiveRecord::Base.connection.schema_search_path};\n\n" } when /sqlite/ dbfile = abcs[Rails.env]['database'] `sqlite3 #{dbfile} .schema > #{filename}` |