Mercurial > hg > soundsoftware-site
diff db/migrate/007_create_journals.rb @ 1298:4f746d8966dd redmine_2.3_integration
Merge from redmine-2.3 branch to create new branch redmine-2.3-integration
author | Chris Cannam |
---|---|
date | Fri, 14 Jun 2013 09:28:30 +0100 |
parents | 622f24f53b42 |
children |
line wrap: on
line diff
--- a/db/migrate/007_create_journals.rb Fri Jun 14 09:07:32 2013 +0100 +++ b/db/migrate/007_create_journals.rb Fri Jun 14 09:28:30 2013 +0100 @@ -28,7 +28,7 @@ Permission.create :controller => "issues", :action => "history", :description => "label_history", :sort => 1006, :is_public => true, :mail_option => 0, :mail_enabled => 0 # data migration - IssueHistory.find(:all, :include => :issue).each {|h| + IssueHistory.all.each {|h| j = Journal.new(:journalized => h.issue, :user_id => h.author_id, :notes => h.notes, :created_on => h.created_on) j.details << JournalDetail.new(:property => 'attr', :prop_key => 'status_id', :value => h.status_id) j.save @@ -51,6 +51,6 @@ add_index "issue_histories", ["issue_id"], :name => "issue_histories_issue_id" - Permission.find(:first, :conditions => ["controller=? and action=?", 'issues', 'history']).destroy + Permission.where("controller=? and action=?", 'issues', 'history').first.destroy end end