public function actionMigrate($old, $replace)
    {
        $block = Block::find()->where(['like', 'class', $old])->one();
        
        if (!$block) {
            return $this->outputError("Unable to find a block for '{$old}'");
        }
        
        $this->outputInfo("Found block '{$block->class}' with ID {$block->id} used {$block->usageCount} times.");
        
        // check if existing block have the new replace name
        
        $replaceBlock = Block::find()->where(['like', 'class', $replace])->one();
        
        if ($replaceBlock && $this->confirm("Do you want to replace {$block->class} (used {$block->usageCount}x) with {$replaceBlock->class} (used {$replaceBlock->usageCount}x)?")) {
            $block->updateAttributes(['class' => $replaceBlock->class]);
            
            if (empty($replaceBlock->usageCount)) {
                $replaceBlock->delete();
                
                return $this->outputSuccess("The block as been migrated, the block used for the replacement has been delete has there was no content.");
            } else {
                $replaceBlock->updateAttributes(['class' => $block->class]);
                
                return $this->outputSuccess("The block has been migrated and the block class names has swaped as the replacement block had content.");
            }
        }
        
        return $this->outputError("Abort by user.");
    }