database migration help required from LabKey CE v23.11.11 to 24.3.10

LabKey Support Forum
database migration help required from LabKey CE v23.11.11 to 24.3.10 vipin  2024-07-19 02:54
Status: Active
 

Hello LabKey team,

I am trying to upgrade my LabKey instance from 23.11.11 to 24.3.10 community edition version. I am able to bring the web application but the backend database migration is having troubles.

anything I have to particularly miss here.

pg_restore: error: could not execute query: ERROR:  constraint "fk_surveys_surveydesignid" for relation "surveys" already exists
Command was: ALTER TABLE ONLY survey.surveys
    ADD CONSTRAINT fk_surveys_surveydesignid FOREIGN KEY (surveydesignid) REFERENCES survey.surveydesigns(rowid);

pg_restore: warning: errors ignored on restore: 859

thanks in advance!
Vipin

 
 
vipin responded:  2024-07-22 01:51

Please ignore this request as I was able to migrate the database schema from the version 23.11.11 to 24.3.10 without any issues.

There was an issue with my postgres database configuration.

 
mohara responded:  2024-07-22 08:58

That's great to hear, Vipin!

For the benefit of others who may see this when looking into similar issues, I was going to suggest that that looks like a 'downstream' issue - it's coming from a not-new upgrade script for the survey module (survey-12.30-12.31.sql), and the note that 859 errors were ignored is making me suspect that earlier in the startup/upgrade process there were other errors that might be more informative.

The best next step would be to restart the upgrade from your db backup and previous config. As you know, the upgrade process is significantly different when you move for the first time to a version with Tomcat embedded (24.3 or higher). Users must be sure to carefully follow the steps to migrate the configuration and settings from the older way to the new service file and application.properties method of configuring things.

When you start the service, watch for console errors, and once it’s running, watch the <LABKEY_HOME>/logs/labkey.log carefully for errors. Some commonly missed steps and the errors they produce as well as other things to check are in the troubleshooting documentation here.

Congrats on getting it sorted out on your own. Now that you've done that first upgrade to embedded Tomcat, all your future upgrades (including to the newly-released 24.7) will be far simpler than upgrades were previously.

Thanks for getting in touch,

--Molly