Refactor database schema for roles and visibility management

- Updated the roles table to use `code` as the primary key, enhancing readability and simplifying junction tables.
- Modified `user_roles` and `product_role_visibility` tables to reference `role_code` instead of `role_id`, maintaining many-to-many relationships.
- Added foreign key constraints and created new indexes to optimize queries.
- Removed the previous migration file that was no longer needed, ensuring a cleaner migration history.
- Updated related documentation to reflect the new schema changes and their benefits.
This commit is contained in:
Bastian Masanek
2025-11-03 10:54:58 +01:00
parent 14fc293ebe
commit d6404434a3
5 changed files with 99 additions and 123 deletions

View File

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