[Koha-bugs] [Bug 19492] New: Field 'lowestPriority' doesn't have a default value ( MariaDB)

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Oct 19 09:00:55 CEST 2017


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19492

            Bug ID: 19492
           Summary: Field 'lowestPriority' doesn't have a default value
                    (MariaDB)
 Change sponsored?: ---
           Product: Koha
           Version: master
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P5 - low
         Component: Hold requests
          Assignee: koha-bugs at lists.koha-community.org
          Reporter: magnus at libriotech.no
        QA Contact: testopia at bugs.koha-community.org
                CC: gmcharlt at gmail.com

Running Koha with MariaDB on Ubuntu 16.04, I get an "internal server error"
when I try to add a hold. The Plack log says: 

DBD::mysql::st execute failed: Field 'lowestPriority' doesn't have a default
value [for Statement "INSERT INTO `reserves` ( `biblionumber`,
`borrowernumber`, `branchcode`, `expirationdate`, `found`, `itemnumber`,
`itemtype`, `priority`, `reservedate`, `reservenotes`, `waitingdate`) VALUES (
?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )" with ParamValues: 0="16303", 1='1', 2="LIB",
3=undef, 4=undef, 5=undef, 6=undef, 7="1", 8='2017-10-19', 9="", 10=undef] at
/usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1834.
DBIx::Class::Storage::DBI::_dbh_execute(): Field 'lowestPriority' doesn't have
a default value at /home/kohaadmin/kohaclone/Koha/Object.pm line 121

And reserves.lowestPriority does indeed not have a default value (from
installer/data/mysql/kohastructure.sql): 

`lowestPriority` tinyint(1) NOT NULL,

Adding a default value of 0 makes the "internal server error" go away:

ALTER TABLE reserves ALTER COLUMN lowestPriority SET DEFAULT 0;

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.


More information about the Koha-bugs mailing list