Changed primary key to foreigh key