-- name: CreateComponentStatusHistory :one
INSERT INTO component_status_history (
    component_item_id, old_status, new_status,
    changed_quantity, note, changed_by, changed_at
)
VALUES (
    sqlc.arg(component_item_id),
    sqlc.arg(old_status),
    sqlc.arg(new_status),
    sqlc.arg(changed_quantity),
    sqlc.arg(note),
    sqlc.arg(changed_by),
    sqlc.arg(changed_at)
)
RETURNING *;