Files
GitHop/services/control-plane/internal/store/migrations/003_prompt_owners.sql
T
cyph3rasi 12c806c77f Stop publishing repository-wide prompt ledgers and enforce per-user prompt isolation through authenticated Gitea IDs.
Hop-State: A_06FN8NFDRFAFN5VCJTHJAAG
Hop-Proposal: R_06FN8NEGJ054CPMJF9ZAN70
Hop-Task: T_06FN8HT6XG332C3XY6PYCCG
Hop-Attempt: AT_06FN8HT6XGRXW0B4WPFFBJG
2026-07-11 20:19:05 -07:00

6 lines
232 B
SQL

ALTER TABLE prompts ADD COLUMN gitea_user_id bigint CHECK (gitea_user_id > 0);
CREATE INDEX prompts_repository_user_created_at_idx
ON prompts (repository_id, gitea_user_id, created_at DESC)
WHERE gitea_user_id IS NOT NULL;