From 4a8981400d99af33fc91a86e5969e498f981584c Mon Sep 17 00:00:00 2001 From: ekzyis Date: Mon, 4 Dec 2023 04:56:01 +0100 Subject: [PATCH] Fix market_id column nullable --- db/init.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/init.sql b/db/init.sql index 8cf0a2b..10e1bc8 100644 --- a/db/init.sql +++ b/db/init.sql @@ -38,7 +38,7 @@ CREATE TABLE markets( CREATE EXTENSION "uuid-ossp"; CREATE TABLE shares( id UUID PRIMARY KEY DEFAULT uuid_generate_v4(), - market_id INTEGER REFERENCES markets(id), + market_id INTEGER NOT NULL REFERENCES markets(id), win BOOLEAN, description TEXT NOT NULL );