skipIf($this->legacyCheck($schema, 'Framadate\Migration\Alter_Comment_table_adding_date'), 'Migration has been executed in an earlier database migration system'); $commentTable = $schema->getTable(Utils::table('comment')); $this->skipIf($commentTable->hasColumn('date'), 'Column date in comment table already exists'); $commentTable->addColumn('date', 'datetime', ['default' => 0]); } /** * @param Schema $schema * @throws \Doctrine\DBAL\Schema\SchemaException */ public function down(Schema $schema) { $commentTable = $schema->getTable(Utils::table('comment')); $commentTable->dropColumn('comment'); } }