From ce4373e048840025452c1f5451439fcb3f0d4073 Mon Sep 17 00:00:00 2001 From: antifallobst Date: Sat, 23 Mar 2024 15:44:39 +0100 Subject: [PATCH] feat(relays // backend >> database): added relay user indices --- src/backend/relay.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/backend/relay.rs b/src/backend/relay.rs index 4762405..4fb02b6 100644 --- a/src/backend/relay.rs +++ b/src/backend/relay.rs @@ -35,6 +35,18 @@ impl Backend { .execute(&self.pool) .await?; + sqlx::query(&format!( + "CREATE TABLE RelayIndex_{} ( + public_id UUID NOT NULL PRIMARY KEY, + public_key BLOB(4096) NOT NULL, + auth VARCHAR(128) NOT NULL, + name VARCHAR(32) + );", + relay_id.simple() + )) + .execute(&self.pool) + .await?; + Ok(Ok((relay_id, secret))) } }