20110228000100_copy_repositories_log_encoding.rb 352 Bytes
Newer Older
1 2 3 4
class CopyRepositoriesLogEncoding < ActiveRecord::Migration
  def self.up
    encoding = Setting.commit_logs_encoding.to_s.strip
    encoding = encoding.blank? ? 'UTF-8' : encoding
5 6
    # encoding is NULL by default
    Repository.update_all(["log_encoding = ?", encoding], "log_encoding IN ('Bazaar', 'Cvs', 'Darcs')")
7 8 9 10 11
  end

  def self.down
  end
end