Version of the data is higher than the docker image. Can I just change the data version somewhere?

I have been running the nextcloud 21 docker image, and tried to upgrade by pulling the nextcloud 23 image, forgetting that I needed to do one version increase at a time. So now, when I go back to the version 21 image, I get this message:

Can't start Nextcloud because the version of the data ( is higher than the docker image version ( and downgrading is not supported. Are you sure you have pulled the newest image version?

I’m not sure how the data was already marked as being from version 23. Does that happen automatically, as soon as the container starts up? Is there some way for me to just set that back somewhere, so that I can try upgrading to version 22? I don’t think any part of the upgrade process for version 23 actually started. I did not run the occ upgrade command.

My config.php says 'version' => ''. When that error says “the version of the data (,” where does it get the number?

Nextcloud version: 21.0.1
Operating system and version: Ubuntu 20.04

I found where it comes from, it’s the $OC_VERSION variable in version.php. I had figured it was something in the Nextcloud code checking for that, but it’s actually done in when the Docker image starts up (docker/ at 3a1f59b21c49650271b1ce0a50833d51806ec57e · nextcloud/docker · GitHub).