@@ -1,17 +1,17 | |||
|
1 | 1 | class SupportForMultipleCommitKeywords < ActiveRecord::Migration |
|
2 | 2 | def up |
|
3 | 3 | # Replaces commit_fix_keywords, commit_fix_status_id, commit_fix_done_ratio settings |
|
4 | 4 | # with commit_update_keywords setting |
|
5 | 5 | keywords = Setting.where(:name => 'commit_fix_keywords').limit(1).pluck(:value).first |
|
6 | 6 | status_id = Setting.where(:name => 'commit_fix_status_id').limit(1).pluck(:value).first |
|
7 | 7 | done_ratio = Setting.where(:name => 'commit_fix_done_ratio').limit(1).pluck(:value).first |
|
8 | 8 | if keywords.present? |
|
9 |
Setting.commit_update_keywords = {keywords => |
|
|
9 | Setting.commit_update_keywords = [{'keywords' => keywords, 'status_id' => status_id, 'done_ratio' => done_ratio}] | |
|
10 | 10 | end |
|
11 | 11 | Setting.where(:name => %w(commit_fix_keywords commit_fix_status_id commit_fix_done_ratio)).delete_all |
|
12 | 12 | end |
|
13 | 13 | |
|
14 | 14 | def down |
|
15 | 15 | Setting.where(:name => 'commit_update_keywords').delete_all |
|
16 | 16 | end |
|
17 | 17 | end |
General Comments 0
You need to be logged in to leave comments.
Login now