2011-03-01 13:14:47 +03:00
|
|
|
class CopyRepositoriesLogEncoding < ActiveRecord::Migration
|
|
|
|
def self.up
|
|
|
|
encoding = Setting.commit_logs_encoding.to_s.strip
|
|
|
|
encoding = encoding.blank? ? 'UTF-8' : encoding
|
2011-12-03 17:38:04 +04:00
|
|
|
# encoding is NULL by default
|
2014-01-07 14:03:11 +04:00
|
|
|
Repository.where("type IN ('Bazaar', 'Cvs', 'Darcs')").
|
|
|
|
update_all(["log_encoding = ?", encoding])
|
2011-03-01 13:14:47 +03:00
|
|
|
end
|
|
|
|
|
|
|
|
def self.down
|
|
|
|
end
|
|
|
|
end
|