Closed Rom1-B closed 6 months ago
@AdrienClairembault
below, there is displayPref
migration if $domigration_itemtypes = true
//Only migrate itemtypes when it's only necessary, otherwise it breaks upgrade procedure !
if ($domigration_itemtypes) {
Plugin::migrateItemType(
[3150 => 'PluginOrderOrder'],
["glpi_savedsearches", "glpi_savedsearches_users",
"glpi_displaypreferences", "glpi_documents_items",
"glpi_infocoms", "glpi_logs", "glpi_tickets"
],
[]
);
}
without the check $DB->tableExists('glpi_plugin_order')
the migration of displayPref
is constantly executed
When the update renames the table, this block is executed (it was never executed before the previous PR mentioned).
As there is a uniqueness key on users_id, itemtype and num, it raises the error when trying to replace '3150' with 'PluginOrderOrder', as the key with PluginOrderOrder already exists.
ref !31826
Fix error message during plugin update (since https://github.com/pluginsGLPI/order/pull/372) :