20110228000100_copy_repositories_log_encoding.rb
11 lines
| 344 B
| text/x-ruby
|
RubyLexer
|
r4861 | class CopyRepositoriesLogEncoding < ActiveRecord::Migration | ||
def self.up | ||||
encoding = Setting.commit_logs_encoding.to_s.strip | ||||
encoding = encoding.blank? ? 'UTF-8' : encoding | ||||
|
r7923 | # encoding is NULL by default | ||
|
r7924 | Repository.update_all(["log_encoding = ?", encoding], "type IN ('Bazaar', 'Cvs', 'Darcs')") | ||
|
r4861 | end | ||
def self.down | ||||
end | ||||
end | ||||