Refactor roles management to use role code as primary key

- Updated the roles table schema to use role code as the primary key, enhancing readability in junction tables.
- Modified related tables (user_roles, product_role_visibility) to reference role code instead of role ID.
- Adjusted seeding logic and utility functions to accommodate the new primary key structure, ensuring consistent role management across the application.
- Added a migration script to facilitate the database schema changes.
This commit is contained in:
Bastian Masanek
2025-11-03 10:45:11 +01:00
parent a6d09d76fd
commit 68ab42f2f4
5 changed files with 93 additions and 38 deletions

View File

@@ -15,6 +15,13 @@
"when": 1762074397305,
"tag": "0001_clammy_bulldozer",
"breakpoints": true
},
{
"idx": 2,
"version": "7",
"when": 1762157410000,
"tag": "0002_refactor_roles_primary_key",
"breakpoints": true
}
]
}