Answers for "knex referenced column 'id' in foreign key constraint 'ponto_items_pt_id_foreign' are incompatible."

1

knex referenced column 'id' in foreign key constraint 'ponto_items_pt_id_foreign' are incompatible.

//Assuming you might be using mysql, you need to specify that the UserId is .unsigned()


table.integer('UserId',11).unsigned().inTable('User').references('UserId');
Posted by: Guest on June-02-2020

Code answers related to "knex referenced column 'id' in foreign key constraint 'ponto_items_pt_id_foreign' are incompatible."

Code answers related to "Javascript"

Browse Popular Code Answers by Language