Loading...
 
Skip to main content

missing mysql tables in tiki 12-15+ due to mysql 5.7 issues with dates

Status
Closed
Subject
missing mysql tables in tiki 12-15+ due to mysql 5.7 issues with dates
Version
12.x
15.x
Category
  • Release Blocker
Feature
Database MySQL (MyISAM)
Resolution status
Fixed or Solved
Submitted by
Xavier de Pedro
Volunteered to solve
Jonny Bradley
Lastmod by
Xavier de Pedro
Rating
(0)
Description

There seem to be some issue with MySQL 5.7 and Tiki.

For instance, mysql table tiki_payment_requests is not created due to issue with date with no null but with a missing default value):

Copy to clipboard
DROP TABLE IF EXISTS `tiki_payment_requests`; CREATE TABLE `tiki_payment_requests` ( `paymentRequestId` INT NOT NULL AUTO_INCREMENT, `amount` DECIMAL(7,2) NOT NULL, `amount_paid` DECIMAL(7,2) NOT NULL DEFAULT 0.0, `currency` CHAR(3) NOT NULL, `request_date` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, `due_date` TIMESTAMP NOT NULL, `authorized_until` TIMESTAMP NULL, `cancel_date` TIMESTAMP NULL, `description` VARCHAR(100) NOT NULL, `actions` TEXT, `detail` TEXT, `userId` int(8), PRIMARY KEY( `paymentRequestId` ) ) ENGINE=MyISAM;

Copy to clipboard
#1067 - Invalid default value for 'due_date'


One could think in migrating to mariadb, but it seems that mariadb and mysql started to diverge before mysql 5.7.
Taken from: https://seravo.fi/2015/10-reasons-to-migrate-to-mariadb-if-still-using-mysql

Migration might become difficult after 2015
In versions MariaDB 10.0 and MySQL 5.6 the forks have already started to diverge somewhat but most likely users can still just upgrade from 5.6 to 10.0 without problems. The compatibility between 5.7 and 10.1 in the future is unknown, so the ideal time to migrate is now while it is still hassle-free. If binary incompatibilities arise in the future, database admins can always still migrate their data by dumping it and importing it in the new database.

With the above in mind, MariaDB is clearly our preferred option.

One of our customers once expressed their interest in migrating from MySQL to MariaDB and wanted us to confirm whether MariaDB is bug-free. Tragically we had to disappoint them with a negative answer. However we did assure them that the most important things are done correctly in MariaDB making it certainly worth migrating to.

Solution

So, r58760 addresses the SQL part of this, i haven't found any PHP fixes needed yet but this is really hard to test properly.
The features effected are:

  • login cookies (that one seems ok)
  • Payment requests, seems ok but i don't have a live payment system to fully check
  • Accounts - don't think it ever worked, not tested, sorry


I was the reporter, and the issue I detected is fixed (payment tables). I see that the due_date is set to NULL now (I wonder if this will make any usability issue later on being null but needing to be some date for the payment to work properly - maybe not? Closing the ticket, anyway. Thanks for your fix/es, Jonny.

Importance
8
Easy to solve?
5
Priority
40
Demonstrate Bug on Tiki 19+
Demonstrate Bug (older Tiki versions)
Ticket ID
5944
Created
Monday 23 May, 2016 12:08:41 UTC
by Xavier de Pedro
LastModif
Wednesday 01 June, 2016 21:28:55 UTC


Show PHP error messages