Upgrade Peewee to latest 3.x
This requires a number of small changes in the data model code, as well as additional testing.
This commit is contained in:
parent
70b7ee4654
commit
d3d9cca182
26 changed files with 220 additions and 193 deletions
|
@ -1,11 +1,11 @@
|
|||
from data.database import Image, ImageStorage
|
||||
from peewee import JOIN_LEFT_OUTER, fn
|
||||
from peewee import JOIN, fn
|
||||
from app import app
|
||||
|
||||
orphaned = (ImageStorage
|
||||
.select()
|
||||
.where(ImageStorage.uploading == False)
|
||||
.join(Image, JOIN_LEFT_OUTER)
|
||||
.join(Image, JOIN.LEFT_OUTER)
|
||||
.group_by(ImageStorage)
|
||||
.having(fn.Count(Image.id) == 0))
|
||||
|
||||
|
|
Reference in a new issue