Search
 
SCRIPT & CODE EXAMPLE
 

PHP

General error: 1215 Cannot add foreign key constraint laravel

Laravel 5.8 Added bigIncrements As Defaults

So there is mismatch in foreign key field types. You see bigIncrements(id) in 
User table and unsigned Integer(user_id) in questions table.

How to fix:

1. Either change original migration from bigIncrements() to just
increments()

2. Or in your foreign key column do unsignedBigInteger() instead of 
unsignedInteger().
Comment

PREVIOUS NEXT
Code Example
Php :: Trying to get property 
Php :: exclude row from clooection laravel 
Php :: php tipi array 
Php :: codeigniter 4 query builder select 
Php :: php move uploaded file 
Php :: laravel framework 
Php :: php code obfuscator 
Php :: find largest element of an array in php 
Php :: php string filter email 
Php :: convert string to int php 
Php :: product slider shortcode woocommerce 
Php :: laravel authentication tutorial 8 
Php :: http_build_query 
Php :: php cheat sheet 
Php :: logout all the users from site wordpress 
Php :: wordpress header.php 
Php :: Warning: Undefined array key "playerthrows" in C:xampphtdocsmini_projetindex.php on line 10 
Java :: java: cannot access javax.naming.Referenceable class file for javax.naming.Referenceable not found 
Java :: spigot broadcast message 
Java :: convert input stream to string java 
Java :: javafx get screen size 
Java :: android open browser 
Java :: java setinterval equivalent 
Java :: change visibility of textview andoird 
Java :: how to set checkbox size in android 
Java :: android java increment hashmap value 
Java :: java bufferedimage get raster data 
Java :: java GUI jframe text 
Java :: string array to arraylist android 
Java :: random number in range java 
ADD CONTENT
Topic
Content
Source link
Name
2+2 =