f75f7bb738
This commit expands the confirmation mechanism to allow private group chat messages to be confirmed: Changes: - Added a separate table for message confirmations as group chat messages have same messageID but multiple datasyncID - Removed DataSyncID from raw message (I haven't removed the column name as it can't be done in sqlite without copying over the table) |
||
---|---|---|
.. | ||
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 | ||
1612870480_add_datasync_id.up.sql | ||
1614152139_add_communities_request_to_join.up.sql | ||
1615374373_add_confirmations.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.