lablup / lablup/backend.ai

Add missing foreign key constraints to RBAC tables

Open
#10,501 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
670
Forks
183
Avg merge
17h 7m
Merged PRs (30d)
358

Description

Several RBAC tables are missing foreign key constraints, allowing orphan rows when referenced entities are deleted.

Add FK constraints via Alembic migration:

- permissions.role_id → roles.id (CASCADE DELETE)
- user_roles.user_id → users.uuid (CASCADE DELETE)
- user_roles.role_id → roles.id (CASCADE DELETE)

JIRA Issue: BA-4736

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.