From 7a10e15dae3e4ae7733e466976e6b393069615ab Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 16 Feb 2016 16:53:41 +0000 Subject: [PATCH] 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 Signed-off-by: Marcel de Rooy Signed-off-by: Kyle M Hall --- installer/data/mysql/atomicupdate/bug_review.sql | 1 + installer/data/mysql/kohastructure.sql | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 installer/data/mysql/atomicupdate/bug_review.sql diff --git a/installer/data/mysql/atomicupdate/bug_review.sql b/installer/data/mysql/atomicupdate/bug_review.sql new file mode 100644 index 0000000000..076c3b51d2 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_review.sql @@ -0,0 +1 @@ +ALTER TABLE reviews CHANGE COLUMN approved approved tinyint(4) DEFAULT 0; diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 10bee024f1..f6524084cf 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -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, -- 2.39.5