Created
April 8, 2015 16:55
-
-
Save nicovalencia/73ff33a55781a381ae47 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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