From 74017d31768dc187f3e81c4e3b19adc131d84783 Mon Sep 17 00:00:00 2001 From: Astro Date: Tue, 20 Dec 2022 00:37:16 +0100 Subject: [PATCH] db: CREATE INDEX IF NOT EXISTS --- src/actor.rs | 1 - src/db.rs | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/actor.rs b/src/actor.rs index f6c3b69..1a28612 100644 --- a/src/actor.rs +++ b/src/actor.rs @@ -35,7 +35,6 @@ impl Actor { actor_type: "Service".to_string(), id: self.uri(), inbox: self.uri(), - // outbox: "https://relay.fedi.buzz/outbox".to_string(), public_key: activitypub::ActorPublicKey { id: self.key_id(), owner: Some(self.uri()), diff --git a/src/db.rs b/src/db.rs index cd5adbd..877bad9 100644 --- a/src/db.rs +++ b/src/db.rs @@ -5,7 +5,7 @@ use tokio_postgres::{Client, Error, NoTls, Statement}; const CREATE_SCHEMA_COMMANDS: &[&str] = &[ "CREATE TABLE IF NOT EXISTS follows (id TEXT, inbox TEXT, actor TEXT, UNIQUE (inbox, actor))", - "CREATE INDEX ON follows (actor) INCLUDE (inbox)", + "CREATE INDEX IF NOT EXISTS ON follows (actor) INCLUDE (inbox)", ]; #[derive(Clone)]