skipIf($this->legacyCheck($schema, 'Framadate\Migration\AddColumn_hidden_In_poll_For_0_9'), 'Migration has been executed in an earlier database migration system'); foreach ([Utils::table('poll'), Utils::table('slot'), Utils::table('vote'), Utils::table('comment')] as $table) { $this->skipIf(!$schema->hasTable($table), 'Missing table ' . $table); } $pollTable = $schema->getTable(Utils::table('poll')); $this->skipIf($pollTable->hasColumn('hidden'), 'Column hidden already existing in table poll'); $pollTable->addColumn('hidden', 'boolean', ['default' => false, 'notnull' => true]); } /** * @param Schema $schema * @throws \Doctrine\DBAL\Schema\SchemaException */ public function down(Schema $schema) { $pollTable = $schema->getTable(Utils::table('poll')); $pollTable->dropColumn('hidden'); } }