@ -3191,8 +3191,38 @@ function migrateSwitch($fromVersion, $manager, $processFiles = true)
if ($result) {
error_log('Migrations files were executed ('.date('Y-m-d H:i:s').')');
$connection->executeQuery("ALTER TABLE course_category MODIFY COLUMN auth_course_child VARCHAR(40) DEFAULT 'TRUE'");
fixPostGroupIds($connection);
$sql = "UPDATE settings_current SET selected_value = '1.11.0' WHERE variable = 'chamilo_database_version'";
$connection->executeQuery($sql);
if ($processFiles) {
error_log('Update config files');
$fromVersionShort = '1.10';
include __DIR__.'/update-files-1.10.0-1.11.0.inc.php';
// Only updates the configuration.inc.php with the new version
include __DIR__.'/update-configuration.inc.php';
}
error_log('Upgrade 1.11.x process concluded! ('.date('Y-m-d H:i:s').')');
} else {
error_log('There was an error during running migrations. Check error.log');
}
break;
default:
break;
}
echo '< / div > ';
return true;
}
/**
* @param \Doctrine\DBAL\Connection $connection
*/
function fixPostGroupIds($connection)
{
$connection->executeQuery("ALTER TABLE course_category MODIFY COLUMN auth_course_child VARCHAR(40) DEFAULT 'TRUE'");
error_log('Fix c_student_publication.post_group_id');
// Fix post_group_id
@ -3265,26 +3295,4 @@ function migrateSwitch($fromVersion, $manager, $processFiles = true)
}
}
error_log('End - Fix work documents');
$sql = "UPDATE settings_current SET selected_value = '1.11.0' WHERE variable = 'chamilo_database_version'";
$connection->executeQuery($sql);
if ($processFiles) {
error_log('Update config files');
$fromVersionShort = '1.10';
include __DIR__.'/update-files-1.10.0-1.11.0.inc.php';
// Only updates the configuration.inc.php with the new version
include __DIR__.'/update-configuration.inc.php';
}
error_log('Upgrade 1.11.x process concluded! ('.date('Y-m-d H:i:s').')');
} else {
error_log('There was an error during running migrations. Check error.log');
}
break;
default:
break;
}
echo '< / div > ';
return true;
}