public function actionRunMigrations()
    {
        header('Content-Type: application/json');

        $response = $this->runMigrationTool();
        
        $data = array('migrated' => false, 'details' => $response);
        
        if (strpos($response, 'Migrated up successfully.') || strpos($response, 'Your system is up-to-date.'))
            $data = array('migrated' => true, 'details' => $response);
        
        echo CJavaScript::jsonEncode($data);
        Yii::app()->end();
    }