skipIf($this->legacyCheck($schema, 'Framadate\Migration\AddColumns_password_hash_And_results_publicly_visible_In_poll_For_0_9'), 'Migration has been executed in an earlier database migration system'); $pollTable = $schema->getTable(Utils::table('poll')); $this->skipIf($pollTable->hasColumn('password_hash'), 'Column password_hash in table poll already exists'); $this->skipIf($pollTable->hasColumn('results_publicly_visible'), 'Column results_publicly_visible in table poll already exists'); $pollTable->addColumn('password_hash', 'string', ['notnull' => false]); $pollTable->addColumn('results_publicly_visible', 'boolean', ['notnull' => false]); } /** * @param Schema $schema * @throws \Doctrine\DBAL\Schema\SchemaException */ public function down(Schema $schema) { $pollTable = $schema->getTable(Utils::table('poll')); $pollTable->dropColumn('password_hash'); $pollTable->dropColumn('results_publicly_visible'); } }