I have a system already in production from which the customer has requested a modification.
Modification is the creation of an EMPLOYEE table that will relate to the DRIVE table, creating a 1: N relationship (One Employee, multiple DRIVES).
I know how to do the relationship when the table is empty. But in this case, since it is an EVOLUTIVE, the MOVEMENT table already has records. In theory, when creating the foreign key, this field could be null for the old data. However, the give the UPDATE-DATABASE, SQL returns the error the following error:
The ALTER TABLE statement conflicted with the FOREIGN KEY constraint "FK_dbo.TB_MOVIMENTACAO_dbo.TB_FUNCIONARIO_Id_Funcionario". The conflict occurred in database "FieldService_Desenv", table "dbo.TB_FUNCIONARIO", column 'Id'.
How to outline this problem? What do you do in this case?