#How to update all records in pivot table related to specific user?

2 messages · Page 1 of 1 (latest)

blazing dawn
#

Is it for switching between companie accounts or something? Or just to list what is the main company and it will mostly stay that way?

How about just adding main_company_id column to the users table?

blazing dawn
#

I did something similar, different context though. I thought the pivot route would be cleaner (fancier even), but ended up just adding the column to the main table. Worked just fine and reliable, for me at least. Easie to query, easy to update once in a long while.