summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Oehlmann <waterfish33@gmail.com>2014-11-20 23:19:36 +0100
committerRobert Oehlmann <waterfish33@gmail.com>2014-11-20 23:19:36 +0100
commit48c8ddaa445863ec9008a831f2045d0e010d7f3c (patch)
treeda55214d3e80bc6c303fa6731770112c5a8889e2
parent4516cbe5d6ba14430f2279916379f10ef1ef73f1 (diff)
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.
-rw-r--r--db/install.sql4
1 files changed, 2 insertions, 2 deletions
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`)