diff --git a/federationsender/storage/postgres/blacklist_table.go b/federationsender/storage/postgres/blacklist_table.go index f1db9fae..8de6feec 100644 --- a/federationsender/storage/postgres/blacklist_table.go +++ b/federationsender/storage/postgres/blacklist_table.go @@ -25,7 +25,8 @@ import ( const blacklistSchema = ` CREATE TABLE IF NOT EXISTS federationsender_blacklist ( -- The blacklisted server name - server_name TEXT NOT NULL + server_name TEXT NOT NULL, + UNIQUE (server_name) ); ` diff --git a/federationsender/storage/sqlite3/blacklist_table.go b/federationsender/storage/sqlite3/blacklist_table.go index 3e302906..a14fe0c4 100644 --- a/federationsender/storage/sqlite3/blacklist_table.go +++ b/federationsender/storage/sqlite3/blacklist_table.go @@ -25,7 +25,8 @@ import ( const blacklistSchema = ` CREATE TABLE IF NOT EXISTS federationsender_blacklist ( -- The blacklisted server name - server_name TEXT NOT NULL + server_name TEXT NOT NULL, + UNIQUE (server_name) ); `