initial, copy postgres stuff for migrations, main.go test

This commit is contained in:
2026-09-04 21:11:41 +02:00
parent 506df87f84
commit 090cc0f00d
14 changed files with 863 additions and 0 deletions
+6
View File
@@ -0,0 +1,6 @@
-- name: GetKeyByHash :one
SELECT k.id, k.owner_id, k.scopes, k.quota_tier, k.status, k.expires_at,
o.status AS owner_status
FROM api.keys k
JOIN api.owners o ON o.id = k.owner_id
WHERE k.key_hash = $1 AND k.status = 'active';