status-go/protocol/migrations/sqlite
frank f04a9a8726
feat(sync)!: leftovers work for sync fallback (#5794)
* feat(sync)!: remove compatibility with v2.29

* feat(sync)_: add AC notifications when initiating the sync fallback

Needed for https://github.com/status-im/status-desktop/issues/15750

Adds an AC notification when the syncing fails and the user is prompted to use a seed phrase instead.
There is one notification for the initiator (created) and one for the old account (received).
Once the flow is completed, ie the receiver presses Enable and sync,  the notifications are deleted

* test_: update test

* fix_: lint issue

* chore_: ignore tmp file generated by make lint-fix

* chore_: rename EnableAndSyncInstallation to EnableInstallationAndSync

* chore_: address review feedback

* chore_: revert changes to .gitignore

* fix_: simplify code

* fix_: keep old API

---------

Co-authored-by: Jonathan Rainville <rainville.jonathan@gmail.com>
2024-09-19 16:17:46 +08:00
..
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 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
1619094007_add_joined_chat_field.up.sql feat: introduce new `joined` property in `Chat` struct 2021-05-18 11:29:03 +02:00
1619099821_add_last_synced_field.up.sql Add mailserver logic 2021-05-21 07:22:58 +02:00
1621933219_add_mentioned.up.sql Add mentioned field 2021-05-26 08:33:38 +02:00
1622010048_add_unviewed_mentions_count.up.sql Add unviewed mentions count 2021-05-28 13:05:23 +02:00
1622061278_add_message_activity_center_notification_field.up.sql Add mention notification to activity center (#2239) 2021-05-29 14:05:25 -03:00
1622464518_set_synced_to_from.up.sql Set synced_to/from to 24 hours ago 2021-06-01 12:59:52 +02:00
1622464519_add_chat_description.up.sql Fix order of migration 2021-06-02 14:16:29 +02:00
1622622253_add_pinned_by_to_pin_messages.up.sql add PinnedBy to PinnedMessage (#2250) 2021-06-08 17:23:32 +02:00
1623938329_add_author_activity_center_notification_field.up.sql feat: add author to notification in activity center (#2259) 2021-06-17 11:08:28 -04:00
1623938330_add_edit_messages.up.sql Handle edit first & then message 2021-06-29 13:15:15 +02:00
1624978434_add_muted_community.up.sql feat(community): add muted to community and function to set it (#2271) 2021-06-30 09:29:43 -04:00
1625018910_add_repply_message_activity_center_notification_field.up.sql Add reply message to activity center notification of type reply (#2272) 2021-07-15 17:21:44 -03:00
1625762506_add_deleted_messages.up.sql Delete messages (#2279) 2021-07-26 17:06:32 -04:00
1627388946_add_communities_synced_at.up.sql Sync Communities (#2253) 2021-08-06 16:40:23 +01:00
1628280060_create-usermessages-index.sql add index on user_messages to speed-up marking all messages as read (#2304) 2021-08-11 08:26:15 -04:00
1632303896_modify_contacts_table.up.sql Add HasAddedUs field 2021-10-04 12:19:15 +02:00
1633349838_add_emoji_column_in_chats.up.sql Storing emoji values for Custom Emoji Thumbnails for Community Channels (#2366) 2021-10-04 18:32:25 +05:30
1634831235_add_highlight_column_in_chats.up.sql Store Highlight field for identify new chats (#2384) 2021-10-21 22:34:56 +05:30
1634896007_add_last_updated_locally_and_removed.up.sql Backup removed & added by them contacts 2021-11-15 18:53:35 +00:00
1635840039_add_clock_read_at_column_in_chats.up.sql [pairing] Sync read messages 2021-11-02 10:02:27 +02:00
1637852321_add_received_invitation_admin_column_in_chats.up.sql Decline pending group invitations from user, when user is banned (#2437) 2021-11-25 20:51:42 +05:30
1645034601_display_name.up.sql feat: display name 2022-03-14 13:48:34 -04:00
1645034602_add_mutual_contact_request.up.sql Initial support for mutual contact requests 2022-05-31 09:12:36 +01:00
1650373957_add_contact_request_state.up.sql Initial support for mutual contact requests 2022-05-31 09:12:36 +01:00
1656958989_contact_verification.up.sql feat: contact verification request (#2586) 2022-07-05 15:49:44 -04:00
1658236268_add_discord_message_authors_table.up.sql feat: introduce `discord_message_authors` persistence APIs 2022-08-10 10:13:55 +02:00
1659619997_add_discord_messages_table.up.sql feat: add `discord_messages` table and persistence APIs 2022-08-11 10:49:23 +02:00
1660226788_create_chat_identity_social_links.up.sql feat: add social links 2022-08-16 14:29:00 +02:00
1660226789_add_walletconnectsessions_table.up.sql Implement wallet connect session CRUD API 2022-08-19 12:32:00 +01:00
1661242854_add_communities_requests_to_leave.up.sql feat: introduce and distribute RequestToLeave community 2022-08-26 11:25:33 +02:00
1662044232_add_chat_image.up.sql fix: change migration timestamp of group chat add image feature 2022-09-01 17:55:46 +02:00
1662106895_add_chat_first_message_timestamp.up.sql feat: add and distribute `chatIdentity.FirstMessageTimestamp` 2022-09-09 08:59:39 +02:00
1662723928_add_discord_author_image_fields.up.sql feat(message_persistence): add discord message author image payload fields 2022-09-19 13:47:16 +02:00
1664195977_add_deleted_for_mes.up.sql feat: delete for me (#2866) 2022-09-28 19:42:17 +08:00
1664367420_add_discord_attachments_table.up.sql feat: add `DiscordMessageAttachment` types and APIs 2022-09-29 11:38:29 +02:00
1665079662_add_spectated_column_in_communities.up.sql feat: add `SpectateCommunity` api 2022-10-06 21:21:37 +02:00
1665479047_add_community_id_in_notifications.up.sql feat(ActivityCenter): Add community membership AC notifications (#2886) 2022-10-26 02:06:20 +04:00
1665484435_add_encrypted_messages.up.sql Send all encryption keys 2022-10-20 12:19:44 +01:00
1665560200_add_contact_verification_individual.up.sql Handle identity verifications 2022-10-26 17:19:44 +01:00
1670921937_add_album_id.up.sql Images Album (#3021) 2022-12-14 16:25:45 +04:00
1673373000_add_replied.up.sql feat: make replies act as mentions 2023-01-10 13:39:57 -05:00
1673428910_add_image_width_height.up.sql Image width height (#3061) 2023-01-12 13:43:14 +04:00
1674210659_add_contact_request_local_clock.up.sql Fix broken migrations 2023-02-01 18:31:32 +00:00
1675212323_add_deleted_by.up.sql feat: add deleted by xxx support (#3077) 2023-02-01 08:57:35 +08:00
1675247084_add_activity_center_states.up.sql feat: Add seen/unseen activity center setting (#3148) 2023-02-17 14:08:08 +04:00
1675272329_fix_protocol_migration.up.sql Fix broken migrations 2023-02-01 18:31:32 +00:00
1676998418_fix_activity_center_migration.up.sql Add test for everyone tag & fix migration order 2023-02-24 10:18:26 +00:00
1677278861_add_deleted_column_to_activity_center_notifications_table.up.sql Support soft deletion for activity center notifications (#3201) 2023-02-24 20:47:04 -03:00
1677486338_add_community_tokens_table.up.sql feat(CommunityTokens): Keep community token details in database 2023-02-27 10:37:54 +01:00
1678292329_add_collapsed_categories.up.sql Add collapsed community categories 2023-03-14 17:13:21 +00:00
1678800760_add_index_to_raw_messages.up.sql Add index to raw messages 2023-03-16 13:40:20 +00:00
1678877478_add_communities_requests_to_join_revealed_addresses_table.up.sql feat: add verified wallet accounts to community requests 2023-03-22 13:50:25 +01:00
1679326850_add_community_token_owners.up.sql feat(MintTo): Add Airdrop functionality. 2023-03-27 17:17:51 +02:00
1680011500_add_album_images_count.up.sql Add album count key to messages (#3347) 2023-03-30 12:02:20 +02:00
1680114896_add_index_on_album_id.up.sql fix(unread_count): Skip extra count of new messages for album of images (#3345) 2023-03-31 12:15:06 +03:00
1681655289_add_mute_till.up.sql Add muted_till param for chats (#3258) 2023-04-16 17:06:00 +02:00
1681934966_add_index_response_to.up.sql Fix some issues with pinned messages 2023-04-25 16:02:48 +01:00
1682528339_add_index_user_messages_unseen.up.sql chore: add index idx_user_messages_unseen 2023-05-02 09:21:58 +02:00
1683707289_recreate_deleted_for_mes.up.sql Feat/sync local deleted message (#3476) 2023-05-12 16:31:34 +08:00
1683725607_mark_discord_messages_as_seen.up.sql fix: mark imported messages as seen 2023-05-10 18:51:48 +02:00
1684174617_add_url_previews_to_user_messages.up.sql URL unfurling (initial implementation) (#3471) 2023-05-18 15:43:06 -03:00
1684175608_add_token_balances.up.sql Allow setting up wallet with new config 2023-05-19 13:23:21 +01:00
1684979808_sync_activity_center_notifications.up.sql Feat/sync activity center notification (#3535) 2023-06-10 10:00:17 +08:00
1685383829_add_communities_mute_till.up.sql feat(communities): Adds muting interval to community (#3549) 2023-06-17 11:19:05 +03:00
1685964183_add_chainids_to_revealed_addresses.up.sql Add chainIds to revealed accounts in memberhsip requests 2023-06-12 10:49:29 +02:00
1687370421_add_communities_muted_till_new.up.sql fix(migration): Fixes mute_till migration (#3653) 2023-06-22 18:49:58 +03:00
1687416607_add_communities_check_channel_permission_responses_table.up.sql feat: store check channel permission responses 2023-06-27 12:13:59 +02:00
1687856939_add_community_tokens_decimals.up.sql feat(AssetsDeployment): Assets deployment 2023-06-29 16:10:05 +02:00
1687959987_modify_community_tokens_supply_as_string.up.sql Remove unsopported DROP statement 2023-07-14 08:23:38 +01:00
1689258900_add_airdrop_address_to_revealed_addresses.up.sql feat(communities): add airdropAddress param to SharedAccounts (#3756) 2023-07-14 13:33:47 -04:00
1689266326_create_communities_events_table.up.sql chore: community admin events (#3678) 2023-07-18 17:06:12 +02:00
1689931300_add_community_tokens_deployer_and_priv_level.up.sql feat(OwnerToken): Owner token and master token deployment 2023-08-14 20:57:00 +02:00
1693311881_add_unfurled_links_to_message_edits.up.sql Link previews not working on message edit (#3974) 2023-08-31 10:21:25 +03:00
1693311981_community_shard.up.sql waku2: static shards (#3944) 2023-10-12 15:21:49 -04:00
1695331492_add_status_link_previews.up.sql feature: Unfurl status links (#4033) 2023-10-13 13:25:34 +01:00
1695918296_add_validated_at.up.sql Add queue for processing community description & configurable control node 2023-10-17 21:00:24 +01:00
1697699419_community_control_node_sync.up.sql feat: ensure unique control node across devices 2023-10-22 21:50:41 +02:00
1698137561_add_profile_showcase_tables.up.sql feat: Profile showcase backend (#4005) 2023-10-24 14:43:18 +04:00
1698137562_fix_encryption_key_id.up.sql fix order of drop statement 2023-10-30 10:56:32 +00:00
1698414646_add_padding.up.sql Fix issues with out of order encryption and batched messages 2023-10-30 10:11:32 +00:00
1698746210_add_signature_to_revealed_addresses.up.sql feat: kick all members after ownership change and auto-accept after sharing the address (#4187) 2023-10-31 15:20:40 +01:00
1699041816_profile_showcase_contacts.up.sql feat: Profile showcase data sharing (#4209) 2023-11-09 22:59:01 +04:00
1699554099_message_segments.up.sql feat: introduce messages segmentation 2023-11-13 17:32:00 +01:00
1700044186_message_segments_timestamp.up.sql chore: cleanup message segments 2023-11-15 16:52:35 +01:00
1700044187_curated_communities.up.sql feat: cache curated communities in db 2023-11-16 17:21:28 +01:00
1700820989_add_resend_automatically_index.up.sql Re-send messages with ResendAutomatically=true 2023-11-30 10:46:38 +02:00
1702996953_add_communities_shards_table.up.sql feat: implemented a mechanism to retrieve shard information for a given community ID (#4499) 2023-12-22 13:37:37 +01:00
1704489636_add_album_images.up.sql This PR (status-go) fixes #12821 (#4516) 2024-01-08 10:18:57 -08:00
1704821941_add_joined_at_for_community.up.sql Add joined at key to communities (#4513) 2024-01-09 20:36:47 +02:00
1704832511_add_last_opened_at_for_communities.up.sql Add last opened at key for community (#4514) 2024-01-21 12:55:14 +02:00
1704832512_add_peersyncing.up.sql Add basic peersyncing 2024-01-23 12:46:17 +00:00
1706028033_profile_showcase_address_and_community.up.sql Correct profile showcase tokens and collectibles (#4511) 2024-01-25 20:48:27 +04:00
1706520870_add_bridge_messages_table.up.sql feat(BridgeMessage): Add new type of chat message content: BridgeMessage 2024-01-30 12:14:54 +01:00
1706520871_add_community_description_cache.up.sql Port back migrations from release branch 2024-03-14 13:27:12 +00:00
1707749393_add_community_grants.up.sql Feat: proof of membership for profile showcase communities (#4713) 2024-02-15 22:13:12 +03:00
1707841194_add_profile_showcase_preferences.up.sql feature: profile showcase preferences sync&backup (#4729) 2024-02-17 18:07:20 +00:00
1708062699_activity_data.up.sql feat: Community token received notification (#4682) 2024-02-19 14:55:38 +01:00
1708423707_applied_community_events.up.sql fix: ensure community events eventual consistency 2024-02-20 21:07:01 +01:00
1708440786_profile_showcase_social_links.up.sql Feat: Add social links to the profile showcase (#4775) 2024-02-26 16:53:40 +03:00
1709805967_simplify_profile_showcase_preferences.up.sql Feat: Simplify profile showcase preferences (#4854) 2024-03-08 17:20:23 +01:00
1709828431_add_community_description_cache.up.sql Add index to hash ratchet & cache processed description 2024-03-13 11:35:11 +00:00
1710331283_add_bio_to_contacts.up.sql Feature: store and retrieve a contact's bio (#4916) 2024-03-19 18:09:13 +00:00
1710331284_hash_ratchet_encrypted_messages_key_id.up.sql fix_: improve performance of `GetHashRatchetMessages` 2024-04-10 14:27:14 +02:00
1711389881_add_profile_showcase_community_grant.up.sql Fix(Profile): Remove profile showcase from general response via signal (#4982) 2024-03-29 11:22:44 +01:00
1711937186_add_contact_customization_color.up.sql feat: add contact customization color (#4869) 2024-04-03 22:49:57 +08:00
1712745141_hash_ratchet_encrypted_messages_key_id.up.sql chore_: bump `hash_ratchet_encrypted_messages_key_id` migration 2024-04-10 16:40:57 +02:00
1712905223_add_parity_to_message_segments.up.sql feat_: introduce forward error correction in segmentation layer 2024-04-17 22:05:53 +02:00
1713169458_update_raw_messages_with_resend_features.up.sql feat_: retry sending specific messages 2024-05-02 05:40:49 +08:00
1715163152_remove_status_community.up.sql chore_: Remove old status community from the database 2024-05-13 21:17:25 +08:00
1715163262_rename_peersyncing_group_id_field.up.sql Extend peersyncing to sync 1-to-1 messages (#4962) 2024-05-14 12:20:13 +02:00
1716413241_remove_social_links.up.sql chore(identity)_: remove old social links implementation (#5214) 2024-05-24 10:35:34 +02:00
1716891408_add_community_token_transaction_hash.up.sql feat_: recovery retracking pending transsactions 2024-05-28 13:06:24 +02:00
1719906191_add_community_token_version.up.sql feat(community tokens)_: Upgrade ERC721 contract to enable batch transfers 2024-07-08 11:30:51 +02:00
1720636181_add_community_encryption_keys_requests.up.sql chore(communities)_: request missing channels' encryption keys in a loop 2024-07-16 16:44:50 +02:00
1721222369_add_shared_addresses.up.sql fix_: share all future addresses storage 2024-07-18 12:08:40 +03:00
1721919311_add_installation_id_activity_center.up.sql feat(sync)!: leftovers work for sync fallback (#5794) 2024-09-19 16:17:46 +08:00
README.md Fix communities migration 2021-01-08 08:43:16 +01:00
doc.go chore: make generate with custom `-modtime` (#4896) 2024-03-08 09:25:17 +00: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.