Expose a permission-filtered approvals inbox and readable order summaries
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
-- Count and page pending requests by customer without walking decided requests.
|
||||
CREATE INDEX approval_requests_pending_inbox ON approval_requests
|
||||
(tenant_id, created_at DESC, operation_id DESC) INCLUDE (plan_id)
|
||||
WHERE approval_state = 'pending_approval';
|
||||
|
||||
CREATE INDEX approval_requests_timeline ON approval_requests
|
||||
(tenant_id, created_at DESC, operation_id DESC) INCLUDE (plan_id, approval_state);
|
||||
Reference in New Issue
Block a user