From ce5add113fc374b6636afee5d93ed6d44730bf4b Mon Sep 17 00:00:00 2001 From: Astro Date: Tue, 20 Dec 2022 03:48:14 +0100 Subject: [PATCH] db: add NOT NULL constraints --- src/db.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/db.rs b/src/db.rs index ce944b7..54bd56d 100644 --- a/src/db.rs +++ b/src/db.rs @@ -4,7 +4,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 TABLE IF NOT EXISTS follows (id TEXT NOT NULL, inbox TEXT NOT NULL, actor TEXT NOT NULL, UNIQUE (inbox, actor))", "CREATE INDEX IF NOT EXISTS follows_actor ON follows (actor) INCLUDE (inbox)", ];