Fix capability ID reference in migration script
All checks were successful
Deploy Development / deploy (push) Successful in 46s
Test Suite / pytest-backend (push) Successful in 41s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 13s
Test Suite / k6 /health Baseline (push) Successful in 34s
Test Suite / playwright-tests (push) Successful in 1m15s

- Updated the SQL migration script to select the correct capability ID from the capabilities table, ensuring accurate role capability grants during database migrations.
This commit is contained in:
Lars 2026-06-07 06:43:01 +02:00
parent 7db77f4738
commit 20927a5969

View File

@ -124,7 +124,7 @@ ON CONFLICT (id) DO NOTHING;
-- Konvention: keine Grant-Zeile = alle aktiven Mitglieder (min_account_state reicht). -- Konvention: keine Grant-Zeile = alle aktiven Mitglieder (min_account_state reicht).
INSERT INTO club_role_capability_grants (role_code, capability_id) INSERT INTO club_role_capability_grants (role_code, capability_id)
SELECT r.role_code, c.cap_id SELECT r.role_code, c.id
FROM (VALUES FROM (VALUES
('club_admin', 'org.structure.manage'), ('club_admin', 'org.structure.manage'),
('division_lead', 'org.structure.manage'), ('division_lead', 'org.structure.manage'),