Migrating the database

I’m migrating a failed-to-upgrade 1.8 version into a 2.10. I had some advances that I wanted to share and an issue I can’t get my head around.

Things I tried: importing the 1.8 version database to 2.10 (failed with invalid upgrade message) importing users / patients / encounters (failed to show users and patients and mising visit table rows) I finally created a CSV with users / patients / encounter observations and used the REST API to create them in the target version. Afterwards I dumped the database and restored it in production. An issue with lucene raised but then I updated the index in the system administration screen and was up to see the restored patients.

The issue I’m having now is with the creation of new patients. Whenever I try to create a patient I see: Identifier 10003P is being used by another patient.

I think that the “next identifier” to use is not updated and I would like to update it. Is there any way to do this? I searched in the forum for migration and backup/restore strategies and failed to find this error.

Kind regards!

In the database table named idgen_seq_id_gen, what value do you have for the next_sequence_value field?

Hi Daniel,

select * from idgen_seq_id_gen;