Add error_logs

pull/2487/head
jmontoyaa 8 years ago
parent 7e8eac7228
commit e933ecb6bd
  1. 7
      app/Migrations/Schema/V111/Version20160907140300.php
  2. 3
      app/Migrations/Schema/V111/Version20160907150300.php
  3. 5
      main/install/index.php
  4. 4
      main/install/install.lib.php

@ -19,6 +19,7 @@ class Version20160907140300 extends AbstractMigrationChamilo
*/
public function up(Schema $schema)
{
error_log('Version20160907140300');
$data = [
'career' => [
'created_at',
@ -213,6 +214,7 @@ class Version20160907140300 extends AbstractMigrationChamilo
// to NULL, then change the field back to DATETIME
foreach ($data as $table => $fields) {
foreach ($fields as $field) {
error_log("$table . $field");
$this->addSql("ALTER TABLE $table CHANGE $field $field char(19)");
$this->addSql("UPDATE $table SET $field = NULL WHERE $field = '0000-00-00 00:00:00'");
$this->addSql("UPDATE $table SET $field = NULL WHERE $field = '0000-00-00 23:59:59'");
@ -227,17 +229,16 @@ class Version20160907140300 extends AbstractMigrationChamilo
];
foreach ($data as $table => $fields) {
foreach ($fields as $field) {
error_log("$table . $field");
$this->addSql("ALTER TABLE $table CHANGE $field $field char(10)");
$this->addSql("UPDATE $table SET $field = NULL WHERE $field = '0000-00-00'");
$this->addSql("ALTER TABLE $table CHANGE $field $field DATE");
}
}
error_log("finished");
}
public function down(Schema $schema)
{
}
}

@ -188,11 +188,12 @@ class Version20160907150300 extends AbstractMigrationChamilo
*/
public function up(Schema $schema)
{
error_log('Version20160907150300');
foreach ($this->names as $name) {
if (!$schema->hasTable($name)) {
continue;
}
error_log($name);
$this->addSql("ALTER TABLE $name ENGINE=InnoDB");
}
}

@ -19,6 +19,8 @@ use ChamiloSession as Session;
ini_set('display_errors', '1');
ini_set('log_errors', '1');
ini_set('memory_limit', -1);
ini_set('max_execution_time', 0);
error_reporting(-1);
require_once __DIR__.'/../../vendor/autoload.php';
@ -213,7 +215,6 @@ if ($installType == 'update' && in_array($my_old_version, $update_from_version_8
}
}
$session_lifetime = 360000;
if (!isset($_GET['running'])) {
@ -730,8 +731,6 @@ if (@$_POST['step2']) {
}
if ($installType == 'update') {
remove_memory_and_time_limits();
$manager = connectToDatabase(
$dbHostForm,
$dbUsernameForm,

@ -2114,6 +2114,10 @@ function migrate($chamiloVersion, EntityManager $manager)
$migration = new \Doctrine\DBAL\Migrations\Migration($config);
$versions = $config->getMigrations();
error_log('Versions to execute: ');
foreach ($versions as $version) {
error_log($version->getVersion());
}
/** @var Doctrine\DBAL\Migrations\Version $migrationItem */
foreach ($versions as $version) {

Loading…
Cancel
Save