Set up fk for device on device_sync_entries