From 48c8ddaa445863ec9008a831f2045d0e010d7f3c Mon Sep 17 00:00:00 2001 From: Robert Oehlmann Date: Thu, 20 Nov 2014 23:19:36 +0100 Subject: Fixed database schema The answer fields in Questions are now NULL by default. The previous defaults would not fullfill the forein key contraints on line 493 of install.sql and thus the creation of new (yet unanswered) questions was not possible. --- db/install.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'db/install.sql') diff --git a/db/install.sql b/db/install.sql index 1fc4b939..947eb51e 100644 --- a/db/install.sql +++ b/db/install.sql @@ -288,8 +288,8 @@ CREATE TABLE IF NOT EXISTS `Questions` ( `QID` bigint(20) NOT NULL AUTO_INCREMENT, `UID` int(11) NOT NULL DEFAULT '0', `Question` text NOT NULL, - `AID` int(11) NOT NULL DEFAULT '0', - `Answer` text NOT NULL, + `AID` int(11) DEFAULT NULL, + `Answer` text, PRIMARY KEY (`QID`), KEY `UID` (`UID`), KEY `AID` (`AID`) -- cgit v1.2.3-54-g00ecf