joselfonseca / lighthouse-graphql-passport-auth

Add GraphQL mutations to get tokens from passport for https://lighthouse-php.com/
https://lighthouse-php-auth.com/
MIT License
228 stars 56 forks source link

Latest version 6.0 migration error #138

Closed stephenjason89 closed 3 years ago

stephenjason89 commented 3 years ago

PHP 7.4 Laravel 8 Doing php artisan migrate:fresh throws this error

SQLSTATE[HY000]: General error: 1005 Can't create table foodat.social_providers (errno: 150 "Foreign key constraint is incorrectly formed") (SQL: alter table social_providers add constrain t social_providers_user_id_foreign foreign key (user_id) references users (id) on delete c ascade)

stephenjason89 commented 3 years ago

You should change

        $table->bigInteger('user_id');

to $table->unsignedBigInteger('user_id');

created a pull request on this

joselfonseca commented 3 years ago

Thank you, PR merged.