e3969a7752
This commit re-introduces a feature that we lost during the migration to status-go. Messages are cached for a couple of days if processed correctly by status-go, to avoid performance issues. |
||
---|---|---|
.. | ||
000001_init.down.db.sql | ||
000001_init.up.db.sql | ||
000002_add_last_ens_clock_value.up.sql | ||
1586358095_add_replace.up.sql | ||
1588665364_add_image_data.up.sql | ||
1589365189_add_pow_target.up.sql | ||
1591277220_add_index_messages.up.sql | ||
1593087212_add_mute_chat_and_raw_message_fields.up.sql | ||
1595862781_add_audio_data.up.sql | ||
1595865249_create_emoji_reactions_table.up.sql | ||
1596805115_create_group_chat_invitations_table.up.sql | ||
1597322655_add_invitation_admin_chat_field.up.sql | ||
1597757544_add_nickname.up.sql | ||
1598955122_add_mentions.up.sql | ||
1599641390_add_emoji_reactions_index.up.sql | ||
1599720851_add_seen_index_remove_long_messages.up.sql | ||
1603198582_add_profile_chat_field.up.sql | ||
1603816533_add_links.up.sql | ||
1603888149_create_chat_identity_last_published_table.up.sql | ||
1605075346_add_communities.up.sql | ||
1610117927_add_message_cache.up.sql | ||
README.md | ||
doc.go |
README.md
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.