Browse Source

Fix upgrade see #7831

Julio Montoya 9 years ago
parent
commit
50c70cf13b
2 changed files with 2 additions and 1 deletions
  1. 1 1
      app/Migrations/Schema/V110/Version110.php
  2. 1 0
      main/install/install.lib.php

+ 1 - 1
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");

+ 1 - 0
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;
         }
     }