statbot
statbot copied to clipboard
Add message_history table
The messages
table tracks the current state of all messages. However any information in edits is lost. We should add a message_history
table with the following schema:
Column Name | Type | Other |
---|---|---|
message_id |
BigInteger |
Primary key, foreign key messages.message_id |
date |
DateTime |
Primary key |
content |
UnicodeText |
|
embeds |
JSON |
This way we preserve the existing messages
table and also don't duplicate tons of information over several rows. For instance, the message_type
or channel_id
of a message won't change over edits, and so can be fetched by JOIN
ing on messages
.