view .svn/pristine/cf/cfe48899ec41bed831622374c58670076f47ba53.svn-base @ 1539:22d57b0e0a77 live

OK, this script works now, but it should be using the API
author Chris Cannam <chris.cannam@soundsoftware.ac.uk>
date Thu, 21 May 2015 17:31:06 +0100
parents 038ba2d95de8
children
line wrap: on
line source
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