feat(relays // backend >> database): added relay user indices

This commit is contained in:
antifallobst 2024-03-23 15:44:39 +01:00
parent 2b79d920eb
commit ce4373e048
Signed by: antifallobst
GPG Key ID: 2B4F402172791BAF
1 changed files with 12 additions and 0 deletions

View File

@ -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)))
}
}