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
|
2011-12-03 17:42:58 +04:00
|
|
|
Repository.update_all(["log_encoding = ?", encoding], "type IN ('Bazaar', 'Cvs', 'Darcs')")
|
2011-03-01 13:14:47 +03:00
|
|
|
end
|
|
|
|
|
|
|
|
def self.down
|
|
|
|
end
|
|
|
|
end
|