1 month ago

change db from onetoMany to manytomany

Posted 1 month ago by pllaguno

I have users that only have 1 role each, so they have a role column in user table, but i want to migrate the table to a manytomany relationship, meaning that a user can now have many roles. How can i do this if the table has info on it already? is there a way to tranform it to the pivot table?

Please sign in or create an account to participate in this conversation.