Field 'status' doesn't have a default value

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
OCReactive
Posts: 45
Joined: Wed Apr 01, 2015 10:33 am

Field 'status' doesn't have a default value

Post by OCReactive »

Script URL:
Version of script:
Hosting company:
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution: Field 'status' doesn't have a default value

Write your message below: When submiting a ticket from recetly updated to 3.0.0 HESK, it gaves me the error:

Error
Can't execute SQL: INSERT INTO `hesk_tickets` ( `trackid`, `name`, `email`, `category`, `priority`, `subject`, `message`, `dt`, `lastchange`, `articles`, `ip`, `language`, `openedby`, `owner`, `attachments`, `merged`, `history` , `custom1`, `custom2`, `custom3`, `custom4`, `custom5`, `custom6`, `custom7`, `custom8`, `custom9`, `custom10`, `custom11`, `custom12`, `custom13`, `custom14`, `custom15`, `custom16`, `custom17`, `custom18`, `custom19`, `custom20`, `custom21`, `custom22`, `custom23`, `custom24`, `custom25`, `custom26`, `custom27`, `custom28`, `custom29`, `custom30`, `custom31`, `custom32`, `custom33`, `custom34`, `custom35`, `custom36`, `custom37`, `custom38`, `custom39`, `custom40`, `custom41`, `custom42`, `custom43`, `custom44`, `custom45`, `custom46`, `custom47`, `custom48`, `custom49`, `custom50` ) VALUES ( 'M6Y-71A-BAMS', 'test', '', '2', '3', 'test', 'a', NOW(), NOW(), NULL, '192.168.219.85', NULL, '1', '0', '', '', '

2020-02-18 13:06:00 | ticket created by Óscar Cuesta (ocuesta)
' , 'Sin especificar', 'Larrabetzu Sarrikola', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '' )
MySQL said:
Field 'status' doesn't have a default value
Óscar
mkoch227
Posts: 666
Joined: Wed Jul 04, 2012 3:37 pm

Re: Field 'status' doesn't have a default value

Post by mkoch227 »

Was this a straight upgrade from HESK 2.8.5, or was this a previous Mods for HESK installation?
Mike, Lead Developer of Image HESK: A surprisingly simple, user-friendly and FREE help desk software with integrated knowledgebase.
Klemen
Site Admin
Posts: 10142
Joined: Fri Feb 11, 2005 4:04 pm

Re: Field 'status' doesn't have a default value

Post by Klemen »

HESK 3 doesn't make any changes to the database structure, so this must indeed be an old version or mods issue.

Runing the following in phpMyAdmin should fix this specific error:

Code: Select all

ALTER TABLE `hesk_tickets` CHANGE `status` `status` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0';
In any case please answer Mike's question so we can properly locate the issue and see how we can improve the update script.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
OCReactive
Posts: 45
Joined: Wed Apr 01, 2015 10:33 am

Re: Field 'status' doesn't have a default value

Post by OCReactive »

mkoch227 wrote: Tue Feb 18, 2020 1:19 pm Was this a straight upgrade from HESK 2.8.5, or was this a previous Mods for HESK installation?
It was HESK 2.8.4 with MfH lastest (I skipped HESK 2.8.5, maybe it was a bad idea).
Klemen wrote: Tue Feb 18, 2020 8:39 pm Runing the following in phpMyAdmin should fix this specific error:

Code: Select all

ALTER TABLE `hesk_tickets` CHANGE `status` `status` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0';
It worked like a charm!
Thanks!
Óscar
esmith
Posts: 20
Joined: Mon Oct 17, 2016 3:29 pm

Re: Field 'status' doesn't have a default value

Post by esmith »

I am going from Hesk 2.7.5 with MFH to hesk 312 and have the same sql error. When tyring to run the same script on my phpmyadmin I get this error.

#1292 - Incorrect datetime value: '0000-00-00 00:00:00' for column 'closedat' at row 1889
Klemen
Site Admin
Posts: 10142
Joined: Fri Feb 11, 2005 4:04 pm

Re: Field 'status' doesn't have a default value

Post by Klemen »

The original Hesk nevers sets closedat row dae to '0000-00-00 00:00:00' so it's something either MFH added or changed when uninstalling it.

You did ununstall MFH first, didn't you? Upgrading from MFH to Hesk 3 is not supported.

Manually running this query should fix the error you get, but there could be new ones:

Code: Select all

ALTER TABLE `hesk_tickets` CHANGE `closedat` `closedat` timestamp NULL DEFAULT NULL
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Post Reply