refactor database table about (messages, users, lines, rooms)