Hello,
I'm just trying to set Passport 4.0.3 up along with Laravel 5.5; I'm using Php 7.2.10 and Mysql 5.7.24 on a Ubuntu 18.04 64bit system.
When I try to run migrations, I get the error:
SQLSTATE[HY000]: General error: 1364 Field 'id' doesn't have a default value (SQL: insert intomigrations(migration,batch) values
(2016_06_01_000002_create_oauth_access_tokens_table, 8))
The 'oauth_access_tokens' is actually created but the process stops there.
Testing Passport within the same Laravel project on a different system (ubuntu 16.04, php 7.1.20, mysql 5.7.24) works like a charm!
Please upgrade to the latest Passport and Laravel versions to see if the problem persists. Feel free to report back if the problem still happens after upgrading.
The problem was related to my "migrations" table, since on the first environment it missed the "autoincrement" flag on the id field. This is very strange, since I simply imported a working database dump.
By the way, I fixed the issue manually adding the "autoincrement" flag. So sorry for this!
No problem!
Most helpful comment
The problem was related to my "migrations" table, since on the first environment it missed the "autoincrement" flag on the id field. This is very strange, since I simply imported a working database dump.
By the way, I fixed the issue manually adding the "autoincrement" flag. So sorry for this!