class StaticsIssueJournal < ActiveRecord::Migration def up Project.all.each do |project| if !project.project_score.nil? && !project.project_score.issue_journal_num.nil? project.update_attribute(:journals_count, project.project_score.issue_journal_num) end end end def down end end