mirror of
https://github.com/redmine/redmine.git
synced 2024-08-18 02:12:06 +02:00
![Jean-Philippe Lang](/assets/img/avatar_default.png)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@12209 e93f8b46-1217-0410-a6f0-8f06a7374b81
18 lines
832 B
Ruby
18 lines
832 B
Ruby
class SupportForMultipleCommitKeywords < ActiveRecord::Migration
|
|
def up
|
|
# Replaces commit_fix_keywords, commit_fix_status_id, commit_fix_done_ratio settings
|
|
# with commit_update_keywords setting
|
|
keywords = Setting.where(:name => 'commit_fix_keywords').limit(1).pluck(:value).first
|
|
status_id = Setting.where(:name => 'commit_fix_status_id').limit(1).pluck(:value).first
|
|
done_ratio = Setting.where(:name => 'commit_fix_done_ratio').limit(1).pluck(:value).first
|
|
if keywords.present?
|
|
Setting.commit_update_keywords = [{'keywords' => keywords, 'status_id' => status_id, 'done_ratio' => done_ratio}]
|
|
end
|
|
Setting.where(:name => %w(commit_fix_keywords commit_fix_status_id commit_fix_done_ratio)).delete_all
|
|
end
|
|
|
|
def down
|
|
Setting.where(:name => 'commit_update_keywords').delete_all
|
|
end
|
|
end
|