fb6411af24
One of the issues we noticed is that the partitioned topic in push notification is heavy in traffic, as any user using a particular mailserver will use that partitioned topic to register for PNs. This commit moves from the partitioned topic to the personal topic of the PN server, so it does not clash with other users that might happen to have the same partitioned topic as the mailserver, resulting in long sync times. Another issue that will need to be addressed separately is that once you send a message to a topic, because of the way how waku/whisper works, you will have to register to that topic, meaning that you will receive that data. Currently waku does not support unsubscribing from a topic without logging in and out, so that needs also to be addressed. |
||
---|---|---|
.. | ||
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 | ||
1610959908_add_dont_wrap_to_raw_messages.up.sql | ||
1610960912_add_send_on_personal_topic.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.