I am trying to create a chat project and I need to create message-tables dynamically.
Lets say there are 3 users, user1, user2 and user3. When user1 sends the first time a message to user2 I want a table(user1_user2) to be created. When user1 sends to user3 I want a table with name (user1_user3) to be created and so on.
How do I create dynamically tables and models so I can access the data? I am using sqlite3 as DB. A solution I have thought is to use a NoSQL DB like mongoDB to create the messages-tables and sqlite3 for the other tables I already have, but it does not sound correct to me.
Have you any idea what I can do?