summaryrefslogtreecommitdiffstats
path: root/db/migrate/20110228000100_copy_repositories_log_encoding.rb
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2014-01-07 10:03:11 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2014-01-07 10:03:11 +0000
commit0bc3ef5014dd8611fb1771061b57529bf4920e8b (patch)
tree22195b5e912bb9e6d518e1117eac6b6a614a9ca2 /db/migrate/20110228000100_copy_repositories_log_encoding.rb
parenta5f028a2424e2e234081b6a84c496fb6c563ee9c (diff)
downloadredmine-0bc3ef5014dd8611fb1771061b57529bf4920e8b.tar.gz
redmine-0bc3ef5014dd8611fb1771061b57529bf4920e8b.zip
Rails4: replace deprecated Relation#update_all at db migrations
git-svn-id: http://svn.redmine.org/redmine/trunk@12488 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'db/migrate/20110228000100_copy_repositories_log_encoding.rb')
-rw-r--r--db/migrate/20110228000100_copy_repositories_log_encoding.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/db/migrate/20110228000100_copy_repositories_log_encoding.rb b/db/migrate/20110228000100_copy_repositories_log_encoding.rb
index 314932883..48d387138 100644
--- a/db/migrate/20110228000100_copy_repositories_log_encoding.rb
+++ b/db/migrate/20110228000100_copy_repositories_log_encoding.rb
@@ -3,7 +3,8 @@ class CopyRepositoriesLogEncoding < ActiveRecord::Migration
encoding = Setting.commit_logs_encoding.to_s.strip
encoding = encoding.blank? ? 'UTF-8' : encoding
# encoding is NULL by default
- Repository.update_all(["log_encoding = ?", encoding], "type IN ('Bazaar', 'Cvs', 'Darcs')")
+ Repository.where("type IN ('Bazaar', 'Cvs', 'Darcs')").
+ update_all(["log_encoding = ?", encoding])
end
def self.down