Add UNIQUE constraint to blacklist table

This commit is contained in:
Neil Alexander 2020-07-23 09:51:29 +01:00
parent 9684efebd7
commit c1e50bd067
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
2 changed files with 4 additions and 2 deletions

View file

@ -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)
);
`

View file

@ -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)
);
`