There are many questions available for the firebase chat structure.
But I cant figure out how to structured in supabase.
As I think,
case 1: In one table store every message of all chat room. In this case billions of row will inserted of message.
case 2: create table named (unique id of chat room of two users) of each chat room. In this case many tables will created in project.
case 3: suggestion of other structure