Add check on existence of generate_certificates column in 1.9 -> 1.10 migration - refs BT#11399

1.10.x
Yannick Warnier 9 years ago
parent 2a1914aefd
commit e7561a9d62
  1. 5
      app/Migrations/Schema/V110/Version110.php

@ -101,7 +101,10 @@ class Version110 extends AbstractMigrationChamilo
if (!$table->hasColumn('criteria')) {
$this->addSql("ALTER TABLE skill ADD COLUMN criteria text");
}
$this->addSql("ALTER TABLE gradebook_category ADD COLUMN generate_certificates TINYINT NOT NULL DEFAULT 0");
$table = $schema->getTable('gradebook_category');
if (!$table->hasColumn('generate_certificates')) {
$this->addSql("ALTER TABLE gradebook_category ADD COLUMN generate_certificates TINYINT NOT NULL DEFAULT 0");
}
$this->addSql("ALTER TABLE track_e_access ADD COLUMN c_id int NOT NULL");
$this->addSql("ALTER TABLE track_e_lastaccess ADD COLUMN c_id int NOT NULL");

Loading…
Cancel
Save