Upgrading mender client 3.4.0 to 5.1.0 skips Artifact-state-scripts

We noticed that when upgrading our yocto-image to scathgap (and in the same step upgrading mender-client 3.4.0 to mender 5.1.0) the new artifact is always installed as a bootstrap artifact.
And thus skipping all ArtifactCommit-state-scripts.

As far as I can tell, this is caused by a mismatch in the mender-store:
The 3.4.0-client writes the Key artifact_name when writing the new artifact to disk. 5.1.0 searches for artifact-name.
I’ve patched some more logs into the mender-update-binary, to find this:

Oct 01 15:44:06 beegyGW systemd[1]: Started Mender OTA update service.
Oct 01 15:44:11 beegyGW mender-update[611]: record_id=1 severity=trace time="2026-Oct-01 15:44:11.791028" name="Global" msg="Loading the deployment state data"
Oct 01 15:44:11 beegyGW mender-update[611]: record_id=2 severity=trace time="2026-Oct-01 15:44:11.792175" name="Global" msg="Got database state data content: {"Version":2,"Name":"reboot","UpdateInfo":{"Artifact":{"Source":{"URI":"<url>","Expire":"2026-10-02T15:38:04.130976354Z"},"device_types_compatible":["board"],"PayloadTypes":["rootfs-image"],"artifact_name":"local-test_202610011559","artifact_group":""},"ID":"6ffd2737-aaf9-4a59-aa46-a5c927252896","RebootRequested":["reboot-type-custom"],"SupportsRollback":"rollback-supported","StateDataStoreCount":5,"HasDBSchemaUpdate":false}}"
Oct 01 15:44:11 beegyGW mender-update[611]: record_id=3 severity=trace time="2026-Oct-01 15:44:11.792657" name="Global" msg="Finished loading the state data"
Oct 01 15:44:11 beegyGW mender-update[611]: record_id=4 severity=error time="2026-Oct-01 15:44:11.797591" name="Global" msg="Key update-control-maps not found in database"
Oct 01 15:44:11 beegyGW mender-update[611]: record_id=5 severity=error time="2026-Oct-01 15:44:11.798072" name="Global" msg=""
Oct 01 15:44:11 beegyGW mender-update[611]: record_id=6 severity=error time="2026-Oct-01 15:44:11.798871" name="Global" msg="Key artifact-name not found in database"
Oct 01 15:44:11 beegyGW mender-update[611]: record_id=7 severity=error time="2026-Oct-01 15:44:11.799003" name="Global" msg="Key Not found"
Oct 01 15:44:11 beegyGW mender-update[611]: record_id=8 severity=info time="2026-Oct-01 15:44:11.799060" name="Global" msg="Installing the bootstrap Artifact"
Oct 01 15:44:11 beegyGW mender-update[611]: record_id=9 severity=error time="2026-Oct-01 15:44:11.799112" name="Global" msg="Key standalone-state not found in database"
Oct 01 15:44:11 beegyGW mender-update[611]: record_id=10 severity=error time="2026-Oct-01 15:44:11.799155" name="Global" msg=""
Oct 01 15:44:11 beegyGW mender-update[611]: record_id=11 severity=trace time="2026-Oct-01 15:44:11.799286" name="Global" msg="Entering state N6mender6update10standalone20PrepareDownloadStateE"

I’ve also built an image containing mender 4.0.7, but this skips all ArtifactCommit-sctipts too, so I guess it uses the same DB-key as 5.1.0.

Is there a documented way to upgrade the mender-store from 3.x.y to 4.x.y or 5.x.y?