*SQLSTATE[HY000]: General error: 3780 Referencing column 'user_id' and 
referenced* *column 'id' in foreign key are incompatible* 
<https://stackoverflow.com/questions/63585525/sqlstatehy000-general-error-3780-referencing-column-user-id-and-referenced>

I'm trying to make a couple basic models , and link them with foreign Key. 
See the below attach:
[image: foreign#1.PNG]
[image: foriegn#2.PNG]
I migrated two table (model)  individual and then I tried to make the 
reference via foreign key. but It doesn't work, I get the following error 
:[image: 
foreign#3.PNG] 
I cannot figure out why this is happening because the referencing tool is 
successfully referencing multiple other tools, but it will not link to this 
one. What is the reason for this error? And how can I fix it so that I can 
link the tables? Why are they incompatible?=

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/ab429451-603a-4836-b3c7-158b0c1beda8n%40googlegroups.com.

Reply via email to