-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Duplicate last migration so it re-applies in prod
- Loading branch information
Showing
2 changed files
with
188 additions
and
173 deletions.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
db/migrate/20150219182142_recreate_previews_fix_jg_size_constraint_02.rb
This file contains 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
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 |
Oops, something went wrong.