Mercurial > hg > soundsoftware-site
comparison db/migrate/20110228000100_copy_repositories_log_encoding.rb @ 1517:dffacf8a6908 redmine-2.5
Update to Redmine SVN revision 13367 on 2.5-stable branch
author | Chris Cannam |
---|---|
date | Tue, 09 Sep 2014 09:29:00 +0100 |
parents | 433d4f72a19b |
children |
comparison
equal
deleted
inserted
replaced
1516:b450a9d58aed | 1517:dffacf8a6908 |
---|---|
1 class CopyRepositoriesLogEncoding < ActiveRecord::Migration | 1 class CopyRepositoriesLogEncoding < ActiveRecord::Migration |
2 def self.up | 2 def self.up |
3 encoding = Setting.commit_logs_encoding.to_s.strip | 3 encoding = Setting.commit_logs_encoding.to_s.strip |
4 encoding = encoding.blank? ? 'UTF-8' : encoding | 4 encoding = encoding.blank? ? 'UTF-8' : encoding |
5 # encoding is NULL by default | 5 # encoding is NULL by default |
6 Repository.update_all(["log_encoding = ?", encoding], "type IN ('Bazaar', 'Cvs', 'Darcs')") | 6 Repository.where("type IN ('Bazaar', 'Cvs', 'Darcs')"). |
7 update_all(["log_encoding = ?", encoding]) | |
7 end | 8 end |
8 | 9 |
9 def self.down | 10 def self.down |
10 end | 11 end |
11 end | 12 end |