I am trying to create a pivot table to help keep track of "challenges" in my applications. Basically I have a challenge_task pivot table that creates a relationship between a challenge and a task. When a user that is in a challenge completes a task I want to be able to tell so I can track a user's progress. How is the best way to store multiple users completing a task on a challenge?
I was thinking in the pivot table adding a json column called user_completed to handle this and store the user_id for every user that completes the task for a challenge.
So challenge_task would look like
challenge_id | task_id | user_completed
Is this a good way? Or is there anything that fits this better?


user_a_completedanduser_b_completedcolumn on the pivot table and add theuser_idfor when a user completes themjsoncolumns in MySQL past a certain version (don't remember the number) but from my experience, this was more of a hinderance than a help. Queryingjsoncolumns is a bit messy and not really supported yet by Laravel, any benefits added by them were quickly replaced by other issues, etc. The eloquent model/relationship system also works wonders for decreasing complexity when querying/return results with one-to-many or many-to-many relationships. In the end, up to you.