getTable('ex_apps'); if ($table->hasColumn('protocol')) { $table->dropColumn('protocol'); } if ($table->hasColumn('host')) { $table->dropColumn('host'); } $table->dropIndex('ex_apps_c_port__idx'); $table->addUniqueIndex(['daemon_config_name', 'port'], 'ex_apps_c_port__idx'); $table = $schema->getTable('ex_apps_daemons'); $table->changeColumn('deploy_config', [ 'notnull' => true, ]); return $schema; } }