I have an old MySQL table structure that I want to upgrade to a new one, I'll explain the structures below.
Its for a permission system, and the table represents what rank id's get what permission id's
Table [Old]:permission_id
the id of the permission givenrank
the rank id that gets the permission
Now, for the old table system, it uses an extra call to permissions
table to find the name of the permission linked with permission_id
, in my new system I just store permission rights by permission's name not the permissions id.
Table [New]:permission_name
the name of the permission givenallowed_ranks
a string of rank ids, seperated by ,
How would I convert all the records to 1 simple record for all permissions, but convert the rank
column to the new allowed_ranks
with a seperator of ,?