Postgresql integration prevents app server from starting

Hi,
I have upgraded my raspberry pi 4 to the latest software using apt.
Everything worked fine until I enabled postgres integration. This caused a fatal error during app server startup.
Here is part of the log file:

Jun 23 11:06:59 rak-gateway chirpstack-application-server[901]: time=“2021-06-23T11:06:59.972468523+01:00” level=info msg=“integration/postgresql: applying PostgreSQL schema migrations”
Jun 23 11:06:59 rak-gateway chirpstack-application-server[901]: time=“2021-06-23T11:06:59.980676727+01:00” level=fatal msg=“setup integration error: new integration error: integration/postgresql: migrate up error: Dirty database version 2. Fix and force version.”
Jun 23 11:06:59 rak-gateway systemd[1]: chirpstack-application-server.service: Main process exited, code=exited, status=1/FAILURE
Jun 23 11:06:59 rak-gateway systemd[1]: chirpstack-application-server.service: Failed with result ‘exit-code’.

If I remove the postgres integration it restarts OK.
Alan

Please see Database Migration from 3.14 to 3.15.