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 : SQLSTATE[HY000]: General error: 1005 Can't create table test.#sql-774_e8 (errno: 150 "Foreign key constraint is incorrectly formed") (SQL: alter table chatter_discussion add constraint chatter_discussion_chatter_category_id_foreign foreign key (chatter_category_id) references chatter_categories (id) on delete cascade on update cascade) #257

Open
enzodpaiva opened this issue Sep 14, 2019 · 2 comments

Comments

@enzodpaiva
Copy link

how i resolve this ?

@moseskamau338
Copy link

I ha the same problem but I discovered it's an issue regarding the data types assigned in the schemas.
In my case, the user id in the users table used $table->bigIncrements('id'), I just changed that to $table->increments('id'). All is well now :)

@arslanramay
Copy link

I ha the same problem but I discovered it's an issue regarding the data types assigned in the schemas.
In my case, the user id in the users table used $table->bigIncrements('id'), I just changed that to $table->increments('id'). All is well now :)

This helped to resolve my issue. Thanks a lot :)

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