feat(store): add status pages and their components
Composite foreign keys keep pages from listing monitors of other organizations, independent of row-level security. Refs #21 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
This commit is contained in:
1 parent
b831478143
commit
d820547e8c
9 files changed
+570
No files matched your search
@@ -83,3 +83,9 @@ SELECT * FROM incidents WHERE resolved_at IS NULL;
|
||||
|
||||
-- name: MonitorIncidents :many
|
||||
SELECT * FROM incidents WHERE monitor_id = $1 ORDER BY started_at DESC LIMIT 20;
|
||||
|
||||
-- name: IncidentsForMonitors :many
|
||||
SELECT * FROM incidents
|
||||
WHERE monitor_id = ANY (sqlc.arg(ids)::uuid[]) AND (resolved_at IS NULL OR resolved_at > sqlc.arg(since))
|
||||
ORDER BY started_at DESC
|
||||
LIMIT 50;
|
||||
Reference in new issue
Block a user