entrust
entrust copied to clipboard
cannot add foreign key constaint
Illuminate\Database\QueryException : SQLSTATE[HY000]: General error: 1215 Cannot add foreign key constraint (SQL: alter table role_user
add constraint role_ user_user_id_foreign
foreign key (user_id
) references users
(id
) on delete cascade on update cascade)
check #941
I think you should edit $table->integer('user_id')->unsigned();
by $table->bigInteger('user_id')->unsigned();
. Because on user's migration file use $table->bigIncrements('id');