選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

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