Answers for "error Code: 3780. Referencing column 'user_id' and referenced column 'id' in foreign key constraint 'nobo_nps_ibfk_1' are incompatible. 0.016 sec"

SQL
0

General error: 3780 Referencing column 'user_id' and referenced column 'id' in foreign key constraint 'blog_posts_user_id_foreign' are incompatible.

$table->bigInteger('user_id')->unsigned()->index();
$table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
Posted by: Guest on November-28-2020

Code answers related to "error Code: 3780. Referencing column 'user_id' and referenced column 'id' in foreign key constraint 'nobo_nps_ibfk_1' are incompatible. 0.016 sec"

Code answers related to "SQL"

Browse Popular Code Answers by Language