redmine/db/migrate/20110228000100_copy_repositories_log_encoding.rb
Jean-Philippe Lang 66cc0fe7ab Typo.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8044 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-12-03 13:42:58 +00:00

12 lines
344 B
Ruby

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