aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/tasks/postgresql_database_tasks.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/lib/active_record/tasks/postgresql_database_tasks.rb')
-rw-r--r--activerecord/lib/active_record/tasks/postgresql_database_tasks.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/tasks/postgresql_database_tasks.rb b/activerecord/lib/active_record/tasks/postgresql_database_tasks.rb
index dabc69b9cd..a210392e53 100644
--- a/activerecord/lib/active_record/tasks/postgresql_database_tasks.rb
+++ b/activerecord/lib/active_record/tasks/postgresql_database_tasks.rb
@@ -48,6 +48,11 @@ module ActiveRecord
File.open(filename, "a") { |f| f << "SET search_path TO #{ActiveRecord::Base.connection.schema_search_path};\n\n" }
end
+ def structure_load(filename)
+ set_psql_env
+ Kernel.system("psql -f #{filename} #{configuration['database']}")
+ end
+
private
def configuration