Fix migration see #2009

pull/2487/head
jmontoyaa 8 years ago
parent 3a62604c5b
commit aaf1f94599
  1. 13
      app/Migrations/Schema/V111/Version111.php

@ -487,7 +487,18 @@ class Version111 extends AbstractMigrationChamilo
}
}
$this->addSql('ALTER TABLE sequence_rule ADD description LONGTEXT NOT NULL, DROP text;');
if ($schema->hasTable('sequence_rule')) {
$table = $schema->getTable('sequence_rule');
if ($table->hasColumn('text')) {
$this->addSql('ALTER TABLE sequence_rule DROP text');
}
if (!$table->hasColumn('description')) {
$this->addSql(
'ALTER TABLE sequence_rule ADD description LONGTEXT NOT NULL'
);
}
}
if ($schema->hasTable('course_rel_user_catalogue')) {
$table = $schema->getTable('course_rel_user_catalogue');

Loading…
Cancel
Save