[Koha-bugs] [Bug 31086] Do not allow hold requests with no branchcode
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Tue Jul 12 16:32:08 CEST 2022
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31086
--- Comment #11 from Martin Renvoize <martin.renvoize at ptfs-europe.com> ---
Comment on attachment 137254
--> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=137254
Bug 31086: DB update
Review of attachment 137254:
--> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=31086&attachment=137254)
-----------------------------------------------------------------
::: installer/data/mysql/kohastructure.sql
@@ +4408,4 @@
> `borrowernumber` int(11) NOT NULL DEFAULT 0 COMMENT 'foreign key from the borrowers table defining which patron this hold is for',
> `reservedate` date DEFAULT NULL COMMENT 'the date the hold was placed',
> `biblionumber` int(11) NOT NULL DEFAULT 0 COMMENT 'foreign key from the biblio table defining which bib record this hold is on',
> + `branchcode` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 0 COMMENT 'foreign key from the branches table defining which branch the patron wishes to pick this hold up at',
Why DEFAULT 0? We're throwing an exception if we don't pass a branchcode in
the app... why default to a probably incorrect branch id in SQL.. to me I'd
just drop the DEFAULT entirely and force anyone writing SQL to get thrown an
error when they don't include it.
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list