Bug 15839: Koha::Reviews - Change default value for approved to 0

The reviews.approved column had a default value set to NULL.
It does not make sense, the default value should be 0, this will avoid
to have to specify the approved value when creating a new review.

Signed-off-by: Marc Veron <veron@veron.ch>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
Jonathan Druart 2016-02-16 16:53:41 +00:00 committed by Kyle M Hall
parent eb950f4cc4
commit 7a10e15dae
2 changed files with 2 additions and 1 deletions

View File

@ -0,0 +1 @@
ALTER TABLE reviews CHANGE COLUMN approved approved tinyint(4) DEFAULT 0;

View File

@ -1933,7 +1933,7 @@ CREATE TABLE `reviews` ( -- patron opac comments
`borrowernumber` int(11) default NULL, -- foreign key from the borrowers table defining which patron left this comment
`biblionumber` int(11) default NULL, -- foreign key from the biblio table defining which bibliographic record this comment is for
`review` text, -- the body of the comment
`approved` tinyint(4) default NULL, -- whether this comment has been approved by a librarian (1 for yes, 0 for no)
`approved` tinyint(4) default 0, -- whether this comment has been approved by a librarian (1 for yes, 0 for no)
`datereviewed` datetime default NULL, -- the date the comment was left
PRIMARY KEY (`reviewid`),
CONSTRAINT `reviews_ibfk_1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE CASCADE,