Summary: | MySQL 5.7 - Table 'koha_library.club_enrollments' doesn't exist | ||
---|---|---|---|
Product: | Koha | Reporter: | C.J.S. Hayward <CJSH> |
Component: | Patrons | Assignee: | Bugs List <koha-bugs> |
Status: | RESOLVED DUPLICATE | QA Contact: | Testopia <testopia> |
Severity: | major | ||
Priority: | P5 - low | CC: | chichau, freddysky, gmcharlt, jonathan.druart, kyle.m.hall, magnus |
Version: | Main | ||
Hardware: | Macintosh | ||
OS: | Linux | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Bug Depends on: | 12461 | ||
Bug Blocks: | 17258 |
Description
C.J.S. Hayward
2017-06-21 14:21:02 UTC
Did you have any errors running the web installer? I don't remember seeing errors. Would it make sense to wipe the installation and re-run the installer, and if so, how can I do that? Thx, You could create and try with another instance - this might be the easiest and you might be able to compare the 2 databases. Thank you; I tried and ran into an error. Ducked into chat, and they said a bugfix that might address my current difficulty is slated for announcement in the next few days. Thanks, I know ;) I was thinking of bug 18741 - it might be a fix, but I am not sure. Maybe someone else could run a test? We just got a report of a successful Koha installation in Ubuntu with 17.05. Made me wonder - which DBMS are you using? MySQL? I'm using MySQL on a Mint 18.1 VM running under VirtualBox on a Mac. Would it make sense to erase all traces of Koha installations and reinstall from scratch? If so, what do I need to do so Koha sees a clean slate? TIA, C.J.S. Hayward https://CJSHayward.com linux-tools monasterylibrary # mysql --version mysql Ver 14.14 Distrib 5.7.18, for Linux (x86_64) using EditLine wrapper Ok, first thing: Don't use Mysql 5.7 - it won't work well with Koha, there are known problems with it. It's recommended to use MariaDB instead. (In reply to C.J.S. Hayward from comment #7) > I'm using MySQL on a Mint 18.1 VM running under VirtualBox on a Mac. > Would it make sense to erase all traces of Koha installations and > reinstall from scratch? No, it makes more sense to restart the VirtualBox image from scratch. Clean is important. I successfully installed Koha 17.05 on Linux Mint 18 (I used https://linuxmint.com/edition.php?id=217). I generally followed: https://wiki.koha-community.org/wiki/Koha_on_ubuntu_-_packages I have updated the instructions to highlight the community's preference for MariaDB. Your use of specialized port suggests that you should read https://wiki.koha-community.org/wiki/Koha_on_ubuntu_-_packages#Appendix_A:_Named-based_vs._IP-based_installations My test was a Name Based installation, as does following the dotted blue boxes (at least they are on my screen). DISCLAIMER: I make no claims about overall functionality, nor do I recommend the use of Linux Mint. Debian has the ability to add a Desktop. It makes no sense to me using Linux Mint, when you could choose GNOME, XFCE, or a couple others as part of the Debian installation. Any problems you are encountering are likely related to https://wiki.koha-community.org/wiki/Koha_on_ubuntu_-_packages#Ubuntu_16.04_and_MySQL_5.7 Particularly, the second option without the MySQL configuration tweak. (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. Thank you. How do things stand after migrating the VM to use MariaDB? Thanks, I ran into the same problem after updating Koha. what could be the possible solution? Hi Freddy, same question to you: Are you running MySQL 5.7 by chance? See here: https://wiki.koha-community.org/wiki/Koha_on_Debian#Debian_Packages_on_Koha I am using ubuntu 16.04 The problem seems to be related to setting of sql-mode in /etc/mysql/mariadb.conf.d/50-server.cnf If anyone can confirm after changing sql-mode to other value like '' will allow clubenrollments to be created. Also somewhere from the net mentioned "SET SESSION sql_mode = '';" will help. |