knex alter table " " add constraint " " foreign key (" ") references " " ("id") on update CASCADE on delete CASCADE - relation " " does not exist code example
Example: 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');