github.com/status-im/status-go@v1.1.0/protocol/migrations/sqlite/README.md (about) 1 ### How to write migrations? 2 3 We only write `up` migrations, `down` migrations are not always possible in sqlite or 4 too complex/too expensive. For example to remove a column you would have to duplicate 5 the table, copy over the data, delete and recreated. 6 This can be very expensive for some tables (user_messages for example), so should not be attempted. 7 8 9 ### Notes 10 11 One issue we faced multiple times is that updates to `user_messages` can be very 12 expensive, leading to slow upgrade times and interrupted migrations. So avoid 13 writes if not necessary.