N°2869 - Fix 2.7 Migration

Run UPDATE requests just after the corresponding ALTER TABLE requests
This commit is contained in:
Eric
2020-03-16 18:49:12 +01:00
parent 4f7676c42d
commit c26b9459bb

View File

@@ -5701,10 +5701,14 @@ abstract class MetaModel
{
$sChangeList = implode(', ', $aChangeList);
$aCondensedQueries[] = "ALTER TABLE `$sTable` $sChangeList";
}
foreach($aPostTableAlteration as $sTable => $aChangeList)
{
$aCondensedQueries = array_merge($aCondensedQueries, $aChangeList);
// Add request right after the ALTER TABLE
if (isset($aPostTableAlteration[$sTable]))
{
foreach ($aPostTableAlteration[$sTable] as $sQuery)
{
$aCondensedQueries[] = $sQuery;
}
}
}
return array($aErrors, $aSugFix, $aCondensedQueries);