mirror of
https://github.com/status-im/status-go.git
synced 2025-01-24 21:49:54 +00:00
f75f7bb738
This commit expands the confirmation mechanism to allow private group chat messages to be confirmed: Changes: - Added a separate table for message confirmations as group chat messages have same messageID but multiple datasyncID - Removed DataSyncID from raw message (I haven't removed the column name as it can't be done in sqlite without copying over the table)
How to write migrations?
We only write up
migrations, down
migrations are not always possible in sqlite or
too complex/too expensive. For example to remove a column you would have to duplicate
the table, copy over the data, delete and recreated.
This can be very expensive for some tables (user_messages for example), so should not be attempted.
Notes
One issue we faced multiple times is that updates to user_messages
can be very
expensive, leading to slow upgrade times and interrupted migrations. So avoid
writes if not necessary.