[Koha-bugs] [Bug 18836] Table 'koha_library.club_enrollments' doesn't exist

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Jun 27 13:30:56 CEST 2017


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

Magnus Enger <magnus at libriotech.no> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |magnus at libriotech.no

--- Comment #11 from Magnus Enger <magnus at libriotech.no> ---
(In reply to C.J.S. Hayward from comment #0)
> Template process failed: undef error -
> DBIx::Class::Storage::DBI::_dbh_execute(): Table
> 'koha_library.club_enrollments' doesn't exist at
> /usr/share/koha/lib/Koha/Objects.pm line 260

The problem is that the table 'koha_library.club_enrollments' does not exist.
This is because MySQL 5.7 does not like the default value given to the
"date_created" column: 

mysql> CREATE TABLE IF NOT EXISTS club_enrollments (
    ->   id int(11) NOT NULL AUTO_INCREMENT,
    ->   club_id int(11) NOT NULL,
    ->   borrowernumber int(11) NOT NULL,
    ->   date_enrolled timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
    ->   date_canceled timestamp NULL DEFAULT NULL,
    ->   date_created timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
    ->   date_updated timestamp NULL DEFAULT NULL,
    ->   branchcode varchar(10) NULL DEFAULT NULL,
    ->   PRIMARY KEY (id),
    ->   KEY club_id (club_id),
    ->   KEY borrowernumber (borrowernumber),
    ->   KEY branchcode (branchcode),
    ->   CONSTRAINT club_enrollments_ibfk_1 FOREIGN KEY (club_id) REFERENCES
clubs (id) ON DELETE CASCADE ON UPDATE CASCADE,
    ->   CONSTRAINT club_enrollments_ibfk_2 FOREIGN KEY (borrowernumber)
REFERENCES borrowers (borrowernumber) ON DELETE CASCADE ON UPDATE CASCADE,
    ->   CONSTRAINT club_enrollments_ibfk_3 FOREIGN KEY (branchcode) REFERENCES
branches (branchcode) ON DELETE SET NULL ON UPDATE CASCADE
    -> ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
ERROR 1067 (42000): Invalid default value for 'date_created'

MySQL 5.5 does not have any problems with the default value.

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


More information about the Koha-bugs mailing list