I have two database tables
activity_log with dummy records as below:
1 --- 1 ---------- you received $30 from Joseph
2 --- 1 ---------- you withdrew $20
My problem is that, I don't want to hard-code the name Joseph in the activity since the user might change his name in the future. I want when user 2 changes his name from Joseph, user 1 activity log will be updated accordingly with the new name.
As an example, I need activity log similar to that of Facebook where for example Michael can see in his activity log 'you liked Joseph's photo'. If Joseph changes his name to Jose, Michael will see in his activity log 'you liked Jose's photo'. How can I achieve that?
Thank you in advance.