mirror of
https://github.com/status-im/status-go.git
synced 2025-02-02 09:56:52 +00:00
73a45dd58e
- added `SpectateCommunity` endpoint, it is supposed to be used in scenarios where we want to "Go to public Community" and see its content without joining - added `spectated` field to `Community`, it means we are observing the community and its chats but we are not members Use case: https://github.com/status-im/status-desktop/issues/7072#issuecomment-1246560885
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.