getTable('short_urls'); if ($shortUrls->hasColumn('max_visits')) { return; } $shortUrls->addColumn('max_visits', Types::INTEGER, [ 'unsigned' => true, 'notnull' => false, ]); } /** * @throws SchemaException */ public function down(Schema $schema): void { $shortUrls = $schema->getTable('short_urls'); if (! $shortUrls->hasColumn('max_visits')) { return; } $shortUrls->dropColumn('max_visits'); } public function isTransactional(): bool { return $this->connection->getDatabasePlatform()->getName() !== 'mysql'; } }