DatabaseShell errors with MySQL 8.x

XMLWordPrintable

      Executing the DatabaseShell via

      ./Console/cake database

      when the database is MySQL 8.x and the schema is at version 4.3.5 and trying to upgrade to Registry 4.4.2 results in a large number of errors and table schemas fail to update resulting in Registry no longer working.

      Tested with both PHP 8.3.x and 8.2.x.

      The first of many errors is

      mysqli
          ALTER TABLE cm_meta ADD `upgrade_version` VARCHAR(16)   
      ------------------------------------------------------------------------------
      Query: ALTER TABLE cm_meta ADD `upgrade_version` VARCHAR(16)  failed. Duplicate column name 'upgrade_version'
      1060: Duplicate column name 'upgrade_version'
      							ADOConnection._Execute(ALTER TABLE cm_meta ADD `upgrade_version` VARCHAR(16) )% line 1116, file: /srv/comanage-registry/app/Ve
      ndor/adodb5/drivers/adodb-mysqli.inc.php
      						ADODB_mysqli.execute(ALTER TABLE cm_meta ADD `upgrade_version` VARCHAR(16) )% line  399, file: /srv/comanage-registry/app/Vendor/adodb
      5/adodb-datadict.inc.php
      					ADODB_DataDict.executeSQLArray(Array[2387], true)% line 1742, file: /srv/comanage-registry/app/Vendor/adodb5/adodb-xmlschema03.inc.php
      				adoSchema.executeSchema(Array[2387])% line  135, file: /srv/comanage-registry/app/Console/Command/DatabaseShell.php
      			DatabaseShell.main()% line  464, file: /srv/comanage-registry/lib/Cake/Console/Shell.php
      		Shell.runCommand(null, Array[0])% line  222, file: /srv/comanage-registry/lib/Cake/Console/ShellDispatcher.php
      	ShellDispatcher.dispatch()% line   66, file: /srv/comanage-registry/lib/Cake/Console/ShellDispatcher.php
      ShellDispatcher.run(Array[4])% line   41, file: /srv/comanage-registry/app/Console/cake.php 

            Assignee:
            Benn Oshrin (internet2.edu)
            Reporter:
            Scott Koranda
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: