diff --git a/db/migrate/20100517153944_add_missing_response_time_exp_to_votes.rb b/db/migrate/20100517153944_add_missing_response_time_exp_to_votes.rb index 328f45f..8f9d750 100644 --- a/db/migrate/20100517153944_add_missing_response_time_exp_to_votes.rb +++ b/db/migrate/20100517153944_add_missing_response_time_exp_to_votes.rb @@ -3,7 +3,11 @@ class AddMissingResponseTimeExpToVotes < ActiveRecord::Migration add_column :votes, :missing_response_time_exp, :string, :default => "" add_column :skips, :missing_response_time_exp, :string, :default => "" + begin recording_client_time_start_date = Vote.find(:all, :conditions => 'time_viewed IS NOT NULL', :order => 'created_at', :limit => 1).first.created_at + rescue + recording_client_time_start_date = nil + end Vote.find_each do |v| if v.created_at <= recording_client_time_start_date && v.time_viewed.nil? v.missing_response_time_exp = "missing" -- libgit2 0.21.2