Sha256: 4d0c13a26fc2a406ba151b0bc6b34c48ef7170da8d4c88132c67e5aa718b8489
Contents?: true
Size: 832 Bytes
Versions: 34
Compression:
Stored size: 832 Bytes
Contents
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
Version data entries
34 entries across 34 versions & 1 rubygems