mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
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:
@@ -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))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user