Consolidation: Check after delete of target database

After the database deletion, it’s necessary to launch a check to clean records.
Consolidation records are generated in GLMovementDBIdEntryNum table.

Here, two checks that consider this table: Untitled

The first one, “GLMovementDBIdEntryNumber – Delete incorrect records” must run.
This process deletes invalid records in current database in consolidation table (GLMovementDBIdEntryNumber). They are invalid because when the target database does not exist or the corresponding entry in target does not exist.
In more than deletion, an update is done to allow a new launch of consolidation: GLMovement.ModificationType to 0.

For information, the second check, “GLMovementDBIdEntryNumber – Update records” must be used for other case.
It creates missing records in current database GLMovementDBIdEntryNumber table based upon GLMovement.DBIdEntryNumber field. (Old consolidation method).
It deletes also all the GLMovementDBIdEntryNumber records for missing entries in current database.