-- name: ListTickets :many
SELECT * FROM tickets WHERE deleted_at IS NULL;

-- name: ListTicketsWithDeleted :many
SELECT * FROM tickets;

-- name: GetTicketByID :one
SELECT * FROM tickets WHERE id = $1;

-- name: UpdateTicketByID :exec
UPDATE tickets SET project_git = $1, build_git = $2, folder = $3 WHERE id = $4;

-- name: DeleteTicketByID :exec
UPDATE tickets SET deleted_at = current_timestamp WHERE id = $1;

-- name: DeleteTicketByKey :exec
UPDATE tickets SET deleted_at = current_timestamp WHERE key = $1;