Migrating users from old database, need help with associating roles and permission #2273
-
I have old database in which i have 3000 + users, i need to migrate those users into new database with their roles and permission, this is small api i created but it's taking too long and it not a good practice. According to our estimate there will be 3 lakh records going to be inserted into model_has_permission table.
What is the best way to migrate those users into new database along with their roles and permissions ? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Why That permissions already assigned to roles, so, that is an unnecessary duplicity Also you could do a custom manually sync |
Beta Was this translation helpful? Give feedback.
Why
$u->syncPermissions($u->getPermissionsViaRoles());
?That permissions already assigned to roles, so, that is an unnecessary duplicity
Also you could do a custom manually sync