You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20110228000100_copy_repositories_log_encoding.rb 365B

123456789101112
  1. class CopyRepositoriesLogEncoding < ActiveRecord::Migration[4.2]
  2. def self.up
  3. encoding = Setting.commit_logs_encoding.to_s.strip
  4. encoding = encoding.presence || 'UTF-8'
  5. # encoding is NULL by default
  6. Repository.where("type IN ('Bazaar', 'Cvs', 'Darcs')").
  7. update_all(["log_encoding = ?", encoding])
  8. end
  9. def self.down
  10. end
  11. end