status-go/protocol/migrations/sqlite
Andrea Franz e9a42bfa2b
add PinMessage and PinnedMessage (#2180)
* add PinMessage and PinnedMessage

* fix gruop pin messages

* add SkipGroupMessageWrap to pin messages

* update pinMessage ID generation to be symmetric
2021-05-14 23:22:50 +02: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
1612870480_add_datasync_id.up.sql Listen for delivered messages (#2150) 2021-02-23 17:47:45 +02:00
1614152139_add_communities_request_to_join.up.sql Request/Decline access to communities 2021-02-26 15:35:43 +01:00
1615374373_add_confirmations.up.sql Expand confirmations to private group chat messages 2021-03-16 13:41:14 +01:00
1617694931_add_notification_center.up.sql Add activity center & messages from contacts only 2021-04-16 20:42:40 +02:00
1618923660_create_pin_messages.up.sql add PinMessage and PinnedMessage (#2180) 2021-05-14 23:22:50 +02: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.