I currently have a user's table which contains a one-to-one relationship for Youtube OAuth tokens. However, I now want to support multiple video sites and want to break this into a one-to-many relationship.
I have setup the new tables:
tokens - cols: id, site, username (the user's username on Youtube), oauth_token, oauth_secret
user_tokens - cols: id, user_id, token_id
Is there a way I can SELECT from my current user's table INTO these tables to import the username, oauth_token and oauth_secret columns while also setting up the user_tokens table with the appropriate id's?
In the past I have written short PHP scripts to do this, but have always been curious about whether I can do it directly in MySQL.