fix: mark books with missing page file size as outdated

This commit is contained in:
Gauthier Roebroeck 2023-06-26 17:43:04 +08:00
parent 4f8dee77ed
commit a03bda9797

View file

@ -0,0 +1,8 @@
update media
set STATUS = 'OUTDATED'
WHERE BOOK_ID in
(select distinct M.BOOK_ID
from MEDIA_PAGE P
inner join MEDIA M on P.BOOK_ID = M.BOOK_ID
where M.MEDIA_TYPE in ('application/zip', 'application/x-rar-compressed; version=4')
and P.FILE_SIZE is null);