hasTable('calendarchanges')) { $calendarChangesTable = $schema->getTable('calendarchanges'); if ($calendarChangesTable->hasIndex('calendarid_calendartype_synctoken')) { $calendarChangesTable->dropIndex('calendarid_calendartype_synctoken'); } if (!$calendarChangesTable->hasIndex('calid_type_synctoken')) { $calendarChangesTable->addIndex(['calendarid', 'calendartype', 'synctoken'], 'calid_type_synctoken'); } } return $schema; } }