added downloaded_at timestamp to icon table
This commit is contained in:
parent
ec33b2e857
commit
564919c5cc
2 changed files with 4 additions and 2 deletions
|
|
@ -30,7 +30,8 @@ CREATE TABLE IF NOT EXISTS icons (
|
||||||
file_size INT,
|
file_size INT,
|
||||||
s3_key TEXT,
|
s3_key TEXT,
|
||||||
scan_state TEXT DEFAULT 'unscanned',
|
scan_state TEXT DEFAULT 'unscanned',
|
||||||
error TEXT
|
error TEXT,
|
||||||
|
downloaded_at TIMESTAMPTZ
|
||||||
);
|
);
|
||||||
|
|
||||||
-- Partial index: only unscanned icons (shrinks as work completes)
|
-- Partial index: only unscanned icons (shrinks as work completes)
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,8 @@ func updateIcon(ctx context.Context, pool *pgxpool.Pool, iconID int64, result Do
|
||||||
content_type = $2,
|
content_type = $2,
|
||||||
width = $3,
|
width = $3,
|
||||||
height = $4,
|
height = $4,
|
||||||
file_size = $5
|
file_size = $5,
|
||||||
|
downloaded_at = now()
|
||||||
WHERE id = $6`,
|
WHERE id = $6`,
|
||||||
result.S3Key, result.ContentType,
|
result.S3Key, result.ContentType,
|
||||||
nilIntIf(result.Width, 0), nilIntIf(result.Height, 0),
|
nilIntIf(result.Width, 0), nilIntIf(result.Height, 0),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue