getTable($this->getTable('user')); $this->skipIf(false === $userTable->hasColumn('expired') || false === $userTable->hasColumn('credentials_expired'), 'It seems that you already played this migration.'); $userTable->dropColumn('expired'); $userTable->dropColumn('credentials_expired'); } /** * @param Schema $schema */ public function down(Schema $schema) { $userTable = $schema->getTable($this->getTable('user')); $this->skipIf(true === $userTable->hasColumn('expired') || true === $userTable->hasColumn('credentials_expired'), 'It seems that you already played this migration.'); $userTable->addColumn('expired', 'smallint', ['notnull' => false]); $userTable->addColumn('credentials_expired', 'smallint', ['notnull' => false]); } }