status-go/protocol/migrations/sqlite
Andrea Maria Piana fb6411af24
Use personal topic for push notification registration
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.
2021-01-26 09:39:53 +01:00
..
000001_init.down.db.sql Add Commands (#1731) 2020-01-10 19:59:01 +01:00
000001_init.up.db.sql Add Commands (#1731) 2020-01-10 19:59:01 +01:00
000002_add_last_ens_clock_value.up.sql Verify ENS in the background (#1824) 2020-02-05 11:09:33 +01:00
1586358095_add_replace.up.sql Add replies to messages 2020-04-16 15:51:28 +02:00
1588665364_add_image_data.up.sql Create different index for filtering 2020-06-08 10:02:31 +02:00
1589365189_add_pow_target.up.sql Create different index for filtering 2020-06-08 10:02:31 +02:00
1591277220_add_index_messages.up.sql Create different index for filtering 2020-06-08 10:02:31 +02:00
1593087212_add_mute_chat_and_raw_message_fields.up.sql Polish up and address review feedback 2020-07-27 08:51:28 +02:00
1595862781_add_audio_data.up.sql add audio duration 2020-07-27 17:15:10 +02:00
1595865249_create_emoji_reactions_table.up.sql Use local chat-id for matching messages 2020-07-30 20:20:59 +02:00
1596805115_create_group_chat_invitations_table.up.sql group chat invitation 2020-09-07 12:15:58 +02:00
1597322655_add_invitation_admin_chat_field.up.sql group chat invitation 2020-09-07 12:15:58 +02:00
1597757544_add_nickname.up.sql [#11046] Add local contact names 2020-09-07 11:34:06 +02:00
1598955122_add_mentions.up.sql Add parsing and storing of mentions 2020-09-09 21:22:07 +02:00
1599641390_add_emoji_reactions_index.up.sql Add index to emoji reactions 2020-09-09 15:02:54 +02:00
1599720851_add_seen_index_remove_long_messages.up.sql Force migration if dirty 2020-10-01 13:47:59 +02:00
1603198582_add_profile_chat_field.up.sql profile status updates 2020-10-27 14:56:35 +01:00
1603816533_add_links.up.sql Link previews support (#2059) 2020-10-27 19:35:28 +02:00
1603888149_create_chat_identity_last_published_table.up.sql remove photo path in favor of images in contact 2020-12-17 14:10:00 +01:00
1605075346_add_communities.up.sql Fix communities migration 2021-01-08 08:43:16 +01:00
1610117927_add_message_cache.up.sql Cache waku messages 2021-01-18 09:38:27 +01:00
1610959908_add_dont_wrap_to_raw_messages.up.sql Skip wrapping emojis in private group chats 2021-01-26 09:39:47 +01:00
1610960912_add_send_on_personal_topic.up.sql Use personal topic for push notification registration 2021-01-26 09:39:53 +01:00
README.md Fix communities migration 2021-01-08 08:43:16 +01:00
doc.go Add replies to messages 2020-04-16 15:51:28 +02:00

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.