0

I'm doing an update on the existing table. I add new relation and Foreign Key Constraint. But i am getting error;

sqlalchemy.exc.OperationalError: (pymysql.err.OperationalError) (3780, "Referencing column 'product_id' and referenced column 'id' in foreign key constraint 'product_categories_ibfk_2' are incompatible.")

but when I delete the database completely and run it, it doesn't give an error.

I'm waiting for your help.

Attached are the new tables I added.

table

Creating a new pivot table and establishing a relationship

python_user
  • 5,375
  • 2
  • 13
  • 32
Sheeva
  • 1
  • 1

0 Answers0