Add UNIQUE constraint to blacklist table (#1216)

This commit is contained in:
Neil Alexander 2020-07-23 10:22:23 +01:00 committed by GitHub
parent 9684efebd7
commit cfeb1b2f42
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -25,7 +25,8 @@ import (
const blacklistSchema = ` const blacklistSchema = `
CREATE TABLE IF NOT EXISTS federationsender_blacklist ( CREATE TABLE IF NOT EXISTS federationsender_blacklist (
-- The blacklisted server name -- 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 = ` const blacklistSchema = `
CREATE TABLE IF NOT EXISTS federationsender_blacklist ( CREATE TABLE IF NOT EXISTS federationsender_blacklist (
-- The blacklisted server name -- The blacklisted server name
server_name TEXT NOT NULL server_name TEXT NOT NULL,
UNIQUE (server_name)
); );
` `