79558488

Date: 2025-04-06 17:01:02
Score: 1
Natty:
Report link

If you only need to add "like" functionality then you can remove the liked column from your table. As you said if a user likes a image you are going to add a new row to likes table, but if you want to add "dislike" feature in the future then you need the liked column. In that case if the user likes an image you add a new record with the liked column set to true and if the user dislike an image you add a new record and set liked column to false.

Reasons:
  • Has code block (-0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Mr_Offline