From 50c70cf13b260433c54562529c73ca5f1859d848 Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Wed, 23 Sep 2015 13:54:05 +0200 Subject: [PATCH] Fix upgrade see #7831 --- app/Migrations/Schema/V110/Version110.php | 2 +- main/install/install.lib.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Migrations/Schema/V110/Version110.php b/app/Migrations/Schema/V110/Version110.php index 3c45a199f0..ae70919412 100644 --- a/app/Migrations/Schema/V110/Version110.php +++ b/app/Migrations/Schema/V110/Version110.php @@ -31,7 +31,7 @@ class Version110 extends AbstractMigrationChamilo $this->addSql("CREATE TABLE IF NOT EXISTS hook_call( id int UNSIGNED NOT NULL AUTO_INCREMENT, hook_event_id int UNSIGNED NOT NULL, hook_observer_id int UNSIGNED NOT NULL, type tinyint NOT NULL, hook_order int UNSIGNED NOT NULL, enabled tinyint NOT NULL, PRIMARY KEY PK_hook_management_hook_call(id))"); $this->addSql("CREATE TABLE IF NOT EXISTS c_student_publication_rel_document (id INT, work_id INT NOT NULL, document_id INT NOT NULL, c_id INT NOT NULL)"); $this->addSql("CREATE TABLE IF NOT EXISTS c_student_publication_rel_user (id INT, work_id INT NOT NULL, user_id INT NOT NULL, c_id INT NOT NULL)"); - $this->addSql("CREATE TABLE IF NOT EXISTS c_student_publication_comment (id INT NOT NULL PRIMARY KEY AUTO_INCREMENT, work_id INT NOT NULL, c_id INT NOT NULL, comment text, file VARCHAR(255), user_id int NOT NULL, sent_at datetime NOT NULL)"); + $this->addSql("CREATE TABLE IF NOT EXISTS c_student_publication_comment (id INT, work_id INT NOT NULL, c_id INT NOT NULL, comment text, file VARCHAR(255), user_id int NOT NULL, sent_at datetime NOT NULL)"); $this->addSql("CREATE TABLE IF NOT EXISTS c_attendance_calendar_rel_group (iid int NOT NULL auto_increment PRIMARY KEY, id INT, c_id INT NOT NULL, group_id INT NOT NULL, calendar_id INT NOT NULL)"); //$this->addSql("ALTER TABLE skill_rel_user ADD COLUMN course_id INT NOT NULL DEFAULT 0 AFTER id"); diff --git a/main/install/install.lib.php b/main/install/install.lib.php index 10c7a4d793..5805c3a238 100755 --- a/main/install/install.lib.php +++ b/main/install/install.lib.php @@ -2025,6 +2025,7 @@ function migrate($chamiloVersion, EntityManager $manager) } catch (Exception $ex) { if ($debug) { echo 'ERROR: '.$ex->getMessage().$nl; + return false; } }