Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add message_history table #62

Open
emmiegit opened this issue Nov 5, 2018 · 0 comments
Open

Add message_history table #62

emmiegit opened this issue Nov 5, 2018 · 0 comments

Comments

@emmiegit
Copy link
Collaborator

emmiegit commented Nov 5, 2018

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 JOINing on messages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant