summaryrefslogtreecommitdiffstats
path: root/db/migrate/20110228000100_copy_repositories_log_encoding.rb
blob: 314932883bf3392cb8464b5e5421c1e45c24d42c (plain)
1
2
3
4
5
6
7
8
9
10
11
class CopyRepositoriesLogEncoding < ActiveRecord::Migration
  def self.up
    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')")
  end

  def self.down
  end
end