If you’re just looking to create a deleted/edited message log you can probably just use the message cache, no DB required and it’ll automatically provide the previous message content alongside the message edited/deleted events. You can enable it in settings.
The schema you provided doesn’t really store messages, you’d probably want a table like message_history with columns like user_id, channel_id, content.
You can only access the message cache on edited/deleted events (there’s outputs for previous message content if it is available from the cache), there’s no way to query it directly.