Skip to content

Add message_history table #62

@emmiegit

Description

@emmiegit

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions