User with no manager errors on update
When editing a user with no manager i receive an error when saving the change to the user.
SQLSTATE[22007]: Invalid datetime format: 1366 Incorrect integer value: '' for column 'manager_id' at row 1 (SQL: update users set updated_at = 2014-05-29 02:22:01, manager_id = where id = 2)
Can you check if you're running MySQL in strict mode?
I checked and got the line below;
STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION
Okay, so it looks like you're running in strict mode. I should be able to have a patch for you before the weekend. Otherwise you can turn strict mode off.
I have turned strict mode off and this does not occur anymore.
Hi @madd15 - apologies for the delay in resolving this. I'll still be working on a patch for this for folks who need to run in strict mode, but I'm glad you were able to get past it for now.
When create a user with no manager i receive an error when saving the change to the user.
Illuminate \ Database \ QueryException
SQLSTATE[22007]: Invalid datetime format: 1366 Incorrect integer value: '' for column 'location_id' at row 1 (SQL: insert into users (first_name, last_name, jobtitle, manager_id, location_id, phone, email, password, activated, permissions, updated_at, created_at) values
@tranlehien2002 Please check if you're running mysql in strict mode, as discussed above
I can not turn off SQL_MODE on MariaDB.
https://mariadb.com/kb/en/mariadb/documentation/variables-and-modes/sql_mode/
I set @@SQL_MODE=''; but when I restart MySQL Service then SQL_MODE = STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION
Changing it that way only lasts until the next time you restart, same as MySQL. You'll need to change it in my.cnf: https://www.farbeyondcode.com/Solution-for-MariaDB-Field--xxx--doesn-t-have-a-default-value-5-2720.html
Thanks @snipe I change it in my.ini I have turned strict mode off and this does not occur anymore.
Great, glad you got it sorted. :)