mirror of
https://github.com/quay/quay.git
synced 2026-01-27 18:42:52 +03:00
The "uploading" column is an artifact from depending on writing to the Image table (see BlobUpload table instead). As of 3.4, Quay no longer writes to that table, and is only needed until quayio moves away from Clair v2, after which work to remove "glue" code and fully deprecate the Image table (amongst other tables) can start. This is done as a separate commit from the actual migration so that it can be cherrypicked.
16 lines
312 B
Python
16 lines
312 B
Python
from data.database import Image, ImageStorage
|
|
from peewee import JOIN, fn
|
|
from app import app
|
|
|
|
orphaned = (
|
|
ImageStorage.select()
|
|
.join(Image, JOIN.LEFT_OUTER)
|
|
.group_by(ImageStorage)
|
|
.having(fn.Count(Image.id) == 0)
|
|
)
|
|
|
|
counter = 0
|
|
for orphan in orphaned:
|
|
counter += 1
|
|
print(orphan.uuid)
|