feat: ephemeral peer channels (#5346)

Co-authored-by: link2xt <link2xt@testrun.org>
Co-authored-by: iequidoo <117991069+iequidoo@users.noreply.github.com>
This commit is contained in:
Sebastian Klähn
2024-05-17 22:13:21 +02:00
committed by GitHub
parent 517cb821fb
commit 36f1fc4f9d
32 changed files with 2757 additions and 107 deletions

View File

@@ -912,6 +912,30 @@ CREATE INDEX msgs_status_updates_index2 ON msgs_status_updates (uid);
.await?;
}
if dbversion < 111 {
sql.execute_migration(
"CREATE TABLE iroh_gossip_peers (msg_id TEXT not NULL, topic TEXT NOT NULL, public_key TEXT NOT NULL)",
111,
)
.await?;
}
if dbversion < 112 {
sql.execute_migration(
"DROP TABLE iroh_gossip_peers; CREATE TABLE iroh_gossip_peers (msg_id INTEGER not NULL, topic BLOB NOT NULL, public_key BLOB NOT NULL, relay_server TEXT, UNIQUE (public_key, topic)) STRICT",
112,
)
.await?;
}
if dbversion < 113 {
sql.execute_migration(
"DROP TABLE iroh_gossip_peers; CREATE TABLE iroh_gossip_peers (msg_id INTEGER not NULL, topic BLOB NOT NULL, public_key BLOB NOT NULL, relay_server TEXT, UNIQUE (topic, public_key), PRIMARY KEY(topic, public_key)) STRICT",
113,
)
.await?;
}
let new_version = sql
.get_raw_config_int(VERSION_CFG)
.await?