From 6961a4f43ebfde37f4ecab3d2d72a6fa642a27fb Mon Sep 17 00:00:00 2001 From: Sam Date: Fri, 4 Jan 2019 09:25:04 +1100 Subject: [PATCH] Revert "Revert "FEATURE: force rebake of all posts with images"" This reverts commit cb317430a1c27f4d45f3a53efbcd29c77ea8f9e0. No longer needed per: 70269c7c9727cf9c4d2 --- ...03060819_force_rebake_on_posts_with_images.rb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 db/migrate/20190103060819_force_rebake_on_posts_with_images.rb diff --git a/db/migrate/20190103060819_force_rebake_on_posts_with_images.rb b/db/migrate/20190103060819_force_rebake_on_posts_with_images.rb new file mode 100644 index 00000000000..3837aae59e0 --- /dev/null +++ b/db/migrate/20190103060819_force_rebake_on_posts_with_images.rb @@ -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