status-go/appdatabase/migrations/sql/1650616788_add_communities_archives_info_table.up.sql
Pascal Precht 43d6305157 Handle history archive magnetlink messages
This introduces the ability for status notes to handle community
history archive magnetlinks. To make this work, a few things are needed:

1. A new database table has been introduced to store message archive
   hashes. This is necessary so status nodes can determine whether or
   not they need to download a certain archive
2. The messenger's `handleRetrievedMessages()` has been exteded to take
   magnetlink messages into account
3. New APIs were added to download torrent data given a magnetlink and
   also to extract messages from downloaded archives, which are then
   later fed to `handleRetrievedMessages`

Closes #2568
2022-05-10 11:27:31 +02:00

7 lines
208 B
SQL

CREATE TABLE IF NOT EXISTS communities_archive_info (
community_id TEXT PRIMARY KEY ON CONFLICT REPLACE,
magnetlink_clock INT NOT NULL DEFAULT 0,
last_message_archive_end_date INT NOT NULL DEFAULT 0
)