N°2881 Improve robustnedd of \ModuleInstallerAPI::RenameEnumValueInDB

Was causing errors when migrating from datamodels where the fields were not enum yet (this method is usually launched using \ModuleInstallerAPI::BeforeDatabaseCreation, so before an ALTER could be done to the column)
This commit is contained in:
Pierre Goiffon
2020-03-26 10:18:34 +01:00
parent c002ca7902
commit 97f4c32271

View File

@@ -147,6 +147,12 @@ abstract class ModuleInstallerAPI
{
$aCurrentValues = explode("','", $aMatches[1]);
}
else
{
// not an enum currently : return !
// we could update values, but a clear error message will be displayed when altering the column
return;
}
}
if (!in_array($sFrom, $aNewValues))
{