##// END OF EJS Templates
Do not trigger repository validation in migration....
Jean-Philippe Lang -
r7923:1fbcd1051ead
parent child
Show More
@@ -2,15 +2,8 class CopyRepositoriesLogEncoding < ActiveRecord::Migration
2 def self.up
2 def self.up
3 encoding = Setting.commit_logs_encoding.to_s.strip
3 encoding = Setting.commit_logs_encoding.to_s.strip
4 encoding = encoding.blank? ? 'UTF-8' : encoding
4 encoding = encoding.blank? ? 'UTF-8' : encoding
5 Repository.find(:all).each do |repo|
5 # encoding is NULL by default
6 scm = repo.scm_name
6 Repository.update_all(["log_encoding = ?", encoding], "log_encoding IN ('Bazaar', 'Cvs', 'Darcs')")
7 case scm
8 when 'Subversion', 'Mercurial', 'Git', 'Filesystem'
9 repo.update_attribute(:log_encoding, nil)
10 else
11 repo.update_attribute(:log_encoding, encoding)
12 end
13 end
14 end
7 end
15
8
16 def self.down
9 def self.down
General Comments 0
You need to be logged in to leave comments. Login now