AP1.8a: Portfolio-Rang im Cockpit mit Reorder und Next-Action-Sortierung.
Deploy Development / deploy (push) Successful in 50s
Test Suite / pytest-backend (push) Successful in 2m21s
Test Suite / lint-backend (push) Successful in 2s
Test Suite / compose-smoke (push) Has been skipped
Test Suite / k6 /api/health Baseline (push) Successful in 18s
Test Suite / playwright-smoke (push) Successful in 21s

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
LarsandCursor committed 2026-07-11 09:39:49 +02:00
1 parent d7aefed0de
commit a19c6abd26
16 files changed
+426 -34

No files matched your search

+24
View File
@@ -0,0 +1,24 @@
-- AP1.8a: Portfolio-Priorität (relatives Ranking im Tenant)
ALTER TABLE initiatives
ADD COLUMN IF NOT EXISTS portfolio_rank INT;
WITH ranked AS (
SELECT
id,
ROW_NUMBER() OVER (
PARTITION BY tenant_id
ORDER BY updated_at DESC, title
) - 1 AS rn
FROM initiatives
)
UPDATE initiatives AS i
SET portfolio_rank = ranked.rn
FROM ranked
WHERE i.id = ranked.id AND i.portfolio_rank IS NULL;
CREATE INDEX IF NOT EXISTS idx_initiatives_tenant_portfolio_rank
ON initiatives (tenant_id, portfolio_rank);
COMMENT ON COLUMN initiatives.portfolio_rank IS
'Relatives Portfolio-Ranking (0 = höchste Aufmerksamkeit). AP1.8a';