Page 1 of 1

SQL error upgrading from 2.7.6 to 2.8.1 (assignedby)

Posted: Mon Jun 04, 2018 2:01 pm
by xbach
Script URL:
Version of script: 2.8.1
Hosting company: Consell Comarcal del Baix Empordà
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution:
I looked at knowledge and forum

Write your message below:

After upgrading to 2.8.1 I received an error saying:
Can't execute SQL: ALTER TABLE 'hesk_tickets' ADD 'assignedby' MEDIUMINT NULL DEFAULT NULL AFTER 'owner', ADD INDEX ('assignedby')

MysSQL said:
Invalid default value for 'dt'


What is wrong? I've tested it and now I can't assign tickets to others.

Thanks a lot!

Re: SQL error upgrading from 2.7.6 to 2.8.1 (assignedby)

Posted: Tue Jun 05, 2018 7:30 am
by xbach
Hi again!
I've resolved the issue by myself. The way I've done is by disabling MySQL strict mode. Is the only way I found.

I've done it the way Bilal tells in this post: https://askubuntu.com/questions/811831/ ... was-in-5-6

If there is another way to do it without disabling strict mode, please let me now.

Thanks,

Re: SQL error upgrading from 2.7.6 to 2.8.1 (assignedby)

Posted: Wed Jun 06, 2018 12:15 pm
by Klemen
This means one of the older updates didn't go through, the dt columns should be updated already in 2.7.6

You can run this query to update the dt column:

Code: Select all

ALTER TABLE `hesk_tickets` CHANGE `dt` `dt` timestamp NOT NULL DEFAULT '2000-01-01 00:00:00'