Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Illuminate\Database\QueryException #43

Open
mahdirashidi opened this issue Jan 29, 2021 · 3 comments
Open

Illuminate\Database\QueryException #43

mahdirashidi opened this issue Jan 29, 2021 · 3 comments

Comments

@mahdirashidi
Copy link

mahdirashidi commented Jan 29, 2021

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_cities_locale_
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
Copy link
Author

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

@khsing
Copy link
Owner

khsing commented Mar 4, 2021

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

@htetzawaung
Copy link

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▕

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants