I'm new to supabase, and I'm creating a very simplified Facebook clone to learn the main features. I'm trying to link comments to a post, so I created a comments table (with columns: id, profile, text) and then a posts table (with columns: id, text, created_by, comment_ids). I linked the comment_ids column, to the comments.id table, but it allows me to add only one comment to each post, while I would like to link multiple comments to a single post.
Is it possible to link multiple rows of a table to a single row of another table?
I'm trying to create a column like this:
comment_ids: ["id-1", "id-2", "id-3", ...]
Ideally, you would want to also store the Id of the post on the comment table as well. This way you can tie every comment to a particular post.