diff --git a/app/Migrations/Schema/V111/Version111.php b/app/Migrations/Schema/V111/Version111.php index 6198e35a73..b8ef73d4ae 100644 --- a/app/Migrations/Schema/V111/Version111.php +++ b/app/Migrations/Schema/V111/Version111.php @@ -532,7 +532,12 @@ class Version111 extends AbstractMigrationChamilo } } - $this->addSql('ALTER TABLE session_rel_course DROP category'); + if ($schema->hasTable('session_rel_course')) { + $table = $schema->getTable('session_rel_course'); + if ($table->hasColumn('category')) { + $this->addSql('ALTER TABLE session_rel_course DROP category'); + } + } } /**