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:
@@ -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
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user