diff options
-rw-r--r-- | railties/CHANGELOG | 2 | ||||
-rw-r--r-- | railties/lib/tasks/databases.rake | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/railties/CHANGELOG b/railties/CHANGELOG index bd0514a530..4329ee9efe 100644 --- a/railties/CHANGELOG +++ b/railties/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* The PostgreSQL :db_structure_dump task limits its dump to the schema search path in database.yml. [Anatol Pomozov <anatol.pomozov@gmail.com>] + * Add task to generate rdoc for all installed plugins. [Marcel Molina] * Update script.aculo.us to V1.5_rc4 [Thomas Fuchs] diff --git a/railties/lib/tasks/databases.rake b/railties/lib/tasks/databases.rake index 87fde7a958..4a2efa98ee 100644 --- a/railties/lib/tasks/databases.rake +++ b/railties/lib/tasks/databases.rake @@ -44,7 +44,9 @@ task :db_structure_dump => :environment do ENV['PGHOST'] = abcs[RAILS_ENV]["host"] if abcs[RAILS_ENV]["host"] ENV['PGPORT'] = abcs[RAILS_ENV]["port"].to_s if abcs[RAILS_ENV]["port"] ENV['PGPASSWORD'] = abcs[RAILS_ENV]["password"].to_s if abcs[RAILS_ENV]["password"] - `pg_dump -U "#{abcs[RAILS_ENV]["username"]}" -s -x -O -f db/#{RAILS_ENV}_structure.sql #{abcs[RAILS_ENV]["database"]}` + search_path = abcs[RAILS_ENV]["schema_search_path"] + search_path = "--schema=#{search_path}" if search_path + `pg_dump -U "#{abcs[RAILS_ENV]["username"]}" -s -x -O -f db/#{RAILS_ENV}_structure.sql #{search_path} #{abcs[RAILS_ENV]["database"]}` when "sqlite", "sqlite3" `#{abcs[RAILS_ENV]["adapter"]} #{abcs[RAILS_ENV]["dbfile"]} .schema > db/#{RAILS_ENV}_structure.sql` when "sqlserver" |