diff options
author | kennyj <kennyj@gmail.com> | 2013-03-28 14:00:19 +0900 |
---|---|---|
committer | kennyj <kennyj@gmail.com> | 2013-04-03 01:11:36 +0900 |
commit | 0074d7d28bc75759a8835b25ab455dd597b46a9b (patch) | |
tree | 93aaa4141e84f45a22fb6096a1c1edc68d4521fc | |
parent | 17c41583908e8c771a4cf7267229a9ab151e1763 (diff) | |
download | rails-0074d7d28bc75759a8835b25ab455dd597b46a9b.tar.gz rails-0074d7d28bc75759a8835b25ab455dd597b46a9b.tar.bz2 rails-0074d7d28bc75759a8835b25ab455dd597b46a9b.zip |
Fix tiny problem: change method order for consistency and fix wrong method name.
-rw-r--r-- | activerecord/lib/active_record/railties/databases.rake | 2 | ||||
-rw-r--r-- | activerecord/test/cases/tasks/postgresql_rake_test.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/railties/databases.rake b/activerecord/lib/active_record/railties/databases.rake index 513b1bb488..78afed5e91 100644 --- a/activerecord/lib/active_record/railties/databases.rake +++ b/activerecord/lib/active_record/railties/databases.rake @@ -286,8 +286,8 @@ db_namespace = namespace :db do # desc "Recreate the databases from the structure.sql file" task :load => [:environment, :load_config] do - current_config = ActiveRecord::Tasks::DatabaseTasks.current_config filename = ENV['DB_STRUCTURE'] || File.join(Rails.root, "db", "structure.sql") + current_config = ActiveRecord::Tasks::DatabaseTasks.current_config ActiveRecord::Tasks::DatabaseTasks.structure_load(current_config, filename) end diff --git a/activerecord/test/cases/tasks/postgresql_rake_test.rb b/activerecord/test/cases/tasks/postgresql_rake_test.rb index 3006a87589..7e7a469edd 100644 --- a/activerecord/test/cases/tasks/postgresql_rake_test.rb +++ b/activerecord/test/cases/tasks/postgresql_rake_test.rb @@ -225,7 +225,7 @@ module ActiveRecord Kernel.stubs(:system) end - def test_structure_dump + def test_structure_load filename = "awesome-file.sql" Kernel.expects(:system).with("psql -f #{filename} my-app-db") |