feat: Introduce is_deleted flag for items, add scripts for dummy data and thumbnail population, and refine item deletion and statistics.
This commit is contained in:
@@ -109,7 +109,12 @@ export default new class {
|
||||
const deleted = +(await db`
|
||||
select count(*) as total
|
||||
from "items"
|
||||
where active = false
|
||||
where active = false and is_deleted = true
|
||||
`)[0].total;
|
||||
const pending = +(await db`
|
||||
select count(*) as total
|
||||
from "items"
|
||||
where active = false and is_deleted = false
|
||||
`)[0].total;
|
||||
const lastf0ck = +(await db`
|
||||
select max(id) as id
|
||||
@@ -120,7 +125,8 @@ export default new class {
|
||||
untagged,
|
||||
total: tagged + untagged,
|
||||
deleted,
|
||||
untracked: lastf0ck - (tagged + untagged + deleted),
|
||||
pending,
|
||||
untracked: lastf0ck - (tagged + untagged + deleted + pending),
|
||||
sfw,
|
||||
nsfw,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user