An imported run can arrive before its service has been identified. A nullable foreign key can hold NULL. Every assigned value must still reference an existing service.
Create deployments with an integer primary key id and a nullable integer service_id referencing services(id). Add run 104 with no assigned service and run 105 for api.