mirror of
https://github.com/status-im/status-go.git
synced 2025-01-09 06:12:55 +00:00
4ab08629f6
This commits adds support for postgres database. Currently two fields are stored: the bloom filter and the topic. Only the bloom filter is actually used to query, but potentially we will use also the topic in the future, so easier to separate it now in order to avoid a migration.
5 lines
234 B
SQL
5 lines
234 B
SQL
CREATE TABLE envelopes (id BYTEA NOT NULL UNIQUE, data BYTEA NOT NULL, topic BYTEA NOT NULL, bloom BIT(512) NOT NULL);
|
|
|
|
CREATE INDEX id_bloom_idx ON envelopes (id DESC, bloom);
|
|
CREATE INDEX id_topic_idx ON envelopes (id DESC, topic);
|