Uploaded image for project: 'translate5'
  1. translate5
  2. TRANSLATE-5149

Implement a check in database:update to prevent FKs without explicit names

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • None
    • Installation & Update
    • Critical
    • Newer DB version has changed foreign key naming scheme, therefore a check was implemented that on development always names are given for foreign keys.

      problem

      With MariaDB 12.1 the automatic naming schema of foreign keys did change what led to problems on updates.

      solution

      In the DB Updater implement a check to find out table creations with foreign keys or single FK creations where no explicit name was given. Could be similar to 

      the 

      if (str_contains($sql, 'DEFINER=')) { 

      check in \ZfExtended_Models_Installer_DbUpdater::executeSqlFile

      legacy code

      Also we have to change several DB migration files back to 7.? version (we have to check what is out in the wild) and change the FK creations there to use the explicit name as it would have be done by MariaDB 12.0 to prevent follow up errors)

       

            axelbecher Axel Becher
            tlauria Thomas Lauria
            Thomas Lauria
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: