getTable('short_urls'); if ($shortUrls->hasColumn('max_visits')) { return; } $shortUrls->addColumn('max_visits', Type::INTEGER, [ 'unsigned' => true, 'notnull' => false, ]); } /** * @param Schema $schema * @throws SchemaException */ public function down(Schema $schema) { $shortUrls = $schema->getTable('short_urls'); if (! $shortUrls->hasColumn('max_visits')) { return; } $shortUrls->dropColumn('max_visits'); } }