I want to take advantage of phoenix sequences to create IDs for messages of chats.but instead of "*SELECT NEXT VALUE FOR chat_id*" I want to do something like "*SELECT NEXT VALUE FOR message_id WHERE parent_id = {the chat id}*". What is better to do? create a sequence for each chat or find away to allow "*SELECT NEXT VALUE FOR message_id WHERE parent_id = {the chat id}*"
Regards, Cheyenne O. Forbes