mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 07:53:49 +08:00
DEV: Add timestamp columns to optimized_images table (#10199)
This allows us to filter by created/updated date when comparing to an S3 inventory.
This commit is contained in:
@ -61,7 +61,7 @@ class S3Inventory
|
||||
WHERE #{model.table_name}.etag IS NULL AND
|
||||
#{model.table_name}.url = #{table_name}.url")
|
||||
|
||||
uploads = (model == Upload) ? model.by_users.where("updated_at < ?", inventory_date) : model
|
||||
uploads = model.by_users.where("updated_at < ?", inventory_date)
|
||||
missing_uploads = uploads
|
||||
.joins("LEFT JOIN #{table_name} ON #{table_name}.etag = #{model.table_name}.etag")
|
||||
.where("#{table_name}.etag IS NULL AND #{model.table_name}.etag IS NOT NULL")
|
||||
|
Reference in New Issue
Block a user