Open ankorinek opened 1 month ago
Hi @ankorinek, your FK is not unsigned, but Foreign keys must be unsigned. I recommend letting Vemto create the FKs (you add relationships to the models, and Vemto automatically creates them). I'll keep this issue open as I pretend to add an alert on Vemto when an FK is not correctly formulated
I've created 2 tables: organization and person. Each person belongs to one organization.
When migrating, I get
SQLSTATE[HY000]: General error: 3780 Referencing column 'organization_id' and referenced column 'id' in foreign key constraint 'person_organization_id_foreign' are incompatible. (Connection: mysql, SQL: alter table
person
add constraintperson_organization_id_foreign
foreign key (organization_id
) referencesorganization
(id
) on delete cascade on update cascade)Code for organization:
Code for person: