Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save nicovalencia/73ff33a55781a381ae47 to your computer and use it in GitHub Desktop.
Save nicovalencia/73ff33a55781a381ae47 to your computer and use it in GitHub Desktop.
class RestrictPrecisionOnExistingMetrics < ActiveRecord::Migration
def up
ActiveRecord::Base.record_timestamps = false
begin
AnswersMetric.find_each(&:save)
MetricValue.find_each(&:save)
ensure
ActiveRecord::Base.record_timestamps = true
end
end
def down
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment