diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-03-19 09:21:01 -0700 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-03-19 09:21:01 -0700 |
commit | 2011cc64e1bdcc252b96b9637c6283efb9402013 (patch) | |
tree | ac62c21ea56596a9d84028413f98118b7b77138d /activerecord/lib | |
parent | 493c10ea2999557b15e5a1efd523e6c987803750 (diff) | |
parent | ca6a12d6e5a8e1034e8d472fb6652111e1314a70 (diff) | |
download | rails-2011cc64e1bdcc252b96b9637c6283efb9402013.tar.gz rails-2011cc64e1bdcc252b96b9637c6283efb9402013.tar.bz2 rails-2011cc64e1bdcc252b96b9637c6283efb9402013.zip |
Merge pull request #9796 from dembskoi/clone_structure
Reset postgreSQL search path in db:test:clone_structure.
Diffstat (limited to 'activerecord/lib')
-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 7f1b84b848..b8aed49854 100644 --- a/activerecord/lib/active_record/railties/databases.rake +++ b/activerecord/lib/active_record/railties/databases.rake @@ -427,6 +427,7 @@ db_namespace = namespace :db do end `pg_dump -i -s -x -O -f #{Shellwords.escape(filename)} #{search_path} #{Shellwords.escape(config['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 = config['database'] `sqlite3 #{dbfile} .schema > #{filename}` |