mirror of
https://github.com/discourse/discourse.git
synced 2025-03-07 19:59:33 +00:00
FEATURE: force rebake of all posts with images
This was done to pick up 3 changes 1. New pngquant which will result in much smaller images 2. Placeholder images which are missing from old posts 3. Retina images missing from old posts Also picks up on Image Magick upgrade which slightly alters resize algorithm. Rebake trickles per: `rebake_old_posts_count` site setting. (100 per 15 minutes)
This commit is contained in:
parent
570877da3c
commit
30a1d29a7e
@ -0,0 +1,16 @@
|
||||
class ForceRebakeOnPostsWithImages < ActiveRecord::Migration[5.2]
|
||||
def up
|
||||
|
||||
# commit message has more info:
|
||||
# Picking up changes with pngquant, placeholder image, new image magick, retina images
|
||||
|
||||
execute <<~SQL
|
||||
UPDATE posts SET baked_version = 0
|
||||
WHERE id IN (SELECT post_id FROM post_uploads)
|
||||
SQL
|
||||
end
|
||||
|
||||
def down
|
||||
# no op, does not really matter
|
||||
end
|
||||
end
|
Loading…
x
Reference in New Issue
Block a user