diff --git a/modules/store/src/main/scala/docspell/store/queries/QCollective.scala b/modules/store/src/main/scala/docspell/store/queries/QCollective.scala index 2bbb1b94..1e811660 100644 --- a/modules/store/src/main/scala/docspell/store/queries/QCollective.scala +++ b/modules/store/src/main/scala/docspell/store/queries/QCollective.scala @@ -39,6 +39,9 @@ object QCollective { union distinct select a.file_id,m.length from attachment_source a inner join filemeta m on m.id = a.file_id where a.id in (select aid from attachs) + union distinct + select a.file_id,m.length from attachment_archive a + inner join filemeta m on m.id = a.file_id where a.id in (select aid from attachs) ) as t""".query[Option[Long]].unique val q3 = fr"SELECT" ++ commas(