-- name: GetCollectorByClientID :one
SELECT * FROM fullActiveCollectors WHERE clientId = @clientId LIMIT 1;

-- name: AddLatestCollectorVersion :one
INSERT INTO collectorVersions (clientId) VALUES ($1) RETURNING id;

-- name: SetActiveCollectorVersion :exec
INSERT INTO collectorActiveVersions (clientId, versionId) VALUES ($1, $2);

-- name: SetCollectorCleanVersion :exec
INSERT INTO collectorMinCleanVersions (clientId, addedVersion, versionId) VALUES ($1, $2, $3);
