database schema migration

LabKey Support Forum
database schema migration vipin  2024-04-12 06:59
Status: Active
 

Hello LabKey support team,

I was running LabKey community edition version 21.11.4 and associated DB in postgres 14. Now I would like to migrate the instance to Version Number: 23.11.11 community edition.
I did the dump of the database and loaded it to the new database without issues but when I started the server, LabKey ended up with a couple of internal errors. Most of them are related to the foreign key mismatches. Is there a way to upgrade the schemas from previous versions? If you would like to have the complete error message I am happy to provide that as well. 
Regards,
Vipin

 
 
adam responded:  2024-04-12 17:02

Hi Vipin,

I answered this over email a few days ago; you may want to search your spam folders again. I'll repeat it here in case you can't find it. And for the benefit of others.

LabKey automatically upgrades all of your database schemas, as long as you're upgrading from a version that's compatible with your desired upgrade version. Unfortunately, 21.11.4 is too old to upgrade directly to 23.11.11, so you'll need to upgrade to an interim version first, say 22.11.9, and then upgrade that to 23.11.11. This is documented in more detail on this page: https://www.labkey.org/Documentation/wiki-page.view?name=upgradeSupportPolicy

You can obtain previous Community Edition versions here: https://www.labkey.org/Documentation/wiki-page.view?name=prevReleases As you'll see, we remove upgrade support for an entire year's worth of releases at the beginning of each year; as such, if you're not planning to upgrade regularly you should deploy releases that are made early in the year, such as 24.3. That gives you nearly two years of upgrade window. (But mostly I encourage upgrades to the latest version every four months to ensure you receive all the improvements and security fixes.)

Regards,
Adam

 
vipin responded:  2024-04-15 23:04

Hi Adam,
Sorry for the late reply from my side. Yeah it somehow landed in the spam folder even though the mail address was in the allowlist.
Thank you for your reply thread. The documentation was very helpful to migrate the database schema from my old instance to the new version of LabKey. I successfully migrated the old database schema and updated the instance with the latest release version of the LabKey (23.11.11). 
​Yes I will take care of upgrading the instance every four months with the latest release candidates.
Thank you very much for your support! This case can be closed.
Regards,
Vipin