From 97f4c322712d1d2456308f315bbacfedb4de9963 Mon Sep 17 00:00:00 2001 From: Pierre Goiffon Date: Thu, 26 Mar 2020 10:18:34 +0100 Subject: [PATCH] =?UTF-8?q?N=C2=B02881=20Improve=20robustnedd=20of=20\Modu?= =?UTF-8?q?leInstallerAPI::RenameEnumValueInDB=20Was=20causing=20errors=20?= =?UTF-8?q?when=20migrating=20from=20datamodels=20where=20the=20fields=20w?= =?UTF-8?q?ere=20not=20enum=20yet=20(this=20method=20is=20usually=20launch?= =?UTF-8?q?ed=20using=20\ModuleInstallerAPI::BeforeDatabaseCreation,=20so?= =?UTF-8?q?=20before=20an=20ALTER=20could=20be=20done=20to=20the=20column)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup/moduleinstaller.class.inc.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/setup/moduleinstaller.class.inc.php b/setup/moduleinstaller.class.inc.php index e7c5337be..3880ae40b 100644 --- a/setup/moduleinstaller.class.inc.php +++ b/setup/moduleinstaller.class.inc.php @@ -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)) {