give_revenue}", 4); $indexes = array_filter(['form_id', 'campaign_id'], static function ($column) use ($existing) { return !in_array($column, $existing, true); }); if (!$indexes) { return; } $clauses = array_map(static function ($column) { return "ADD INDEX ($column)"; }, $indexes); DB::query("ALTER TABLE {$wpdb->give_revenue} " . implode(', ', $clauses)); } catch (DatabaseQueryException $exception) { throw new DatabaseMigrationException("An error occurred while updating the {$wpdb->give_revenue} table", 0, $exception); } } }