forked from mtusi2026/mtusi2026lab5
feat(attachments): add pipeline and outbox schema and queries
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
-- name: CreateAttachmentVariant :exec
|
||||
INSERT INTO attachment_variants (
|
||||
attachment_id,
|
||||
pipeline_version,
|
||||
variant,
|
||||
s3_key,
|
||||
content_type,
|
||||
size_bytes,
|
||||
width,
|
||||
height,
|
||||
sha256
|
||||
) VALUES (
|
||||
sqlc.arg(attachment_id),
|
||||
sqlc.arg(pipeline_version),
|
||||
sqlc.arg(variant),
|
||||
sqlc.arg(s3_key),
|
||||
sqlc.arg(content_type),
|
||||
sqlc.arg(size_bytes),
|
||||
sqlc.arg(width),
|
||||
sqlc.arg(height),
|
||||
sqlc.arg(sha256)
|
||||
);
|
||||
|
||||
-- name: ListAttachmentVariants :many
|
||||
SELECT * FROM attachment_variants
|
||||
WHERE attachment_id = sqlc.arg(attachment_id)::uuid
|
||||
AND pipeline_version = sqlc.arg(pipeline_version)::int
|
||||
ORDER BY variant;
|
||||
Reference in New Issue
Block a user