This is currently done with some SQL, like this below, but we'd much rather do it in code.
update libraryfilealias
set expires = now() - '30 days'::interval
from
archive, binarypackagefile, binarypackagepublishinghistory, distroseries, distroarchseries
where
archive.purpose = 1
AND binarypackagepublishinghistory.archive = archive.id
AND binarypackagepublishinghistory.status NOT IN (1,2)
AND binarypackagefile.binarypackagerelease = binarypackagepublishinghistory.binarypackagerelease
AND binarypackagefile.libraryfile = libraryfilealias.id
AND libraryfilealias.expires is NULL
AND distroseries.id = distroarchseries.distroseries
AND distroarchseries.id = binarypackagepublishinghistory.distroarchseries
AND distroseries.name = 'intrepid'
;
This is currently done with some SQL, like this below, but we'd much rather do it in code.
update libraryfilealias blishinghistory , distroseries, distroarchseries blishinghistory .archive = archive.id blishinghistory .status NOT IN (1,2) le.binarypackag erelease = binarypackagepu blishinghistory .binarypackager elease le.libraryfile = libraryfilealias.id s.expires is NULL s.distroseries blishinghistory .distroarchseri es
set expires = now() - '30 days'::interval
from
archive, binarypackagefile, binarypackagepu
where
archive.purpose = 1
AND binarypackagepu
AND binarypackagepu
AND binarypackagefi
AND binarypackagefi
AND libraryfilealia
AND distroseries.id = distroarchserie
AND distroarchseries.id = binarypackagepu
AND distroseries.name = 'intrepid'
;