You should make car_id a primary key in cars.
More Related Contents:
- Error Code: 1005. Can’t create table ‘…’ (errno: 150)
- MySQL errorno 121
- MySQL Creating tables with Foreign Keys giving errno: 150
- MySQL Error 1215: Cannot add foreign key constraint
- Mysql error 1452 – Cannot add or update a child row: a foreign key constraint fails
- MySQL foreign key constraints, cascade delete
- How do I see all foreign keys to a table or column?
- MySQL Cannot Add Foreign Key Constraint
- How to find all tables that have foreign keys that reference particular table.column and have values for those foreign keys?
- Required to join 2 tables with their FKs in a 3rd table
- MySQL Foreign Key Error 1005 errno 150 primary key as foreign key
- Basics of Foreign Keys in MySQL?
- MySQL – Conditional Foreign Key Constraints
- How do I use on delete cascade in mysql?
- Add Foreign Key to existing table
- How to change the foreign key referential action? (behavior)
- How to create relationships in MySQL
- How to truncate a foreign key constrained table?
- MySQL InnoDB foreign key between different databases
- MySQL Removing Some Foreign keys
- Force InnoDB to recheck foreign keys on a table/tables?
- Show constraints on tables command
- MySQL foreign key to allow NULL?
- MySQL Errno 150
- How to remove constraints from my MySQL table?
- Foreign key constraints: When to use ON UPDATE and ON DELETE
- MySQL. Can’t create table errno 150
- MySQL DROP all tables, ignoring foreign keys
- “General error: 1005 Can’t create table” Using Laravel Schema Build and Foreign Keys
- MySQL Relationships