Why a second, independent check is needed
The migration script has its own consistency gates and does not save any data if one of them is different from zero. Each gate has a red test: an injected old error turns the gate on. This proves that the gate works, but it does not prove that the script has no blind spot.
That is why a second check runs next to the script, written separately. It does not use the script's functions. It reads the result through the editor's interface and assesses it from the outside. The agreement of two independent mechanisms is stronger evidence than a green result from one.
What the check through the API verifies
The second check reads the result through the editor's API and verifies geometric and logical phenomena. Overlapping lines above 0.1 m2 means that two lines lie on top of each other. Lines in a wall mean a shape that extends beyond the interior of the building. Pins inside a line mean a place assigned to the wrong area.
The interior of the building is shrunk by 1 m from the wall, and the shape of each line is clipped to the interior and checked vertex by vertex. The number of lines extending beyond the wall must be 0. Flat objects, such as a car park, a scale or a yard, get their own volume, usually 1 m high, so that they do not disappear from the map.
- Overlapping lines above 0.1 m2: expected 0.
- Lines in a wall: expected 0.
- Pins inside a line: checked for their assignment.
- Flat objects with their own volume: present.
Geometry quality check thresholds
Comparing by content, not by identifiers
Record identifiers may differ after each run of the migration, because the structure is built from scratch. That is why the check compares the state by content: name, area, level and geometry. Two records with the same content are the same record, even when their number differs.
This principle suits a repeatable migration. Each run builds the structure from scratch, the save runs in a single transaction with a trial mode, and before the save a copy of the structure is made to an SQL file. An auditor can therefore repeat the check on the copy and get the same result.
Coordinate conversion as a control point
Converting local metres into geographic coordinates has one source of truth. The migration script must be a 1:1 port of that function and pass verification on control points. In the case described, the measured maximum error was 0.01 m across 64 points.
The auditor sets the acceptance threshold before the check, not after it. The 0.01 m result is recorded in the report together with the number of points, so that the next migration has a reference point.
The deviation report
The report contains the list of checks, the expected and measured value, and the decision: acceptance, correction or stopping the migration. A deviation is described specifically: what, where, how much and what the proposed correction is. Deviations that need a correction return to the next run of the script and are not corrected by hand in the system.
Such a report supports meeting audit requirements, because it provides evidence that the state of the data after the migration was measured independently of the script's author.
Video
Frequently asked questions
Why is comparing by identifiers not enough?
Because the migration builds the structure from scratch, so the numbers change. Comparing by name, area, level and geometry shows whether the content is the same.
What does the system do when the consistency gate is different from zero?
The script does not save the data. The save runs in a single transaction with a trial mode, preceded by a copy of the structure.
Who should carry out the independent check?
A person other than the author of the migration script, for example an internal auditor or the second member of the implementation team.
Do you need a migration deviation report?
We will provide the deviation report template and describe how to organise an independent check after the save.
Let's talk