Page 1 of 1

Hesk update 2.4.6 to 3.5.1 database error

Posted: Thu Jan 02, 2025 10:15 am
by perizia
HESK version: 3.4.6
Current HESK license: Licensed
PHP version:7.4.33 (MySQLi)
MySQL version: 8.0.40
/hesk_settings.inc.php: Exists, Writable
/attachments: Exists, Writable
/cache: Exists, Writable

Good morning and happy new year.

As in previous updates, after Upload all included files of hesk346 _to_351 (overwriting existing files) and executing install we receive the following error message (we have checked that the user of the database has “ALTER” permissions):
Error
Can't execute SQL: ALTER TABLE `heskdf_users` ADD `notify_customer_approval` ENUM('0','1') NOT NULL DEFAULT '0' AFTER `notify_overdue_my`, CHANGE `default_list` `default_list` VARCHAR(1000) NOT NULL DEFAULT ''

MySQL said:
Unknown column 'notify_overdue_my' in 'heskdf_users'

WARNING
Debug mode is enabled. Make sure you disable debug mode in settings once HESK is installed and working properly.
Thank you very much for your work and for the help you can give us.

Re: Hesk update 2.4.6 to 3.5.1 database error

Posted: Thu Jan 02, 2025 1:56 pm
by Klemen
This means that the database wasn't upgraded properly in the past. This happens if you had unofficial modifications for Hesk, such as "Mods for Hesk", installed at some point.

What you can try is:

1. restore from backup
2. run these SQL queries in your MySQL (phpMyAdmin, for example):

Code: Select all

ALTER TABLE `heskdf_tickets` ADD COLUMN `message_html` mediumtext DEFAULT NULL AFTER `message`, ADD COLUMN `due_date` timestamp NULL DEFAULT NULL, ADD COLUMN `overdue_email_sent` tinyint(1) DEFAULT '0';
ALTER TABLE `heskdf_users` ADD COLUMN `notify_overdue_unassigned` enum('0','1') COLLATE utf8_unicode_ci NOT NULL DEFAULT '1' AFTER `notify_note`;
ALTER TABLE `heskdf_users` ADD COLUMN `notify_overdue_my` enum('0','1') COLLATE utf8_unicode_ci NOT NULL DEFAULT '1' AFTER `notify_overdue_unassigned`;
3. run the upgrade script again

Re: Hesk update 2.4.6 to 3.5.1 database error

Posted: Thu Jan 02, 2025 6:45 pm
by perizia
Good afternoon,

Thank you very much for the help, we have managed to perform the database update by running the following SQL query:
ALTER TABLE `heskdf_users` ADD COLUMN `notify_overdue_my` enum('0','1') COLLATE utf8_unicode_ci NOT NULL DEFAULT '1' AFTER `notify_overdue_unassigned`;