Migrations: Call to undefined method Migrations\Table::hasIndexByName()


#1

How to check if index exists in table (CakePHP 3.6) ?

...
if($table->hasIndexByName('body') == false){
 // create new index
}

And I have error:

Call to undefined method Migrations\Table::hasIndexByName()