Add deletion of past entities to update procedure to avoid doctrine to suggest creation of those tables in 1.11 - refs #2214

pull/2487/head
Yannick Warnier 8 years ago
parent 7621d9e42e
commit 21fad15dd5
  1. 17
      main/install/update-files-1.10.0-1.11.0.inc.php

@ -44,6 +44,23 @@ if (defined('SYSTEM_INSTALLATION')) {
@rrmdir($skypePluginPath); @rrmdir($skypePluginPath);
} }
// Some entities have been removed in 1.11. Delete the corresponding files
$entitiesToRemove = [
api_get_path(SYS_PATH).'src/CoreBundle/Entity/Groups.php',
api_get_path(SYS_PATH).'src/CoreBundle/Entity/GroupRelGroup.php',
api_get_path(SYS_PATH).'src/CoreBundle/Entity/GroupRelTag.php',
api_get_path(SYS_PATH).'src/CoreBundle/Entity/GroupRelUser.php'
];
foreach ($entitiesToRemove as $entity) {
if (file_exists($entity)) {
$success = unlink($entity);
if (!$success) {
error_log('Could not delete '.$entity.', probably due to permissions. Please delete manually to avoid entities inconsistencies');
}
}
}
if ($debug) { if ($debug) {
error_log('Folders cleaned up'); error_log('Folders cleaned up');
} }

Loading…
Cancel
Save