From 1438006861b1c5a7b5ae502528208d22e1a3a731 Mon Sep 17 00:00:00 2001 From: Benjamin Dalsass Date: Wed, 16 Jul 2025 09:35:19 +0200 Subject: [PATCH] =?UTF-8?q?N=C2=B08419=20-=20Improve=20Setup=20process=20b?= =?UTF-8?q?y=20avoiding=20the=20update=20of=20the=20attachment=20table=20w?= =?UTF-8?q?hen=20contact=5Fid=20is=20already=20set?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- datamodels/2.x/itop-attachments/module.itop-attachments.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/datamodels/2.x/itop-attachments/module.itop-attachments.php b/datamodels/2.x/itop-attachments/module.itop-attachments.php index 54489c1b3..6c097cc57 100644 --- a/datamodels/2.x/itop-attachments/module.itop-attachments.php +++ b/datamodels/2.x/itop-attachments/module.itop-attachments.php @@ -201,7 +201,7 @@ SQL; } SetupLog::Info("Initializing attachment/item_org_id - $iUpdated records have been adjusted"); - if (MetaModel::GetAttributeDef('Attachment', 'contact_id') instanceof AttributeExternalKey) { + if (MetaModel::GetAttributeDef('Attachment', 'contact_id') instanceof AttributeExternalKey && version_compare($sPreviousVersion, '3.2.0', '<')) { SetupLog::Info("Upgrading itop-attachment from '$sPreviousVersion' to '$sCurrentVersion'. Starting with 3.2.0, contact_id will be added into the DB..."); $sUserTableName = MetaModel::DBGetTable('User'); $sUserFieldContactId = MetaModel::GetAttributeDef('User', 'contactid')->Get('sql');