Fix foreign key constrain definition