khsing / laravel-world

provide countries, states, and cities relations and database.
MIT License
427 stars 89 forks source link

Illuminate\Database\QueryException #43

Open mahdirashidi opened 3 years ago

mahdirashidi commented 3 years ago

SQLSTATE[HY000]: General error: 1364 Field 'id' doesn't have a default value (SQL: insert into migrations (migration, batch) values (2017_04_08_163453_create_world_citieslocale table, 4))

at\vendor\laravel\framework\src\Illuminate\Database\Connection.php:678 674▕ // If an exception occurs when attempting to run a query, we'll format the error 675▕ // message to include the bindings with SQL, which will make this exception a 676▕ // lot more helpful to the developer instead of just the database's errors. 677▕ catch (Exception $e) { ➜ 678▕ throw new QueryException( 679▕ $query, $this->prepareBindings($bindings), $e 680▕ ); 681▕ } 682▕

1 \vendor\laravel\framework\src\Illuminate\Database\Connection.php:471 PDOException::("SQLSTATE[HY000]: General error: 1364 Field 'id' doesn't have a default value")

2 \vendor\laravel\framework\src\Illuminate\Database\Connection.php:471 PDOStatement::execute()

any help with this one? this is happenin' when I run php artisan world:init

mahdirashidi commented 3 years ago

I Solved this one but have another internal error! I will add to issues

khsing commented 3 years ago

pls attach your running environment info, such as php version and mysql version, etc.

htetzawaung commented 3 years ago

I'm facing this problem, please help me. // If an exception occurs when attempting to run a query, we'll format the error 675▕ // message to include the bindings with SQL, which will make this exception a 676▕ // lot more helpful to the developer instead of just the database's errors. 677▕ catch (Exception $e) { ➜ 678▕ throw new QueryException( 679▕ $query, $this->prepareBindings($bindings), $e 680▕ ); 681▕ } 682▕