mirror of
https://github.com/status-im/status-go.git
synced 2025-01-12 15:45:07 +00:00
1f6cccd0fc
This commit adds a list new table, installations, which is used to keep track of which installation are active for a given identity key. In general, we limit the number of installation that we keep synchronized to 5, to avoid excessive usage of resources. Any installation coming from our own identity, will have to be manually enabled, otherwise we trust the other peer has correctly paired their devices. We use a timestamp to decide which installations to keep synchronized as a logical clock would have make the creation of the bundle more complicated, but this can always be converted to a logical clock at later stages without breaking compatibility.
8 lines
216 B
SQL
8 lines
216 B
SQL
CREATE TABLE installations (
|
|
identity BLOB NOT NULL,
|
|
installation_id TEXT NOT NULL,
|
|
timestamp UNSIGNED BIG INT NOT NULL,
|
|
enabled BOOLEAN DEFAULT 1,
|
|
UNIQUE(identity, installation_id) ON CONFLICT REPLACE
|
|
);
|