Situation
Upgrading from 5.0.2 to 7.0.2, database imported OK, document files transferred, etc. Running the sql_upgrade.php script fails first about a missing uuid column in the facility table. I manually added that column after looking at the table description online, then the script fails looking for a table named uuid_registry which does not exist.
OpenEMR Version
I’m using OpenEMR version 5.0.2 (5)
Browser:
I’m using: Chrome latest
Operating System
I’m using: new server running on Amazon Linux 2023
Search
Did you search the forum for similar questions?
Yes, there are a couple about the uuid update process but that seems not the same thing.
Logs
Did you check the logs?
Was there anything pertinent in them?
Please paste them here (surround with three backticks (```) for readability.
You can also turn on User Debugging under Administration->Globals->Logging User Debugging Options=>All
first error about missing column in facility table:
[22-Sep-2024 01:28:59 UTC] Service with name "Carecoordination\Model\EncounterccdadispatchTable" could not be created. Reason: Failed to execute statement. Error: Unknown column 'uuid' in 'where clause' Statement: SELECT count(*) AS cnt FROM `facility` WHERE `uuid` IS NULL OR `uuid` = '' OR `uuid` = '
second error after manually adding a uuid column to facility table:
[22-Sep-2024 01:37:54 UTC] Service with name "Carecoordination\Model\EncounterccdadispatchTable" could not be created. Reason: Failed to execute statement. Error: Table 'openemr.uuid_registry' doesn't exist Statement: SELECT `uuid` FROM `uuid_registry` WHERE `uuid` = ?#0 /var/www/html/openemr/vendor/laminas/laminas-servicemanager/src/ServiceManager.php(264): Laminas\ServiceManager\ServiceManager->doCreate()
#1 /var/www/html/openemr/interface/modules/zend_modules/module/Carecoordination/config/module.config.php(182): Laminas\ServiceManager\ServiceManager->get()
#2 /var/www/html/openemr/vendor/laminas/laminas-servicemanager/src/ServiceManager.php(642): Carecoordination\Module->Carecoordination\{closure}()
#3 /var/www/html/openemr/vendor/laminas/laminas-servicemanager/src/ServiceManager.php(264): Laminas\ServiceManager\ServiceManager->doCreate()
#4 /var/www/html/openemr/interface/modules/zend_modules/module/Carecoordination/config/module.config.php(179): Laminas\ServiceManager\ServiceManager->get()
#5 /var/www/html/openemr/vendor/laminas/laminas-servicemanager/src/ServiceManager.php(642): Carecoordination\Module->Carecoordination\{closure}()
#6 /var/www/html/openemr/vendor/laminas/laminas-servicemanager/src/ServiceManager.php(264): Laminas\ServiceManager\ServiceManager->doCreate()
#7 /var/www/html/openemr/interface/modules/zend_modules/module/Carecoordination/Module.php(71): Laminas\ServiceManager\ServiceManager->get()
#8 /var/www/html/openemr/vendor/laminas/laminas-eventmanager/src/EventManager.php(320): Carecoordination\Module->onBootstrap()
#9 /var/www/html/openemr/vendor/laminas/laminas-eventmanager/src/EventManager.php(170): Laminas\EventManager\EventManager->triggerListeners()
#10 /var/www/html/openemr/vendor/laminas/laminas-mvc/src/Application.php(148): Laminas\EventManager\EventManager->triggerEvent()
#11 /var/www/html/openemr/src/Core/ModulesApplication.php(65): Laminas\Mvc\Application->bootstrap()
#12 /var/www/html/openemr/interface/globals.php(646): OpenEMR\Core\ModulesApplication->__construct()
#13 /var/www/html/openemr/sql_upgrade.php(48): require_once('...')
#14 {main}
That code doesn’t seem to affect what sql_upgrade.php is tripping on. I made the change but still see a blank page, and this error in the server error log. Seems like it is expecting uuid columns in tables that don’t have it yet in 5.0.2.
[25-Sep-2024 16:16:18 UTC] Service with name "Carecoordination\Model\EncounterccdadispatchTable" could not be created. Reason: Failed to execute statement. Error: Unknown column 'uuid' in 'where clause' Statement: SELECT count(*) AS cnt FROM facility WHERE uuid IS NULL OR uuid = '' OR uuid = '
I started over and upgraded from 5.0.2 to 6.1 and that worked. During the SQL upgrade script, I saw it creating the UUID columns in existing tables. So it seems you have to go to 6.1 and run its sql_upgrade script, then rinse and repeat to get to v7.