diff options
author | Arun Agrawal <arunagw@gmail.com> | 2011-11-17 12:24:40 +0530 |
---|---|---|
committer | Arun Agrawal <arunagw@gmail.com> | 2011-11-17 12:24:40 +0530 |
commit | 5ccd9bcc1a3012573e6ab19ac52abf8917374bea (patch) | |
tree | 795f6aaa1728a2a4c6963a339350cb9fe561936f /activerecord | |
parent | e3671422556ac61f39539264713ba9c04814b80f (diff) | |
download | rails-5ccd9bcc1a3012573e6ab19ac52abf8917374bea.tar.gz rails-5ccd9bcc1a3012573e6ab19ac52abf8917374bea.tar.bz2 rails-5ccd9bcc1a3012573e6ab19ac52abf8917374bea.zip |
No need to `readlines` then `join`, just use `read` :heart:
same as 4c1a1933cbc5ab96efe340a3b31ac5fee12c99c8
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/railties/databases.rake | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/railties/databases.rake b/activerecord/lib/active_record/railties/databases.rake index 5964fa9cb0..4ffcf6dbc1 100644 --- a/activerecord/lib/active_record/railties/databases.rake +++ b/activerecord/lib/active_record/railties/databases.rake @@ -430,7 +430,7 @@ db_namespace = namespace :db do `sqlcmd -S #{abcs[env]['host']} -d #{abcs[env]['database']} -U #{abcs[env]['username']} -P #{abcs[env]['password']} -i db\\structure.sql` when 'oci', 'oracle' ActiveRecord::Base.establish_connection(abcs[env]) - IO.readlines("#{Rails.root}/db/structure.sql").join.split(";\n\n").each do |ddl| + IO.read("#{Rails.root}/db/structure.sql").split(";\n\n").each do |ddl| ActiveRecord::Base.connection.execute(ddl) end when 'firebird' |