Need advice on "public.messages" database schema
# help-and-questions
v
Hi - I made a back of the envelope schema for a messaging system we are developing for our app. Would love to hear your thoughts if this schema looks right and if there are opportunities to improve. thanks

https://cdn.discordapp.com/attachments/1110963912582631535/1110964224223612968/chat_room_schema.png

g
This is similar to what I have currently. Just changed it slightly a few days ago. I have shared_notes that can be associated with the tasting_rooms and use a join table for that. I have owner for each room, they can delete the room. I also have a name for each room there and the hash_id which is a 10 digit "password" that can be shared to allow sending as in invite to join the room.

https://cdn.discordapp.com/attachments/1110963912582631535/1110971158892916856/image.png

tasting_room are chat rooms
s
This looks ok to me for a simple messaging system.
v
thank you both. I will incorporate the feedback. i just wanted to ensure a solid foundation before adding any layers of complexity at this stage.