you need to namespace this and name this something more like emrapi_bed_patient_assignment_patient_fk
(similar comment for the one above)