mirror of
https://github.com/status-im/status-go.git
synced 2025-02-02 18:05:07 +00:00
999d8c0ee0
Adds a new column named `deleted` to the table `activity_center_notifications`. Related PR in Mobile https://github.com/status-im/status-mobile/pull/15106 for a lot more details of the feature. Why? Relying on the `dismissed` column for soft deletion is no longer viable because the mobile & desktop clients should display dismissed notifications (sometimes), hence the need for a new column to truly represent soft deletion.
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.