Skip to content

Commit

Permalink
Duplicate last migration so it re-applies in prod
Browse files Browse the repository at this point in the history
  • Loading branch information
eins78 committed Feb 19, 2015
1 parent 54bf661 commit 6250a27
Show file tree
Hide file tree
Showing 2 changed files with 188 additions and 173 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
class RecreatePreviewsFixJgSizeConstraint02 < ActiveRecord::Migration
disable_ddl_transaction!
def change
MediaFile.where("created_at > '2014-10-01'::date").find_each do |mf|
if mf.previews_creatable?
begin
mf.recreate_image_previews!
rescue Exception => e
Rails.logger.warn Formatter.exception_to_log_s(e)
end
end
end
end
end
Loading

0 comments on commit 6250a27

Please sign in to comment.